private void btn_Edit_Click(object sender, EventArgs e) { con.Open(); using (sd = new SqlCommand("update Auto_Part_Details set Value_Part= @Value_Part, Auto_Parts_id = @Auto_Parts_id, Repair_id = @Repair_id, New_Old_Part = @New_Old_Part ,Provider_id = @Provider_id , Installation_id = @Installation_id , Notes = @Notes where Job_Card = @Job_Card", con)) { sd.Parameters.AddWithValue("@Job_Card", txt_Job_card.Text); sd.Parameters.AddWithValue("@Value_Part", txt_Value_Part.Text); sd.Parameters.AddWithValue("@Auto_Parts_id", Convert.ToInt32(CB_Auto_parts.SelectedValue)); sd.Parameters.AddWithValue("@Repair_id", Convert.ToInt32(CB_Repair_type.SelectedValue)); sd.Parameters.AddWithValue("@New_Old_Part", Convert.ToBoolean(x)); sd.Parameters.AddWithValue("@Provider_id", Convert.ToInt32(CB_Providers_desc.SelectedValue)); sd.Parameters.AddWithValue("@Installation_id", Convert.ToInt32(CB_Hand_installation.SelectedValue)); sd.Parameters.AddWithValue("@Notes", txt_Notes.Text); } sd.ExecuteNonQuery(); con.Close(); }
sd.ExecuteNonQuery();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)