/// <summary> /// 加载信息 /// </summary> private void loadParmeter() { switch (pageindex) { case 0: this.bindingSource_Academic.DataSource = academmanage.Select(); break; case 1: this.bindingSource_duty.DataSource = dutymanage.Select(); break; case 2: this.bindingSource_bank.DataSource = bankmanage.Select(); break; case 3: this.bindingSource_company.DataSource = companymanage.Select(); break; case 4: this.bindingSource_BusinessHours.DataSource = businesshoursmanage.Select(); break; case 5: this.bindingSource_leaveType.DataSource = leaveTypemanage.Select(); break; case 6: this.bindingSource_AnnualHoliday.DataSource = annualholidaymanage.Select(); break; case 7: loadriqi(DateTime.Now.Year); break; } }
private void comboBoxEditAcademicBackGroundId_Enter(object sender, EventArgs e) { DevExpress.XtraEditors.ComboBoxEdit combox = sender as DevExpress.XtraEditors.ComboBoxEdit; if (combox == null || combox.Tag == null) { return; } string tag = combox.Tag.ToString(); switch (tag) { case "bank": this.comboBoxEditBankId.Properties.Items.Clear(); foreach (Model.Bank bank in bankManager.Select()) { this.comboBoxEditBankId.Properties.Items.Add(bank); } break; //case "duty": // this.comboBoxEditDutyId.Properties.Items.Clear(); // foreach (Model.Duty duty in dutyManager.Select()) // { // this.comboBoxEditDutyId.Properties.Items.Add(duty); // } // break; case "company": this.comboBoxEditCompanyId.Properties.Items.Clear(); foreach (Model.Company company in companyManager.Select()) { this.comboBoxEditCompanyId.Properties.Items.Add(company); } break; case "department": this.comboBoxEditDepartmentId.Properties.Items.Clear(); foreach (Model.Department department in departmentManager.Select()) { this.comboBoxEditDepartmentId.Properties.Items.Add(department); } break; case "businesshour": this.comboBoxEditBusinessHoursId.Properties.Items.Clear(); foreach (Model.BusinessHours businessHours in businessHoursManager.Select()) { this.comboBoxEditBusinessHoursId.Properties.Items.Add(businessHours); } break; case "academicbackground": this.comboBoxEditAcademicBackGroundId.Properties.Items.Clear(); foreach (Model.AcademicBackGround academicBackGround in academicBackGroundManager.Select()) { this.comboBoxEditAcademicBackGroundId.Properties.Items.Add(academicBackGround); } break; default: break; } }