Beispiel #1
0
        /// <summary>
        /// Loadイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            this.sp確定データ一覧.RowCount = 0;
            //this.spConfig = AppCommon.SaveSpConfig(this.sp確定データ一覧);

            #region 設定項目取得
            ucfg   = AppCommon.GetConfig(this);
            frmcfg = (ConfigTKS90010)ucfg.GetConfigValue(typeof(ConfigTKS90010));
            if (frmcfg == null)
            {
                frmcfg = new ConfigTKS90010();
                ucfg.SetConfigValue(frmcfg);
                frmcfg.spConfig = this.spConfig;
            }
            else
            {
                //表示できるかチェック
                var WidthCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - frmcfg.Left;
                if (WidthCHK > 10)
                {
                    this.Left = frmcfg.Left;
                }
                //表示できるかチェック
                var HeightCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - frmcfg.Top;
                if (HeightCHK > 10)
                {
                    this.Top = frmcfg.Top;
                }
                this.Width  = frmcfg.Width;
                this.Height = frmcfg.Height;
            }

            // 権限設定を呼び出す(ucfgを取得した後のに入れる)
            ccfg = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig));
            // 登録ボタン設定
            if (!権限Get.Authority_Update_Button(ccfg, this.GetType().Name))
            {
                DataUpdateVisible = System.Windows.Visibility.Hidden;
            }

            if (frmcfg.spConfig != null)
            {
                //AppCommon.LoadSpConfig(this.sp確定データ一覧, frmcfg.spConfig);
            }

            #endregion

            base.MasterMaintenanceWindowList.Add("M70_JIS", new List <Type> {
                typeof(MST16010), typeof(SCHM70_JIS)
            });

            ButtonCellType btn = this.sp確定データ一覧.Columns[(int)GridColumnsMapping.確定ボタン].CellType as ButtonCellType;
            btn.Command = new cmd確定日登録(sp確定データ一覧);
            gridCtl     = new GcSpreadGridController(sp確定データ一覧);

            this.MyCompany.Text1           = ccfg.自社コード.ToString();
            this.MyCompany.Text1IsReadOnly = (ccfg.自社販社区分 != 0);

            ScreenClear();
        }
Beispiel #2
0
        /// <summary>
        /// 画面読み込み
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            // 初期状態を保存(SPREADリセット時にのみ使用する)
            this.sp_Config = AppCommon.SaveSpConfig(this.spGridList);

            base.SendRequest(new CommunicationObject(MessageType.RequestData, MST03011_GetMasterDataSet, null));

            #region 設定項目取得
            ucfg   = AppCommon.GetConfig(this);
            ccfg   = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig));
            frmcfg = (ConfigMST03011)ucfg.GetConfigValue(typeof(ConfigMST03011));
            if (frmcfg == null)
            {
                frmcfg = new ConfigMST03011();
                ucfg.SetConfigValue(frmcfg);
                frmcfg.spConfig20180118 = this.sp_Config;
            }
            else
            {
                // 表示できるかチェック
                var WidthCHK = WinForms.Screen.PrimaryScreen.Bounds.Width - frmcfg.Left;
                if (WidthCHK > 10)
                {
                    this.Left = frmcfg.Left;
                }
                // 表示できるかチェック
                var HeightCHK = WinForms.Screen.PrimaryScreen.Bounds.Height - frmcfg.Top;
                if (HeightCHK > 10)
                {
                    this.Top = frmcfg.Top;
                }
                this.Height = frmcfg.Height;
                this.Width  = frmcfg.Width;
            }
            #endregion

            base.MasterMaintenanceWindowList.Add("M14_BRAND", new List <Type> {
                typeof(MST04020), typeof(SCHM14_BRAND)
            });
            base.MasterMaintenanceWindowList.Add("M15_SERIES", new List <Type> {
                typeof(MST04021), typeof(SCHM15_SERIES)
            });
            base.MasterMaintenanceWindowList.Add("M16_HINGUN", new List <Type> {
                typeof(MST04022), typeof(SCHM16_HINGUN)
            });

            ScreenClear();

            spGridList.InputBindings.Add(new KeyBinding(spGridList.NavigationCommands.MoveNext, Key.Enter, ModifierKeys.None));
            spGridList.RowCount = 0;

            // グリッドコントローラ設定
            gridDtl = new GcSpreadGridController(spGridList);

            SetFocusToTopControl();
            ErrorMessage = "";

            // フォーカス設定
            cmb_商品分類.Focus();
        }
Beispiel #3
0
        /// <summary>
        /// 画面が表示された後のイベント処理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Window_Loaded(object sender, RoutedEventArgs e)
        {
            #region 画面初期設定(権限設定等)
            ucfg   = AppCommon.GetConfig(this);
            frmcfg = (ConfigDLY01020)ucfg.GetConfigValue(typeof(ConfigDLY01020));

            // 権限設定を呼び出す(ucfgを取得した後のに入れる)
            ccfg = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig));
            // 登録ボタン設定
            if (!権限Get.Authority_Update_Button(ccfg, this.GetType().Name))
            {
                DataUpdateVisible = System.Windows.Visibility.Hidden;
            }

            if (frmcfg == null)
            {
                frmcfg = new ConfigDLY01020();
                // 画面サイズをタスクバーをのぞいた状態で表示させる
                //this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Height - this.Top;
            }
            else
            {
                this.Top    = frmcfg.Top;
                this.Left   = frmcfg.Left;
                this.Height = frmcfg.Height;
                this.Width  = frmcfg.Width;
            }

            #endregion

            base.MasterMaintenanceWindowList.Add("M01_TOK", new List <Type> {
                typeof(MST01010), typeof(SCHM01_TOK)
            });
            base.MasterMaintenanceWindowList.Add("M09_HIN", new List <Type> {
                typeof(MST02010), typeof(SCHM09_HIN)
            });
            base.MasterMaintenanceWindowList.Add("M11_TEK", new List <Type> {
                typeof(MST08010), typeof(SCHM11_TEK)
            });
            base.MasterMaintenanceWindowList.Add("M70_JIS", new List <Type> {
                typeof(MST16010), typeof(SCHM70_JIS)
            });

            AppCommon.SetutpComboboxList(this.c仕入区分, false);
            gridCtl = new GcSpreadGridController(gcSpreadGrid);

            ScreenClear();
            ChangeKeyItemChangeable(true);

            // ログインユーザの自社区分によりコントロール状態切換え
            this.c会社名.Text1     = ccfg.自社コード.ToString();
            this.c会社名.IsEnabled = ccfg.自社販社区分.Equals((int)自社販社区分.自社);

            gridCtl.SetCellFocus(0, (int)GridColumnsMapping.自社品番);
            this.c伝票番号.Focus();
        }
Beispiel #4
0
 /// <summary>
 /// spGridList_PreviewKeyDownイベント処理
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void spGridList_PreviewKeyDown(object sender, KeyEventArgs e)
 {
     // Enterキー押下でフォーカスを右に移動する
     if (e.Key == Key.Enter)
     {
         GcSpreadGridController gridCtl = new GcSpreadGridController(spGridList);
         int rowIdx = gridCtl.ActiveRowIndex;
         if (gridCtl.ActiveColumnIndex == (int)GridColumnsMapping.適正数量)
         {
             spGridList.ActiveCellPosition = new CellPosition(rowIdx, (int)GridColumnsMapping.適正数量 + 1);
         }
     }
 }
Beispiel #5
0
        /// <summary>
        /// 編集有無のチェック
        /// </summary>
        /// <returns>true:編集あり/false:編集なし</returns>
        private bool IsModify()
        {
            // 明細部の編集中を確定
            spGridList.CommitCellEdit();
            GcSpreadGridController gridCtl = new GcSpreadGridController(spGridList);

            SearchResult.Rows[gridCtl.ActiveRowIndex].EndEdit();

            // 編集有無のチェック
            var mod = SearchResult.AsEnumerable()
                      .Where(w => w.RowState == DataRowState.Modified);

            if (mod.Any())
            {
                // 編集あり
                return(true);
            }

            return(false);
        }
Beispiel #6
0
        /// <summary>
        /// ロードイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Window_Loaded(object sender, RoutedEventArgs e)
        {
            #region 設定項目取得
            ucfg = AppCommon.GetConfig(this);
            ccfg = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig));

            #region "権限関係"

            // 登録ボタン設定
            if (!権限Get.Authority_Update_Button(ccfg, this.GetType().Name))
            {
                // RibbonWindowViewBaseのプロパティに設定
                DataUpdateVisible = System.Windows.Visibility.Hidden;
            }

            frmcfg = (ConfigDLY02011)ucfg.GetConfigValue(typeof(ConfigDLY02011));

            #endregion

            if (frmcfg == null)
            {
                frmcfg = new ConfigDLY02011();
                ucfg.SetConfigValue(frmcfg);
                //画面サイズをタスクバーをのぞいた状態で表示させる
                //this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Height;
            }
            else
            {
                //表示できるかチェック
                var WidthCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - frmcfg.Left;
                if (WidthCHK > 10)
                {
                    this.Left = frmcfg.Left;
                }
                //表示できるかチェック
                var HeightCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - frmcfg.Top;
                if (HeightCHK > 10)
                {
                    this.Top = frmcfg.Top;
                }
                this.Width  = frmcfg.Width;
                this.Height = frmcfg.Height;
            }

            #endregion

            // 検索画面情報を設定
            base.MasterMaintenanceWindowList.Add("M01_TOK", new List <Type> {
                typeof(MST01010), typeof(SCHM01_TOK)
            });
            base.MasterMaintenanceWindowList.Add("M09_HIN_SET", new List <Type> {
                typeof(MST02010), typeof(SCHM09_HIN)
            });
            base.MasterMaintenanceWindowList.Add("M11_TEK", new List <Type> {
                typeof(MST08010), typeof(SCHM11_TEK)
            });
            base.MasterMaintenanceWindowList.Add("M70_JIS", new List <Type> {
                typeof(MST16010), typeof(SCHM70_JIS)
            });

            // グリッドコントローラ設定
            gridDtl = new GcSpreadGridController(gcDetailSpreadGrid);
            gridDtb = new GcSpreadGridController(gcInnerSpreadGrid);

            // セット品情報を取得
            sendSearchForShin(SearchDetail.Rows[0]["品番コード"].ToString());

            // 画面初期化 
            ScreenClear();

            // 入力可否切り替え
            ChangeKeyItemChangeable(false);

            gcDetailSpreadGrid.IsEnabled = false;

            if (this.MaintenanceMode == AppConst.MAINTENANCEMODE_EDIT)
            {
                // ボタン押下不可
                SetDispRibbonEnabled(false);
                // Spread入力不可
                SetDispInnerSpreadGridLocked(true);
            }
            else if (this.MaintenanceMode == AppConst.MAINTENANCEMODE_ADD)
            {
                // Spread入力不可
                SetDispInnerSpreadGridLocked(false);                // No.424 Add
            }

            // フォーカス設定
            gcInnerSpreadGrid.Focus();                              // No.425 Add
            gridDtl.SetCellFocus(0, 0);
        }
Beispiel #7
0
        /// <summary>
        /// ロードイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Window_Loaded(object sender, RoutedEventArgs e)
        {
            #region 設定項目取得
            ucfg = AppCommon.GetConfig(this);
            ccfg = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig));

            #region "権限関係"

            // 登録ボタン設定
            if (!権限Get.Authority_Update_Button(ccfg, this.GetType().Name))
            {
                // RibbonWindowViewBaseのプロパティに設定
                DataUpdateVisible = System.Windows.Visibility.Hidden;
            }

            frmcfg = (ConfigDLY03020)ucfg.GetConfigValue(typeof(ConfigDLY03020));

            #endregion

            if (frmcfg == null)
            {
                frmcfg = new ConfigDLY03020();
                ucfg.SetConfigValue(frmcfg);
                //画面サイズをタスクバーをのぞいた状態で表示させる
                //this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Height;
            }
            else
            {
                //表示できるかチェック
                var WidthCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - frmcfg.Left;
                if (WidthCHK > 10)
                {
                    this.Left = frmcfg.Left;
                }
                //表示できるかチェック
                var HeightCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - frmcfg.Top;
                if (HeightCHK > 10)
                {
                    this.Top = frmcfg.Top;
                }
                this.Width  = frmcfg.Width;
                this.Height = frmcfg.Height;
            }

            #endregion

            // 検索画面情報を設定
            base.MasterMaintenanceWindowList.Add("M01_TOK", new List <Type> {
                typeof(MST01010), typeof(SCHM01_TOK)
            });
            base.MasterMaintenanceWindowList.Add("M09_HIN", new List <Type> {
                typeof(MST02010), typeof(SCHM09_HIN)
            });
            base.MasterMaintenanceWindowList.Add("M11_TEK", new List <Type> {
                typeof(MST08010), typeof(SCHM11_TEK)
            });
            base.MasterMaintenanceWindowList.Add("M70_JIS", new List <Type> {
                typeof(MST16010), typeof(SCHM70_JIS)
            });
            base.MasterMaintenanceWindowList.Add("M21_SYUK", new List <Type> {
                typeof(MST01020), typeof(SCHM21_SYUK)
            });
            base.MasterMaintenanceWindowList.Add("M22_SOUK", new List <Type> {
                typeof(MST12020), typeof(SCHM22_SOUK)
            });

            // コンボデータ取得
            AppCommon.SetutpComboboxList(this.cmb伝票要否, false);
            AppCommon.SetutpComboboxList(this.cmb売上区分, false);
            gridCtl = new GcSpreadGridController(gcSpreadGrid);

            ScreenClear();
            ChangeKeyItemChangeable(true);

            // ログインユーザの自社区分によりコントロール状態切換え
            this.txt自社名.Text1     = ccfg.自社コード.ToString();
            this.txt自社名.IsEnabled = ccfg.自社販社区分.Equals((int)自社販社区分.自社);

            this.txt伝票番号.Focus();
        }