public static List <StaffDto> GetAllStaffs() { if (allStaffs == null || allStaffs.Count == 0) { allStaffs = StaffDao.GetAll().ToList(); } return(allStaffs); }
public JsonResult ExsitsEmail(string sta_email, int?sta_id) { StaffDao dao = new StaffDao(); List <staff> lts_sta = dao.GetAll(); if (sta_id != null) { lts_sta.Remove(dao.GetById(sta_id)); } return(Json(!lts_sta.Any(x => x.sta_email.Trim().ToLower() == sta_email.Trim().ToLower()), JsonRequestBehavior.AllowGet)); }
public List <StaffDTO> getAll() { return(Sdao.GetAll()); }