예제 #1
0
 private void ButtonLast_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         datagetmode = DataGetMode.last;
         //取引先マスタ
         base.SendRequest(new CommunicationObject(MessageType.RequestData, TokGetData, null, 1));
     }
     catch (Exception)
     {
         return;
     }
 }
예제 #2
0
        private void ID変換_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                int old_ID = 0;
                if (this.MaintenanceMode == AppConst.MAINTENANCEMODE_EDIT)
                {
                    if (new_ID == 0 || new_ID == null)
                    {
                        return;
                    }
                    if (!int.TryParse(CustomerID, out old_ID))
                    {
                        MessageBox.Show("入力内容に誤りがあります。");
                        return;
                    }
                    var yesno = MessageBox.Show("IDを変更しますか?", "確認", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);
                    if (yesno == MessageBoxResult.No)
                    {
                        return;
                    }
                    base.SendRequest(new CommunicationObject(MessageType.RequestData, TokID_CHG, old_ID, new_ID));
                }
                else
                {
                    if (this.MaintenanceMode == AppConst.MAINTENANCEMODE_ADD)
                    {
                        int cstmid = 0;
                        try
                        {
                            cstmid = AppCommon.IntParse(new_ID.ToString());
                            if (cstmid == 0)
                            {
                                return;
                            }
                            //取引先マスタ
                            datagetmode = DataGetMode.number;
                            base.SendRequest(new CommunicationObject(MessageType.RequestData, RTokGetData, cstmid, 0));
                            return;
                        }
                        catch (Exception)
                        {
                            return;
                        }
                    }

                    MessageBox.Show("変換するデータを呼び出して下さい。");
                    //return;
                }
            }
        }
예제 #3
0
        private void CustomerCd_LostFocus(object sender, RoutedEventArgs e)
        {
            int cstmid = 0;

            try
            {
                cstmid = AppCommon.IntParse(this.CustomerID);
                //取引先マスタ
                datagetmode = DataGetMode.number;
                base.SendRequest(new CommunicationObject(MessageType.RequestData, TokGetData, cstmid, 0));
            }
            catch (Exception)
            {
                return;
            }
        }
예제 #4
0
        private void ButtonNext_Click(object sender, RoutedEventArgs e)
        {
            int cstmid = 0;

            try
            {
                datagetmode = DataGetMode.next;
                if (string.IsNullOrEmpty(this.CustomerID))
                {
                    base.SendRequest(new CommunicationObject(MessageType.RequestData, TokGetData, null, 0));
                }
                else
                {
                    cstmid = AppCommon.IntParse(this.CustomerID);
                    base.SendRequest(new CommunicationObject(MessageType.RequestData, TokGetData, cstmid, 1));
                }
            }
            catch (Exception)
            {
                return;
            }
        }
예제 #5
0
        /// <summary>
        /// 画面読み込み
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainWindow_Loaded_1(object sender, RoutedEventArgs e)
        {
            ScreenClear();

            #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;
            }
            #endregion
            入力者ID  = ccfg.ユーザID;
            frmcfg = (ConfigDLY08010)ucfg.GetConfigValue(typeof(ConfigDLY08010));
            if (frmcfg == null)
            {
                frmcfg = new ConfigDLY08010();
                ucfg.SetConfigValue(frmcfg);
            }
            else
            {
                //表示できるかチェック
                var WidthCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - frmcfg.Left;
                if (WidthCHK > 100)
                {
                    this.Left = frmcfg.Left;
                }
                //表示できるかチェック
                var HeightCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - frmcfg.Top;
                if (HeightCHK > 100)
                {
                    this.Top = frmcfg.Top;
                }
                this.Height = frmcfg.Height;
                this.Width  = frmcfg.Width;
            }

            #endregion

            番号通知区分   = frmcfg.番号通知区分;
            最終伝票表示区分 = frmcfg.最終伝票表示区分;

            // 初期状態を保存(SPREADリセット時にのみ使用する)
            this.spConfig  = AppCommon.SaveSpConfig(this.spNyukin);
            this.spConfig2 = AppCommon.SaveSpConfig(this.spOldNyukin);
            AppCommon.LoadSpConfig(this.spNyukin, this.spConfig);
            AppCommon.LoadSpConfig(this.spOldNyukin, this.spConfig2);
            base.MasterMaintenanceWindowList.Add("M01_TOK_TOKU_SCH", new List <Type> {
                null, typeof(SCH01010)
            });
            AppCommon.SetutpComboboxListToCell(this.spNyukin, "入金区分", "日次", "入金伝票入力", "入金区分", false);

            spNyukin.InputBindings.Add(new KeyBinding(spNyukin.NavigationCommands.MoveNext, Key.Enter, ModifierKeys.None));

            ButtonCellType btn1 = this.spNyukin.Columns[0].CellType as ButtonCellType;
            btn1.Command = new cmd売上削除(spNyukin);

            if (初期明細番号 != null)
            {
                DetailsNumber        = 初期明細番号;
                this.MaintenanceMode = AppConst.MAINTENANCEMODE_EDIT;
                GetMeisaiData();
                return;
            }

            ChangeKeyItemChangeable(true);

            if (最終伝票表示区分 == 1)
            {
                datagetmode = DataGetMode.last;
                base.SendRequest(new CommunicationObject(MessageType.RequestData, GetMeisaiNo, new object[] { 0, 3 }));
            }
        }
예제 #6
0
 private void LastIdButoon_Click(object sender, RoutedEventArgs e)
 {
     datagetmode = DataGetMode.last;
     base.SendRequest(new CommunicationObject(MessageType.RequestData, GetMeisaiNo, new object[] { 0, 3 }));
 }
예제 #7
0
 private void NextIdButton_Click(object sender, RoutedEventArgs e)
 {
     datagetmode = DataGetMode.next;
     base.SendRequest(new CommunicationObject(MessageType.RequestData, GetMeisaiNo, DetailsNumber, 2));
 }
예제 #8
0
 private void FirstIdButton_Click(object sender, RoutedEventArgs e)
 {
     datagetmode = DataGetMode.first;
     base.SendRequest(new CommunicationObject(MessageType.RequestData, GetMeisaiNo, 0, 0));
 }