private void InitControl() { //공통 코드 ( 근무지역 초기화 ) _lstCodeCommon = ANBTX_Common.GetCodeCommon(API_CODE_COMMON_URL); // 직원이름 초기화. _lstEmployeeTotal = ANBTX_Common.GetEmployee(API_EMPLOYEE_URL); var lstEmpName = _lstEmployeeTotal.Select(o => o.empNm).ToList().Where(o => !string.IsNullOrEmpty(o)).ToList(); this.SetComboBox(cboEmployeeName, lstEmpName); // 부서명 초기화. _lstTeam = _lstEmployeeTotal.Select(o => o.team).ToList().Where(o => !string.IsNullOrEmpty(o)).Distinct().ToList(); this.SetComboBox(cboTeamName, _lstTeam); // 프로젝트명 초기화. _lstProject = ANBTX_Common.GetProject(API_PROJECT_URL); var lstProject = _lstProject.Select(o => o.prjNm).Where(o => !string.IsNullOrEmpty(o)).Distinct().ToList(); this.SetComboBox(cboProjectName, lstProject); // 직급 초기화. _lstRank = ANBTX_Common.GetRank(API_RANK_URL); var lstRank = _lstRank.Select(o => o.rankName).ToList(); this.SetComboBox(cboRank, lstRank); // 기간 초기화. this.dtpkFrom.Value = DateTime.Today.AddDays(-30);; this.dtpkTo.Value = DateTime.Now; }
private void getLoadCombo() { //공통 코드 초기화 _lstCommonCode = ANBTX_Common.GetCodeCommon(API_COMMON_CODE_URL); //직급 초기화 _lstRank = ANBTX_Common.GetRank(API_RANK_URL); var lstRank = _lstRank.Select(o => o.rankName).ToList(); this.SetComboBox(cboRank, lstRank); //프로젝트 초기화 _lstProject = ANBTX_Common.GetProject(API_PROJECT_URL); var lstProject = _lstProject.Select(o => o.prjNm).Where(o => !string.IsNullOrEmpty(o)).Distinct().ToList(); this.SetComboBox(cboProject, lstProject); }
private void commGetPrj() { try { var lstPrj = ANBTX_Common.GetProject(API_URL_PRJ); if (lstPrj == null || lstPrj.Count == 0) { MessageBox.Show("There is no data."); return; } makeDt(lstPrj); } catch (Exception ex) { MessageBox.Show("An exception occurred :" + ex.ToString()); } }