public bool updateCustomerInformation(String CId, String customerName, String CustomerAddress, String CustomerContact, String CustomerEmail, String scale) { DBConnectionUtilityService ConnectionutilityService = new DBConnectionUtilityService(); SqlConnection con = ConnectionutilityService.Connect(); int id = Convert.ToInt32(CId); bool pUpdate = false; using (SqlCommand cmd = new SqlCommand("UPDATE Customer SET cus_name=@cus_name, cus_address=@cus_address, cus_contact=@cus_contact, cus_email=@cus_email, cus_status=@cus_status where cus_id=@cus_id")) { cmd.Parameters.AddWithValue("@cus_id", id); cmd.Parameters.AddWithValue("@cus_name", customerName); cmd.Parameters.AddWithValue("@cus_address", CustomerAddress); cmd.Parameters.AddWithValue("@cus_contact", CustomerContact); cmd.Parameters.AddWithValue("@cus_email", CustomerEmail); cmd.Parameters.AddWithValue("@cus_status", scale); cmd.Connection = con; con.Open(); try { cmd.ExecuteNonQuery(); pUpdate = true; } catch { pUpdate = false; } con.Close(); } return(pUpdate); }