// 按下搜尋work attendance private void ClickSearchWAButton(object sender, EventArgs e) { String emplID = _editWAEmplIDTB.Text; DateTime date = _editWADateDTP.Value; _waPresentationModel.SetWAEmplID(emplID); _waPresentationModel.SetWADate(date); _waController = new WorkAttendanController(_waPresentationModel); _waPresentationModel = _waController.SearchDataByEmplIDAndDate(); if (_waPresentationModel.GetWAEmplID() == null || _waPresentationModel.GetWAEmplID() == "") return; this.ResetAllEditWAUI(); }
// 按下編輯work attendance private void ClickEditWAButton(object sender, EventArgs e) { this.SetAllEditWAVariableToPM(); _waController = new WorkAttendanController(_waPresentationModel); if (_waController.EditWorkAttendance()) { this.ResetEditWAUI(); } }
// 按下新增考勤資料按鈕 private void ClickAddWAButton(object sender, EventArgs e) { this.SetAllNewWAVariableToPM(); this._waController = new WorkAttendanController(_waPresentationModel); _waController.AddWorkAttendance(); }