Example #1
0
 //Thêm 1 thể loại vào bảng THELOAI
 public static string ThemTheLoai(TheLoai_DTO tl)
 {
     if (TheLoai_DAO.GetTheLoaiByName(tl.TenTheLoai) == null)
     {
         return(TheLoai_DAO.Insert(tl));
     }
     else
     {
         return("Thể loại này đã có trong cơ sở dữ liệu");
     }
 }
Example #2
0
 //Sửa 1 thể loại
 public static string SuaTheLoai(TheLoai_DTO tl)
 {
     if (TheLoai_DAO.GetTheLoaiByName(tl.TenTheLoai) != null)
     {
         return("Thể loại này đã có trong cơ sở dữ liệu");
     }
     if (TheLoai_DAO.GetTheLoaiByMa(tl.MaTheLoai) != null)
     {
         return(TheLoai_DAO.Update(tl));
     }
     else
     {
         return("Mã thể loại này không tồn tại trong CSDL");
     }
 }
Example #3
0
 public static Theloai_DTO TimTL_TheoMa(string maloai)
 {
     return(TheLoai_DAO.TimTL_TheoMa(maloai));
 }
Example #4
0
 public static List <Theloai_DTO> TimTL(string dk, string giatri)
 {
     return(TheLoai_DAO.TimTL(dk, giatri));
 }
Example #5
0
 public static bool SuaTL(Theloai_DTO TL)
 {
     return(TheLoai_DAO.SuaTL(TL));
 }
Example #6
0
 public static bool XoaTL(string maloai)
 {
     return(TheLoai_DAO.XoaTL(maloai));
 }
Example #7
0
 public static bool ThemTL(Theloai_DTO TL)
 {
     return(TheLoai_DAO.ThemTL(TL));
 }
Example #8
0
 public static List <Theloai_DTO> LayDSTL()
 {
     return(TheLoai_DAO.LayDSTL());
 }
Example #9
0
 //Lấy tất cả thông tin của bảng THELOAI
 public static DataTable GetTheLoaiAll()
 {
     return(TheLoai_DAO.GetTheLoaiAll());
 }
Example #10
0
 public static DataTable DStenTL()
 {
     return(TheLoai_DAO.DStenTL());
 }
Example #11
0
 public static string MaTL(string s)
 {
     return(TheLoai_DAO.MaTL(s));
 }
Example #12
0
 public static void xoaTL(string maTL)
 {
     TheLoai_DAO.xoaTL(maTL);
 }
Example #13
0
 public static void suaTL(string maTL, string tenTL)
 {
     TheLoai_DAO.suaTL(maTL, tenTL);
 }
Example #14
0
 public static void themTL(string maTL, string tenTL)
 {
     TheLoai_DAO.themTL(maTL, tenTL);
 }
Example #15
0
 public static string LastMaTL()
 {
     return(TheLoai_DAO.LastMaTL());
 }
Example #16
0
 //Load danh sách sinh viên
 public static DataTable DanhSachTL()
 {
     return(TheLoai_DAO.LoadDSTheLoai());
 }