示例#1
0
        public int deleteSupplier(EntSupplier objent)
        {
            string ConnectionString = ConfigurationManager.ConnectionStrings["ConString"].ConnectionString;
            SqlConnection conn = new SqlConnection(ConnectionString);
            conn.Open();
            SqlCommand cmd = new SqlCommand("Usp_DeleteSupplier", conn);
            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue("@SupplierID", objent.CompanyName);
                int result = cmd.ExecuteNonQuery();

                conn.Close();
                cmd.Dispose();
                conn.Close();
                conn.Dispose();
                return result;
        }
示例#2
0
 public int deleteSupplier(EntSupplier objent)
 {
     DLSupplier objdl = new DLSupplier();
     int result = objdl.deleteSupplier(objent);
     return result;
 }