public static bool ThemTheLoai(TheLoaiDTO tl) { if (TheLoaiDAO.GetTheLoaiByName(tl.TenTheLoai) == null) { TheLoaiDAO.Insert(tl); return(true); } else { return(false); } }
public static bool XoaTheLoai(TheLoaiDTO tl) { if (TheLoaiDAO.GetTheLoaiByName(tl.TenTheLoai) != null) { TheLoaiDAO.Delete(tl); return(true); } else { return(false); } }