Example #1
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");
     }
 }