/// <summary> /// delText /// テキストボックス内の文字を削除 /// </summary> private void delText() { // 削除するデータ以外を確保 string strDenpyoYMD = txtYMD.Text; string strTantousha = labelSet_Tantousha.CodeTxtText; string strEigyosho = labelSet_Eigyosho.CodeTxtText; // 画面の項目内を白紙にする delFormClear(this, gridShireJisseki); txtYMD.Text = strDenpyoYMD; labelSet_Eigyosho.CodeTxtText = strEigyosho; labelSet_Eigyosho.chkTxtEigyousho(); DataTable dtTantoshaCd = new DataTable(); B0060_ShiharaiInput_B shiharaiinputB = new B0060_ShiharaiInput_B(); try { //ログインIDから担当者コードを取り出す dtTantoshaCd = shiharaiinputB.getTantoshaCd(SystemInformation.UserName); //担当者データがある場合 if (dtTantoshaCd.Rows.Count > 0) { //一行目にデータがない場合 if (dtTantoshaCd.Rows[0]["担当者コード"].ToString() == "") { return; } } labelSet_Tantousha.CodeTxtText = dtTantoshaCd.Rows[0]["担当者コード"].ToString(); labelSet_Tantousha.chkTxtTantosha(); labelSet_Eigyosho.CodeTxtText = dtTantoshaCd.Rows[0]["営業所コード"].ToString(); } catch (Exception ex) { // エラーロギング new CommonException(ex); // メッセージボックスの処理、削除失敗の場合のウィンドウ(OK) BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_VIEW, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR); basemessagebox.ShowDialog(); } lblset_Siiresaki.Focus(); }
/// <summary> /// B0060_ShiharaiInput_Load /// 読み込み時 /// </summary> private void B0060_ShiharaiInput_Load(object sender, EventArgs e) { this.Show(); this._Title = "支払入力"; // フォームでもキーイベントを受け取る this.KeyPreview = true; this.btnF01.Text = STR_FUNC_F1; this.btnF03.Text = STR_FUNC_F3; this.btnF04.Text = STR_FUNC_F4; this.btnF06.Text = "F6:終り"; this.btnF07.Text = "F7:行削除"; this.btnF08.Text = "F8:元帳"; this.btnF09.Text = STR_FUNC_F9; this.btnF12.Text = STR_FUNC_F12; //リストからデータを取り出したかどうかのチェックの初期値(リストから取り出していない状態) radSet_chkListDataInput.radbtn0.Checked = true; DataTable dtTantoshaCd = new DataTable(); B0060_ShiharaiInput_B shiharaiinputB = new B0060_ShiharaiInput_B(); try { //ログインIDから担当者コードを取り出す dtTantoshaCd = shiharaiinputB.getTantoshaCd(SystemInformation.UserName); //担当者データがある場合 if (dtTantoshaCd.Rows.Count > 0) { //一行目にデータがない場合 if (dtTantoshaCd.Rows[0]["担当者コード"].ToString() == "") { return; } } labelSet_Tantousha.CodeTxtText = dtTantoshaCd.Rows[0]["担当者コード"].ToString(); labelSet_Tantousha.chkTxtTantosha(); labelSet_Eigyosho.CodeTxtText = dtTantoshaCd.Rows[0]["営業所コード"].ToString(); } catch (Exception ex) { // エラーロギング new CommonException(ex); // メッセージボックスの処理、削除失敗の場合のウィンドウ(OK) BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_VIEW, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR); basemessagebox.ShowDialog(); } //伝票年月日の設定 txtYMD.setUp(0); //DataGridViewの初期設定 SetUpGrid(); lblset_Siiresaki.Focus(); }