Пример #1
0
 public DataTable getNhaSanXuat()
 {
     db = new DBLib();
     try
     {
         return db.FillDataTable("sp_SelectNhaSanXuat", CommandType.StoredProcedure);
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #2
0
 public bool insertNSX(string TenSX)
 {
     db = new DBLib();
     try
     {
         db.AddParameter("@TenSX", TenSX);
         return db.ExecuteNonQuery("sp_InsertNSX", CommandType.StoredProcedure) > 0;
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #3
0
 public bool deleteNSX(int MaSX)
 {
     db = new DBLib();
     try
     {
         db.AddParameter("@MaSX", MaSX);
         return db.ExecuteNonQuery("sp_DeleteNSX", CommandType.StoredProcedure) > 0;
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #4
0
 public bool updateNSX(DTO.NhaSanXuat dto)
 {
     db = new DBLib();
     try
     {
         db.AddParameter("@MaSX", dto.MaSX);
         db.AddParameter("@TenSX", dto.TenSX);
         return db.ExecuteNonQuery("sp_UpdateNSX", CommandType.StoredProcedure) > 0;
     }
     catch (Exception)
     {
         throw;
     }
 }