///<summary> ///updHenpinNebiki ///利益率承認の登録 ///引数 :なし ///戻り値:なし ///</summary> private void updRiekiritsu() { //グリッドが空の場合 if (gridRiekiritsu.Rows.Count < 0) { return; } //データ登録用 List <string> lstGrid = new List <string>(); //承認フラグ登録用 int intShoninFlg = 0; //承認がNの場合 if (gridRiekiritsu.CurrentRow.Cells["承認"].Value.ToString() == "N") { //Yに変更 gridRiekiritsu.CurrentRow.Cells["承認"].Value = "Y"; intShoninFlg = 1; } else { //Nに変更 gridRiekiritsu.CurrentRow.Cells["承認"].Value = "N"; intShoninFlg = 0; } //承認情報 lstGrid.Add(gridRiekiritsu.CurrentRow.Cells["受注番号"].Value.ToString()); lstGrid.Add(intShoninFlg.ToString()); lstGrid.Add(DateTime.Now.ToString()); lstGrid.Add(SystemInformation.UserName); A1520_Uriageshonin_B uriageshoninB = new A1520_Uriageshonin_B(); try { uriageshoninB.updRiekiritsu(lstGrid); } catch (Exception ex) { //データロギング new CommonException(ex); //例外発生メッセージ(OK) BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR); basemessagebox.ShowDialog(); return; } }
///<summary> ///delRiekiritsu ///削除機能 ///引数 :なし ///戻り値:なし ///</summary> private void delRiekiritsu() { //削除しますかメッセージ //メッセージボックスの処理、削除するか否かのウィンドウ(YES,NO) BaseMessageBox basemessageboxRieki = new BaseMessageBox(this, CommonTeisu.TEXT_DEL, "選択中の利益率承認データを差し戻します。よろしいですか。", CommonTeisu.BTN_YESNO, CommonTeisu.DIAG_QUESTION); //NOが押された場合 if (basemessageboxRieki.ShowDialog() == DialogResult.No) { return; } //データ登録用 List <string> lstGrid = new List <string>(); //承認フラグ登録用 int intShoninFlg = -1; //承認情報 lstGrid.Add(gridRiekiritsu.CurrentRow.Cells["受注番号"].Value.ToString()); lstGrid.Add(intShoninFlg.ToString()); lstGrid.Add(DateTime.Now.ToString()); lstGrid.Add(SystemInformation.UserName); A1520_Uriageshonin_B uriageshoninB = new A1520_Uriageshonin_B(); try { uriageshoninB.updRiekiritsu(lstGrid); //利益率承認のグリッド表示 showGirdRiekiritsu(); } catch (Exception ex) { //データロギング new CommonException(ex); //例外発生メッセージ(OK) BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR); basemessagebox.ShowDialog(); return; } }