// 以員工ID搜尋支付資料 public SalaryPresentationModel SearchDataByEmplID() { SalaryPresentationModel salaryPresentationModel = new SalaryPresentationModel(); if (this._salaryModel.getEmplID() == null || this._salaryModel.getEmplID() == "") MessageBox.Show("請輸入員工ID"); else { //MessageBox.Show("yes"); _salaryService = new SalaryService(this._salaryModel); _salaryModel = _salaryService.searchByEmplID(); salaryPresentationModel.setEmplID(_salaryModel.getEmplID()); salaryPresentationModel.setPayway(_salaryModel.getPayway()); salaryPresentationModel.setAccountData(_salaryModel.getAccountData()); if (_salaryModel.getPayway() == null || _salaryModel.getPayway() == "") { MessageBox.Show("此員工ID不存在!"); //MessageBox.Show(_authoModel.GetAuthoID()); salaryPresentationModel.setEmplID(null); } } return salaryPresentationModel; }
// 取得該員工薪水支付方式 private List<String> GetEmplSalaryPayWay(String emplID) { List<String> salaryPayWayData = new List<String>(); SalaryModel salaryModel = new SalaryModel(); salaryModel.setEmplID(emplID); SalaryService salaryService = new SalaryService(salaryModel); salaryModel = salaryService.searchByEmplID(); salaryPayWayData.Add(salaryModel.getPayway()); salaryPayWayData.Add(salaryModel.getAccountData()); return salaryPayWayData; }