public int Delete(int mamonhoc) { if (checkmaMonHoc_ID(mamonhoc) != 0) { return(dal.Delete(mamonhoc)); } else { return(-1); } }
/// <summary> /// Xoa khoa theo ma khoa /// </summary> /// <param name="maMH">Mã môn học</param> /// <returns>true, false</returns> public bool Delete(string maMH) { if (string.IsNullOrEmpty(maMH)) { return(false); } try { context.Delete(maMH); return(true); } catch (Exception ex) { Console.WriteLine(ex); return(false); } }
public bool Xoa(MonHoc monHoc) { return(monHocDAO.Delete(monHoc)); }