Beispiel #1
0
 public static int Count()
 {
     try
     {
         return(DAL_LoaiDocGia.Count());
     }
     catch (Exception Err)
     {
         throw;
     }
 }
Beispiel #2
0
 public static DataTable Load()
 {
     try
     {
         return(DAL_LoaiDocGia.Load());
     }
     catch (Exception Err)
     {
         throw;
     }
 }
Beispiel #3
0
 public static bool Delete(string Id)
 {
     if (Id == "")
     {
         throw new Exception("ID không được rỗng!");
     }
     try
     {
         return(DAL_LoaiDocGia.Delete(Id));
     }
     catch (Exception Err)
     {
         throw;
     }
 }
Beispiel #4
0
 public static string GetNameById(string Id)
 {
     if (Id == "")
     {
         throw new Exception("Mã loại không được rỗng!");
     }
     try
     {
         return(DAL_LoaiDocGia.GetNameById(Id));
     }
     catch (Exception Err)
     {
         throw;
     }
 }
Beispiel #5
0
 public static string GetIdByName(string Name)
 {
     if (Name == "")
     {
         throw new Exception("Tên loại không được trống!");
     }
     try
     {
         return(DAL_LoaiDocGia.GetIdByName(Name));
     }
     catch (Exception Err)
     {
         throw;
     }
 }
Beispiel #6
0
 public static bool Update(BEL_LoaiDocGia LoaiDocGia)
 {
     if (LoaiDocGia.Ma == "")
     {
         throw new Exception("Mã loại không được rỗng!");
     }
     if (LoaiDocGia.Ten == "")
     {
         throw new Exception("Tên loại không được rỗng!");
     }
     if (LoaiDocGia.TrangThai == "")
     {
         throw new Exception("Trạng thái không được rỗng!");
     }
     try
     {
         return(DAL_LoaiDocGia.Update(LoaiDocGia));
     }
     catch (Exception Err)
     {
         throw;
     }
 }