示例#1
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());
     
 }
示例#2
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;
        }
示例#3
0
        private void ClickPaywaySearchButton(object sender, EventArgs e)
        {
            String emplID = _editPaywayEmplIDTB.Text;
            _salaryPresentationModel.setEmplID(emplID);

            _salaryController = new SalaryController(_salaryPresentationModel);
            _salaryPresentationModel = _salaryController.SearchDataByEmplID();

            if (_salaryPresentationModel.getEmplID() == null || _salaryPresentationModel.getEmplID() == "")
                return;

            ResetSearchEditPaywayUI();
            SetEditPaywayUIToEnable();
        }