public void DisableChart(string chartID)
{
/*
Steps :1. Frist read line info,nodeinfo,comfortzone info for particular chart id
2.Then delete line value using lineID,
3.Delete node values using nodeID
4.Delete comfortzone value using chartid
5.delete the chart info using chart id value
*/
//string chartID =
string tableName = "tbl_" + selectedBuildingList[0].BuildingName + "_chart_detail";// "tbl_" ++"_node_value";
string databasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string databaseFile = databasePath + @"\db_psychrometric_project.s3db";
string connString = @"Data Source=" + databaseFile + ";Version=3;";
using (SQLiteConnection connection = new SQLiteConnection(connString))
{
connection.Open();
SQLiteDataReader reader = null;
string queryString = " UPDATE " + tableName + " set enableChartStatus = @status where chartID = @id_value";
SQLiteCommand command = new SQLiteCommand(queryString, connection);
command.Parameters.AddWithValue("@status", "false");
command.Parameters.AddWithValue("@id_value", chartID);
//SqlDataAdapter dataAdapter = new SqlDataAdapter(queryString, connection.ConnectionString); //connection.ConnectionString is the connection string
reader = command.ExecuteReader();
}//Close of using
}