WFA_psychometric_chart.Form1_main.update_comfort_zone_for_chart C# (CSharp) Method

update_comfort_zone_for_chart() public method

updates the chart info for comfort zone
public update_comfort_zone_for_chart ( string chartid, string comfortzone_id, string status ) : void
chartid string id of chart selected
comfortzone_id string comfort zone id for each chart
status string
return void
        public void update_comfort_zone_for_chart(string chartid, string comfortzone_id, string status)
        {

            //string idValue = GetGUID();
            string tableName = "tbl_" + selectedBuildingList[0].BuildingName + "_chart_comfort_zone_setting";   // currentLineTableFromDB;
            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_string = "UPDATE " + tableName + "   set  comfort_zone_ID =@cfid ,status =@status  where chartID  =@chartid ";
                SQLiteCommand command = new SQLiteCommand(sql_string, connection);
                command.CommandType = CommandType.Text;
                command.Parameters.AddWithValue("@cfid", comfortzone_id);
                command.Parameters.AddWithValue("@chartid", chartid);
                command.Parameters.AddWithValue("@status", status);
                command.ExecuteNonQuery();
            }


        }
Form1_main