WFA_psychometric_chart.Form1_main.UpdateLineInfoToDBWithouSeriesID C# (CSharp) Method

UpdateLineInfoToDBWithouSeriesID() public method

public UpdateLineInfoToDBWithouSeriesID ( string id, string prevNodeId, string nextNodeId, Color lineColor, int lineThicknessValue ) : void
id string
prevNodeId string
nextNodeId string
lineColor Color
lineThicknessValue int
return void
        public void UpdateLineInfoToDBWithouSeriesID(string id, string prevNodeId, string nextNodeId, Color lineColor, int lineThicknessValue)
        {
            // string lineSeriesName = lineSeriesVal.Name;
            //string tableName = currentLineTableFromDB;
            string tableName = "tbl_" + selectedBuildingList[0].BuildingName + "_line_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 sql_string = "update " + tableName + " set prevNodeId=@pn,nextNodeId=@nn,lineColorValue=@lc ,thickness = @linethickness where   lineID=@id ";
                SQLiteCommand command = new SQLiteCommand(sql_string, connection);
                command.CommandType = CommandType.Text;

                command.Parameters.AddWithValue("@pn", prevNodeId);
                command.Parameters.AddWithValue("@nn", nextNodeId);
                command.Parameters.AddWithValue("@lc", ColorTranslator.ToHtml(lineColor));
                //command.Parameters.AddWithValue("@ls", lineSeriesName);
                command.Parameters.AddWithValue("@linethickness", lineThicknessValue);
                command.Parameters.AddWithValue("@id", id);
                command.ExecuteNonQuery();
            }


        }
Form1_main