Hi
public int Delete(string Id) { int result = 0; try { using (SqlConnection con = new SqlConnection(Common.Con)) { con.Open(); SqlCommand cmd = new SqlCommand("sp_Product", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Id", Id); cmd.Parameters.AddWithValue("@Action", "D"); result = cmd.ExecuteNonQuery(); //return result; } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); return -1; } finally { return result; }
Thanks