public bool XoaChiaCaLamViec(string maNhanVien, string maCaLamViec, DateTime ngay) { ChiaCaLamViecDAL dal = new ChiaCaLamViecDAL(db); try { if (!string.IsNullOrEmpty(maNhanVien) && !string.IsNullOrEmpty(maCaLamViec) && ngay != null) { if (TimKiemChiTietChiaCaLamViec(maNhanVien, maCaLamViec, ngay) != null) { return(dal.XoaPhanQuyen(maNhanVien, maCaLamViec, ngay)); } else { return(false); } } else { return(false); } } catch (Exception) { throw; } }
public bool CapNhat(ChiaCaLamViec item) { ChiaCaLamViecDAL dal = new ChiaCaLamViecDAL(db); if (item != null) { return(dal.CapNhat(item)); } else { return(false); } }
public IEnumerable <ChiaCaLamViecModel> DanhSachTatCaCaLamViec() { ChiaCaLamViecDAL dal = new ChiaCaLamViecDAL(db); try { return(dal.DanhSachTatCaCaLamViec()); } catch (Exception) { throw; } }
public bool Xoa(ChiaCaLamViec item) { ChiaCaLamViecDAL dal = new ChiaCaLamViecDAL(db); try { if (item != null) { return(dal.Xoa(item)); } else { return(false); } } catch (Exception) { throw; } }
public ChiaCaLamViec TimKiemTheoMa(string id) { ChiaCaLamViecDAL dal = new ChiaCaLamViecDAL(db); try { if (!string.IsNullOrEmpty(id)) { return(dal.TimKiemTheoMa(id)); } else { return(null); } } catch (Exception) { throw; } }
public IEnumerable <ChiaCaLamViecModel> DanhSachCaLamViecDaGan(string maNhanVien, DateTime ngayLamViec) { ChiaCaLamViecDAL dal = new ChiaCaLamViecDAL(db); try { if (!string.IsNullOrEmpty(maNhanVien)) { return(dal.DanhSachCaLamViecDaGan(maNhanVien, ngayLamViec)); } else { return(null); } } catch (Exception) { throw; } }
public IEnumerable <ChiaCaLamViec> LayTatCa() { ChiaCaLamViecDAL dal = new ChiaCaLamViecDAL(db); return(dal.LayTatCa()); }