public void InfoForComfortZoneOfChart(string chartID)
{
default_comfort_zone_of_chart.Clear();//resetting the chart list value..
string tableForComfortZoneDetail = "tbl_" + selectedBuildingList[0].BuildingName + "_chart_comfort_zone_setting";
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();
string sql = "select * from " + tableForComfortZoneDetail + " where chartID='" + chartID + "'";
SQLiteCommand command = new SQLiteCommand(sql, connection);
SQLiteDataReader reader = command.ExecuteReader();
while (reader.Read())
{
//This is the reading part of the data...
default_comfort_zone_of_chart.Add(new datatype_for_comfortzone
{
chartid = chartID,//reader["chartID"].ToString(),
comfortzoneid = reader["comfort_zone_ID"].ToString(),
status = reader["status"].ToString()
});
}
}
}