private void InitChildren() { List <SearchCondition> conditions = new List <SearchCondition>(); conditions.Add(SearchCondition.CreateSearchCondition("FKEmployeeID", PKEmployeeID.ToString(), SearchComparator.Equal, SearchType.SearchString)); conditions.Add(SearchCondition.CreateSearchCondition("IsDeleted", Convert.ToString(0), SearchComparator.Equal, SearchType.SearchNotString)); employeeRoleList = CommonDAL <EmployeeRoleRL> .GetObjects(conditions); foreach (EmployeeRoleRL item in employeeRoleList) { if (item.EmployeeRole.Name.Equals("Admin")) { isAdmin = true; } if (item.EmployeeRole.Name.Equals("Manager")) { isManager = true; } } conditions.Clear(); conditions.Add(SearchCondition.CreateSearchCondition("PKEmployeeID", FKReportManagerID.ToString(), SearchComparator.Equal, SearchType.SearchString)); manager = CommonDAL <Employee> .GetSingleObject(conditions); }
private void InitChildren() { List <SearchCondition> conditions = new List <SearchCondition>(); conditions.Add(SearchCondition.CreateSearchCondition(GlobalParams.FKLeaveInfoID, PKLeaveInfoID.ToString(), SearchComparator.Equal, SearchType.SearchString)); conditions.Add(SearchCondition.CreateSearchCondition(GlobalParams.IsDeleted, Convert.ToString(0), SearchComparator.Equal, SearchType.SearchNotString)); timeDurationList = CommonDAL <TimeDurationInfo> .GetObjects(conditions); conditions.Clear(); conditions.Add(SearchCondition.CreateSearchCondition(GlobalParams.PKLeaveTypeID, FKLeaveTypeID.ToString(), SearchComparator.Equal, SearchType.SearchString)); leaveCategory = CommonDAL <LeaveType> .GetSingleObject(conditions); conditions.Clear(); conditions.Add(SearchCondition.CreateSearchCondition(GlobalParams.PKEmployeeID, FKReportManagerID.ToString(), SearchComparator.Equal, SearchType.SearchString)); manager = CommonDAL <Employee> .GetSingleObject(conditions); conditions.Clear(); conditions.Add(SearchCondition.CreateSearchCondition(GlobalParams.PKEmployeeID, FKSubmitEmployeeID.ToString(), SearchComparator.Equal, SearchType.SearchString)); submitter = CommonDAL <Employee> .GetSingleObject(conditions); }