// 按下查詢權限按鈕 private void ClickSearchAuthoButtom(object sender, EventArgs e) { String authoID = _editAuthoIDTB.Text; _authoPresentationModel.SetAuthoID(authoID); _authoController = new AuthorizationController(_authoPresentationModel); _authoPresentationModel = _authoController.SearchDataByAuthoID(); if (_authoPresentationModel.GetAuthoID() == null || _authoPresentationModel.GetAuthoID() == "") return; this.SetAllAuthoEditToEnable(); this.ResetSearchEditAuthoUI(); }
// 按下編輯權限按鈕 private void ClickEditAuthoButtom(object sender, EventArgs e) { this.SetAllEditAuthoVariableToPM(); _authoController = new AuthorizationController(_authoPresentationModel); if(_authoController.editAuthorization()) { this.SetAllAuthoEditToNotEable(); this.ResetEditAuthoUI(); } }
// 按下加入權限 private void ClickAddAuthoButton(object sender, EventArgs e) { this.SetAllNewAuthoVariableToPM(); _authoController = new AuthorizationController(_authoPresentationModel); _authoController.AddAuthorization(); }