Beispiel #1
0
        // 以員工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);
        }
Beispiel #2
0
 // 建構子
 public SalaryController(SalaryPresentationModel salaryPresentationModel)
 {
     _salaryModel.setSalaryDate(salaryPresentationModel.getSalaryDate());
     _salaryModel.setSalaryT(salaryPresentationModel.getSalaryT());
     _salaryModel.setEmplID(salaryPresentationModel.getEmplID());
     _salaryModel.setPayway(salaryPresentationModel.getPayway());
     _salaryModel.setAccountData(salaryPresentationModel.getAccountData());
 }