/// <summary> /// 社員一覧を取得する /// </summary> /// <returns>社員一覧</returns> public EmployeeListPage GetAll() { EmployeeListPage page = new EmployeeListPage(); page.GenderId = "99"; page.GenderName = "全員"; page.List = daoOfEmployee.GetAll(); return page; }
/// <summary> /// 社員一覧を検索する /// </summary> /// <param name="condition">検索条件</param> /// <returns>社員一覧</returns> public EmployeeListPage Find(EmployeeListPage condition) { EmployeeListPage page = new EmployeeListPage(); page.GenderId = condition.GenderId; IList<GenderDto> genderList = this.GetGenderAll(); foreach (GenderDto dto in genderList) { if (dto.Id == Convert.ToInt32(condition.GenderId)) page.GenderName = dto.Name; } if (condition.GenderId == "99") page.GenderName = "全員"; IList<EmployeeDto> list; if (page.GenderId != "99") list = daoOfEmployee.FindByGender(Convert.ToInt32(condition.GenderId)); else list = daoOfEmployee.GetAll(); if (list != null) page.List = list; return page; }