示例#1
0
        /// <summary>
        /// F02 リボン マスタ編集
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void OnF2Key(object sender, KeyEventArgs e)
        {
            try
            {
                var elmnt   = FocusManager.GetFocusedElement(this);
                var spgrid  = ViewBaseCommon.FindVisualParent <GcSpreadGrid>(elmnt as Control);
                var m01Text = ViewBaseCommon.FindVisualParent <M01_TOK_TextBox>(elmnt as Control);

                if (spgrid != null)
                {
                    #region スプレッド内のイベント処理

                    switch (spgrid.ActiveColumnIndex)
                    {
                    case (int)GridColumnsMapping.取引先コード:
                    case (int)GridColumnsMapping.枝番:
                        MST01010 M01Form = new MST01010();
                        M01Form.Show(this);
                        break;

                    case (int)GridColumnsMapping.自社品番:
                        MST02010 M09Form = new MST02010();
                        M09Form.Show(this);

                        break;

                    default:
                        break;
                    }

                    #endregion
                }
                else if (m01Text != null)
                {
                    MST01010 m01Form = new MST01010();
                    m01Form.Show(this);
                }
                else
                {
                    ViewBaseCommon.CallMasterMainte(this.MasterMaintenanceWindowList);
                }
            }
            catch (Exception ex)
            {
                appLog.Error("マスターメンテナンス画面起動エラー", ex);
                this.ErrorMessage = "システムエラーです。サポートへご連絡ください。";
            }
        }
示例#2
0
        /// <summary>
        /// F02 リボン マスタ編集
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void OnF2Key(object sender, KeyEventArgs e)
        {
            try
            {
                var elmnt  = FocusManager.GetFocusedElement(this);
                var spgrid = ViewBaseCommon.FindVisualParent <GcSpreadGrid>(elmnt as Control);
                if (spgrid != null)
                {
                    #region スプレッド内のイベント処理

                    if (gridCtl.ActiveColumnIndex == (int)GridColumnsMapping.摘要)
                    {
                        // 摘要マスタ表示
                        MST08010 M11Form = new MST08010();
                        M11Form.Show(this);
                    }

                    #endregion
                }
                else
                {
                    var twinText = ViewBaseCommon.FindVisualParent <M01_TOK_TextBox>(elmnt as Control);

                    if (twinText == null)
                    {
                        ViewBaseCommon.CallMasterMainte(this.MasterMaintenanceWindowList);
                    }

                    else
                    {
                        // 取引先画面の表示
                        MST01010 mstForm = new MST01010();
                        mstForm.TORI_CODE.Text = twinText.Text1;
                        mstForm.TORI_EDA.Text  = twinText.Text2;

                        mstForm.ShowDialog(this);
                    }
                }
            }
            catch (Exception ex)
            {
                appLog.Error("マスターメンテナンス画面起動エラー", ex);
                this.ErrorMessage = "システムエラーです。サポートへご連絡ください。";
            }
        }