Beispiel #1
0
        // F2ボタン(追加) クリック
        public override void btnF2_Click(object sender, RoutedEventArgs e)
        {
            if (GetUserControlFKey().btnF2.IsEnabled == false)
            {
                return;
            }

            //this.DataForm.CurrentIndex = this.DataForm.CurrentIndex + 1;
            _entityListD.Add(new EntityOrderD());
            this.DataForm.CurrentIndex = _entityListD.Count - 1;
            _entityListD[_entityListD.Count - 1]._rec_no = DataForm.CurrentIndex + 1;

            // コンボボックス初期選択
            List <string> lst;

            lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.BREAKDOWN_ID);
            _entityListD[_entityListD.Count - 1]._breakdown_nm = lst[0];
            lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.UNIT_ID);
            _entityListD[_entityListD.Count - 1]._unit_nm = lst[0];
            lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.TAX_DIVISION_ID);
            _entityListD[_entityListD.Count - 1]._tax_division_nm = lst[0];

            GetUserControlFKey().gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.New;

            this.recAdd.Visibility = System.Windows.Visibility.Visible;
        }
Beispiel #2
0
        private void SetInitCombo(ref EntityCondition entity)
        {
            // コンボボックス初期選択
            List <string> lst;

            lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.DISPLAY_DIVISION_ID);
            entity._display_division_nm = lst[1];
            entity._display_division_id = MeiNameList.GetID(MeiNameList.geNameKbn.BREAKDOWN_ID, lst[1]);
        }
        private void DataForm_ContentLoaded(object sender, DataFormContentLoadEventArgs e)
        {
            if (this.DataForm.CurrentIndex >= 1)
            {
                this.txtBefore.Foreground = new SolidColorBrush(Colors.Black);
            }
            else
            {
                this.txtBefore.Foreground = new SolidColorBrush(Colors.DarkGray);
            }
            if (this.DataForm.CurrentIndex < _entityListD.Count - 1)
            {
                this.txtNext.Foreground = new SolidColorBrush(Colors.Black);
            }
            else
            {
                this.txtNext.Foreground = new SolidColorBrush(Colors.DarkGray);
            }

            switch (GetUserControlFKey().gFunctionKeyEnable)
            {
            case Utl_FunctionKey.geFunctionKeyEnable.New:
                // 行番号設定
                _entityListD[DataForm.CurrentIndex]._rec_no = DataForm.CurrentIndex + 1;

                // コンボボックス初期選択
                List <string> lst;
                lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.BREAKDOWN_ID);
                _entityListD[DataForm.CurrentIndex]._breakdown_nm = lst[0];
                _entityListD[DataForm.CurrentIndex]._breakdown_id = MeiNameList.GetID(MeiNameList.geNameKbn.BREAKDOWN_ID, lst[0]);

                lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.DELIVER_DIVISION_ID);
                _entityListD[DataForm.CurrentIndex]._deliver_division_nm = lst[2];
                _entityListD[DataForm.CurrentIndex]._deliver_division_id = MeiNameList.GetID(MeiNameList.geNameKbn.DELIVER_DIVISION_ID, lst[2]);

                lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.UNIT_ID);
                _entityListD[DataForm.CurrentIndex]._unit_nm = lst[0];
                _entityListD[DataForm.CurrentIndex]._unit_id = MeiNameList.GetID(MeiNameList.geNameKbn.UNIT_ID, lst[0]);

                lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.TAX_DIVISION_ID);
                _entityListD[DataForm.CurrentIndex]._tax_division_nm = lst[0];
                _entityListD[DataForm.CurrentIndex]._tax_division_id = MeiNameList.GetID(MeiNameList.geNameKbn.TAX_DIVISION_ID, lst[0]);

                break;
            }

            if (_entityListD[DataForm.CurrentIndex]._order_id != 0)
            {
                this.recDel.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                this.recDel.Visibility = System.Windows.Visibility.Collapsed;
            }

            InitControl();
        }
Beispiel #4
0
        private void ConvertDetailToDataForm()
        {
            if (_entityListD == null)
            {
                // 行番号
                EntityOrderD entity = new EntityOrderD();
                entity._rec_no = 1;

                // コンボボックス初期選択
                List <string> lst;
                lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.BREAKDOWN_ID);
                entity._breakdown_nm = lst[0];
                lst                     = MeiNameList.GetListMei(MeiNameList.geNameKbn.UNIT_ID);
                entity._unit_nm         = lst[0];
                lst                     = MeiNameList.GetListMei(MeiNameList.geNameKbn.TAX_DIVISION_ID);
                entity._tax_division_nm = lst[0];

                _entityListD = new ObservableCollection <EntityOrderD>();
                _entityListD.Add(entity);

                return;
            }

            for (int i = 0; i <= _entityListD.Count - 1; i++)
            {
                objDataFormOrderD.Add(new EntityDataFormOrderD(_entityListD[i]._id,
                                                               _entityListD[i]._rec_no,
                                                               _entityListD[i]._breakdown_id,
                                                               _entityListD[i]._breakdown_nm,
                                                               _entityListD[i]._deliver_division_id,
                                                               _entityListD[i]._deliver_division_nm,
                                                               _entityListD[i]._commodity_id,
                                                               _entityListD[i]._commodity_name,
                                                               _entityListD[i]._unit_id,
                                                               _entityListD[i]._unit_nm,
                                                               _entityListD[i]._enter_number,
                                                               _entityListD[i]._case_number,
                                                               _entityListD[i]._number,
                                                               _entityListD[i]._unit_price,
                                                               _entityListD[i]._sales_cost,
                                                               _entityListD[i]._tax,
                                                               _entityListD[i]._no_tax_price,
                                                               _entityListD[i]._price,
                                                               _entityListD[i]._profits,
                                                               _entityListD[i]._profits_percent,
                                                               _entityListD[i]._memo,
                                                               _entityListD[i]._tax_division_id,
                                                               _entityListD[i]._tax_division_nm,
                                                               _entityListD[i]._tax_percent,
                                                               _entityListD[i]._inventory_management_division_id,
                                                               _entityListD[i]._inventory_number,
                                                               _entityListD[i]._retail_price_skip_tax,
                                                               _entityListD[i]._retail_price_before_tax,
                                                               _entityListD[i]._sales_unit_price_skip_tax,
                                                               _entityListD[i]._sales_unit_price_before_tax,
                                                               _entityListD[i]._sales_cost_price_skip_tax,
                                                               _entityListD[i]._sales_cost_price_before_tax,
                                                               _entityListD[i]._number_decimal_digit,
                                                               _entityListD[i]._unit_decimal_digit,
                                                               0,
                                                               0,
                                                               0
                                                               ));
            }
        }
Beispiel #5
0
        private void ConvertDetailToDataForm()
        {
            if (_entityListD == null)
            {
                // 行番号
                EntityPurchaseOrderD entity = new EntityPurchaseOrderD();
                entity._rec_no = 1;

                // コンボボックス初期選択
                List <string> lst;
                lst = MeiNameList.GetListMei(MeiNameList.geNameKbn.BREAKDOWN_ID);
                entity._breakdown_nm = lst[0];
                lst                     = MeiNameList.GetListMei(MeiNameList.geNameKbn.UNIT_ID);
                entity._unit_nm         = lst[0];
                lst                     = MeiNameList.GetListMei(MeiNameList.geNameKbn.TAX_DIVISION_ID);
                entity._tax_division_nm = lst[0];

                _entityListD = new ObservableCollection <EntityPurchaseOrderD>();
                _entityListD.Add(entity);

                return;
            }

            for (int i = 0; i <= _entityListD.Count - 1; i++)
            {
                EntityDataFormOrderD _entityDataFormOrderD = new EntityDataFormOrderD();
                _entityDataFormOrderD.id                  = _entityListD[i]._id;
                _entityDataFormOrderD.rec_no              = _entityListD[i]._rec_no;
                _entityDataFormOrderD.breakdown_id        = _entityListD[i]._breakdown_id;
                _entityDataFormOrderD.breakdown_nm        = _entityListD[i]._breakdown_nm;
                _entityDataFormOrderD.deliver_division_id = _entityListD[i]._deliver_division_id;
                _entityDataFormOrderD.deliver_division_nm = _entityListD[i]._deliver_division_nm;
                _entityDataFormOrderD.commodity_id        = _entityListD[i]._commodity_id;
                _entityDataFormOrderD.commodity_name      = _entityListD[i]._commodity_name;
                _entityDataFormOrderD.unit_id             = _entityListD[i]._unit_id;
                _entityDataFormOrderD.unit_nm             = _entityListD[i]._unit_nm;
                _entityDataFormOrderD.enter_number        = _entityListD[i]._enter_number;
                _entityDataFormOrderD.case_number         = _entityListD[i]._case_number;
                _entityDataFormOrderD.number              = _entityListD[i]._number;
                _entityDataFormOrderD.unit_price          = _entityListD[i]._unit_price;
                //_entityDataFormOrderD.sales_cost = _entityListD[i]._sales_cost;
                _entityDataFormOrderD.tax          = _entityListD[i]._tax;
                _entityDataFormOrderD.no_tax_price = _entityListD[i]._no_tax_price;
                _entityDataFormOrderD.price        = _entityListD[i]._price;
                //_entityDataFormOrderD.profits = _entityListD[i]._profits;
                //_entityDataFormOrderD.profits_percent = _entityListD[i]._profits_percent;
                _entityDataFormOrderD.memo            = _entityListD[i]._memo;
                _entityDataFormOrderD.tax_division_id = _entityListD[i]._tax_division_id;
                _entityDataFormOrderD.tax_division_nm = _entityListD[i]._tax_division_nm;
                _entityDataFormOrderD.tax_percent     = _entityListD[i]._tax_percent;
                _entityDataFormOrderD.inventory_management_division_id = _entityListD[i]._inventory_management_division_id;
                _entityDataFormOrderD.inventory_number               = _entityListD[i]._inventory_number;
                _entityDataFormOrderD.retail_price_skip_tax          = _entityListD[i]._retail_price_skip_tax;
                _entityDataFormOrderD.retail_price_before_tax        = _entityListD[i]._retail_price_before_tax;
                _entityDataFormOrderD.sales_unit_price_skip_tax      = _entityListD[i]._sales_unit_price_skip_tax;
                _entityDataFormOrderD.sales_unit_price_before_tax    = _entityListD[i]._sales_unit_price_before_tax;
                _entityDataFormOrderD.sales_cost_price_skip_tax      = _entityListD[i]._sales_cost_price_skip_tax;
                _entityDataFormOrderD.sales_cost_price_before_tax    = _entityListD[i]._sales_cost_price_before_tax;
                _entityDataFormOrderD.purchase_unit_price_skip_tax   = _entityListD[i]._purchase_unit_price_skip_tax;
                _entityDataFormOrderD.purchase_unit_price_before_tax = _entityListD[i]._purchase_unit_price_before_tax;
                _entityDataFormOrderD.number_decimal_digit           = _entityListD[i]._number_decimal_digit;
                _entityDataFormOrderD.unit_decimal_digit             = _entityListD[i]._unit_decimal_digit;

                objDataFormOrderD.Add(_entityDataFormOrderD);
            }
        }