private void GetData() { this._employeeProjectList = EntityContentSelector.SelectEmployeeProject( ).Where(e => e.ProjectId == this._project.ProjectId).ToList(); this._employeeList = EntityContentSelector.SelectEmployee( ); this._employeePositionList = EntityContentSelector.SelectEmployeePosition( ); this._positionList = EntityContentSelector.SelectPosition( ); var bsnposList = this._employeeProjectList.Select(e => new { e.Bsn, e.PositionName }); var feList = this._employeePositionList.OrderBy(e => e.Bsn).Where(e => bsnposList.Contains(new { e.Bsn, e.PositionName })).Select(e => e.Bsn).ToList(); var fpList = this._employeePositionList.OrderBy(e => e.Bsn).Where(e => bsnposList.Contains(new { e.Bsn, e.PositionName })).Select(e => e.PositionName).ToList(); List <Employee> eList = new List <Employee>(); foreach (int b in feList) { eList.Add(this._employeeList.Where(e => e.Bsn == b).ToList()[0]); } List <Position> pList = new List <Position>(); foreach (string n in fpList) { pList.Add(this._positionList.Where(p => p.PositionName == n).ToList()[0]); } this.EmployeePositionViewer.PopulateList(eList, pList, this._employeeProjectList); }
private void GetData() { this._positionList = EntityContentSelector.SelectPosition( ); this._employeePositionList = EntityContentSelector.SelectEmployeePosition( ); }