Example #1
0
 ////////////////////////////////////////////////////////////////////////////
 //  イベント名 : KentikuYoutoMstButton_click
 /// <summary>
 /// 
 /// </summary>
 /// <param name="e"></param>
 /// <param name="sender"></param>
 /// <history>
 /// 日付    担当者   内容
 /// 2014/06/24 YS.CHEW    新規作成
 /// </history>
 ////////////////////////////////////////////////////////////////////////////
 private void KentikuYoutoMstButton_click(object sender, EventArgs e)
 {
     KenchikuyotoMstListForm frm = new KenchikuyotoMstListForm();
     Program.mForm.ShowForm(frm);
 }
Example #2
0
        ////////////////////////////////////////////////////////////////////////////
        //  イベント名 : decisionButton_Click
        /// <summary>
        /// 
        /// </summary>
        /// <param name="e"></param>
        /// <param name="sender"></param>
        /// <history>
        /// 日付    担当者   内容
        /// 2014/07/29 HuyTX    新規作成
        /// </history>
        ////////////////////////////////////////////////////////////////////////////
        private void decisionButton_Click(object sender, EventArgs e)
        {
            TraceLog.StartWrite(MethodInfo.GetCurrentMethod());
            Cursor preCursor = Cursor.Current;

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                IDecisionBtnClickALInput alInput = new DecisionBtnClickALInput();

                //insert data
                if (string.IsNullOrEmpty(this._kenchikuyotoDaibunruiCd) && string.IsNullOrEmpty(this._kenchikuyotoShobunruiCd) && string.IsNullOrEmpty(this._kenchikuyotoRenban))
                {
                    alInput.DisplayMode = DispMode.Add;
                    alInput.KenchikuyotoMstDataTable = CreateKenchikuyotoMstInsert();
                }
                else
                {
                    //update data
                    alInput.DisplayMode = DispMode.Edit;
                    alInput.KenchikuyotoMstDataTable = CreateKenchikuyotoMstUpdate(_kenchikuyotoMstDataTable);
                }

                IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput);

                if (!string.IsNullOrEmpty(alOutput.ErrMessage))
                {
                    string kenchikuyotoDaibunruiNm = kenchikuyotoDaibunruiListBox.GetItemText(kenchikuyotoDaibunruiListBox.SelectedItem);
                    string kenchikuyotoShobunruiNm = kenchikuyotoShobunruiListBox.GetItemText(kenchikuyotoShobunruiListBox.SelectedItem);

                    MessageForm.Show2(MessageForm.DispModeType.Error, string.Format(alOutput.ErrMessage,
                        new string[] { kenchikuyotoDaibunruiNm, kenchikuyotoShobunruiNm, alInput.KenchikuyotoMstDataTable[0].KenchikuyotoRenban.ToString() }));
                    return;
                }

                //close form and redirect KenchikuyotoMstListForm
                KenchikuyotoMstListForm frm = new KenchikuyotoMstListForm();
                Program.mForm.ShowForm(frm);
            }
            catch (Exception ex)
            {
                TraceLog.ErrorWrite(MethodInfo.GetCurrentMethod(), ex.ToString());
                MessageForm.Show(MessageForm.DispModeType.Error, MessageResouce.MSGID_E00001, ex.Message);
            }
            finally
            {
                Cursor.Current = preCursor;
                TraceLog.EndWrite(MethodInfo.GetCurrentMethod());
            }
        }
Example #3
0
        ////////////////////////////////////////////////////////////////////////////
        //  イベント名 : deleteButton_Click
        /// <summary>
        /// 
        /// </summary>
        /// <param name="e"></param>
        /// <param name="sender"></param>
        /// <history>
        /// 日付    担当者   内容
        /// 2014/07/29 HuyTX    新規作成
        /// </history>
        ////////////////////////////////////////////////////////////////////////////
        private void deleteButton_Click(object sender, EventArgs e)
        {
            TraceLog.StartWrite(MethodInfo.GetCurrentMethod());
            Cursor preCursor = Cursor.Current;

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                if (MessageForm.Show2(MessageForm.DispModeType.Question, "表示されているデータが削除されます。よろしいですか?") != DialogResult.Yes) return;

                IDeleteBtnClickALInput alInput = new DeleteBtnClickALInput();
                alInput.KenchikuyotoDaibunruiCd = this._kenchikuyotoDaibunruiCd;
                alInput.KenchikuyotoShobunruiCd = this._kenchikuyotoShobunruiCd;
                alInput.KenchikuyotoRenban = Int32.Parse(this._kenchikuyotoRenban);

                IDeleteBtnClickALOutput alOutput = new DeleteBtnClickApplicationLogic().Execute(alInput);

                //check not exist record
                if (!string.IsNullOrEmpty(alOutput.ErrMessage))
                {
                    string kenchikuyotoDaibunruiNm = kenchikuyotoDaibunruiListBox.GetItemText(kenchikuyotoDaibunruiListBox.SelectedItem);
                    string kenchikuyotoShobunruiNm = kenchikuyotoShobunruiListBox.GetItemText(kenchikuyotoShobunruiListBox.SelectedItem);

                    MessageForm.Show2(MessageForm.DispModeType.Error, string.Format(alOutput.ErrMessage,
                        new string[] { kenchikuyotoDaibunruiNm, kenchikuyotoShobunruiNm, _kenchikuyotoRenban }));
                    return;
                }

                //close form and redirect KenchikuyotoMstListForm
                KenchikuyotoMstListForm frm = new KenchikuyotoMstListForm();
                Program.mForm.ShowForm(frm);
            }
            catch (Exception ex)
            {
                TraceLog.ErrorWrite(MethodInfo.GetCurrentMethod(), ex.ToString());
                MessageForm.Show(MessageForm.DispModeType.Error, MessageResouce.MSGID_E00001, ex.Message);
            }
            finally
            {
                Cursor.Current = preCursor;
                TraceLog.EndWrite(MethodInfo.GetCurrentMethod());
            }
        }
Example #4
0
        ////////////////////////////////////////////////////////////////////////////
        //  イベント名 : closeButton_Click
        /// <summary>
        /// 
        /// </summary>
        /// <param name="e"></param>
        /// <param name="sender"></param>
        /// <history>
        /// 日付    担当者   内容
        /// 2014/07/29 HuyTX    新規作成
        /// </history>
        ////////////////////////////////////////////////////////////////////////////
        private void closeButton_Click(object sender, EventArgs e)
        {
            TraceLog.StartWrite(MethodInfo.GetCurrentMethod());
            Cursor preCursor = Cursor.Current;

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                if (this._displayMode != DispMode.Detail && IsEditedControl())
                {
                    if (MessageForm.Show2(MessageForm.DispModeType.Question, "編集内容が破棄されます。よろしいですか?") != DialogResult.Yes)
                    {
                        return;
                    }
                }

                KenchikuyotoMstListForm frm = new KenchikuyotoMstListForm();
                Program.mForm.ShowForm(frm);

            }
            catch (Exception ex)
            {
                TraceLog.ErrorWrite(MethodInfo.GetCurrentMethod(), ex.ToString());
                MessageForm.Show(MessageForm.DispModeType.Error, MessageResouce.MSGID_E00001, ex.Message);
            }
            finally
            {
                Cursor.Current = preCursor;
                TraceLog.EndWrite(MethodInfo.GetCurrentMethod());
            }
        }