Ejemplo n.º 1
0
        private void searchDlg_Closed(object sender, EventArgs e)
        {
            try
            {
                Dlg_MstSearch dlg = (Dlg_MstSearch)sender;
                if (dlg.DialogResult == true)
                {
                    string zip = Dlg_MstSearch.this_id;
                    zip = String.Format("{0:0000000}", ExCast.zCDbl(zip));
                    this.txtZipNo1.Text  = zip.Substring(0, 3);
                    this.txtZipNo2.Text  = zip.Substring(3, 4);
                    this.txtAdress1.Text = Dlg_MstSearch.this_attribute1 + Dlg_MstSearch.this_attribute2 + Dlg_MstSearch.this_attribute3;
                    this.txtAdress2.Text = "";
                    this.predecture_Name = Dlg_MstSearch.this_attribute1;
                    this.city_Name       = Dlg_MstSearch.this_attribute2;
                    this.town_Name       = Dlg_MstSearch.this_attribute3;

                    this.UserControlAdress1 = this.txtAdress1.Text;
                    this.UserControlAdress2 = this.txtAdress2.Text;

                    // 次コントロールフォーカスセット
                    ExVisualTreeHelper.FoucsNextControl(this);
                }
                else
                {
                    this.txtZipNo1.Focus();
                }
            }
            finally
            {
                this.IsSearchDlgOpen = false;
            }
        }
Ejemplo n.º 2
0
        // F12ボタン(キャンセル) クリック
        public override void btnF12_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
            Dlg_MstSearch win = (Dlg_MstSearch)ExVisualTreeHelper.FindPerentChildWindow(this);

            win.Close();
        }
Ejemplo n.º 3
0
        // F1ボタン(OK) クリック
        public override void btnF1_Click(object sender, RoutedEventArgs e)
        {
            if (objMstList == null)
            {
                ExMessageBox.Show("データが登録されていません。");
                return;
            }
            if (objMstList.Count == 0)
            {
                ExMessageBox.Show("データが登録されていません。");
                return;
            }

            int intIndex = this.dg.SelectedIndex;

            if (intIndex < 0)
            {
                ExMessageBox.Show("行が選択されていません。");
                return;
            }

            this.Id           = objMstList[intIndex].id;
            this.name         = objMstList[intIndex].name;
            this.attribute1   = objMstList[intIndex].attribute1;
            this.attribute2   = objMstList[intIndex].attribute2;
            this.attribute3   = objMstList[intIndex].attribute3;
            this.DialogResult = true;

            Dlg_MstSearch win = (Dlg_MstSearch)ExVisualTreeHelper.FindPerentChildWindow(this);

            win.Close();
        }
        private void btnSalesBalance_Click(object sender, RoutedEventArgs e)
        {
            Dlg_MstSearch searchDlg = new Dlg_MstSearch(MstData.geMDataKbn.PaymentBalance);

            searchDlg.MstKbn       = Class.Data.MstData.geMDataKbn.PaymentBalance;
            searchDlg.MstGroupKbn  = Class.Data.MstData.geMGroupKbn.None;
            searchDlg.txtCode.Text = this.utlID.txtID.Text.Trim();
            searchDlg.Show();
        }
Ejemplo n.º 5
0
        private void txtZipNo2_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (this.IsSearchDlgOpen == true)
            {
                return;
            }

            searchDlg        = new Dlg_MstSearch(MstData.geMDataKbn.Zip);
            searchDlg.MstKbn = MstData.geMDataKbn.Zip;
            searchDlg.Show();
            this.IsSearchDlgOpen = true;
            searchDlg.Closed    += searchDlg_Closed;
        }
        private void btnInventory_Click(object sender, RoutedEventArgs e)
        {
            if (ExCast.zCStr(utlID.txtID.Text.Trim()) != "")
            {
            }
            else
            {
                ExMessageBox.Show("商品を選択して下さい。");
                return;
            }

            Dlg_MstSearch searchDlg = new Dlg_MstSearch(MstData.geMDataKbn.Inventory);

            searchDlg.MstKbn       = Class.Data.MstData.geMDataKbn.Inventory;
            searchDlg.MstGroupKbn  = Class.Data.MstData.geMGroupKbn.None;
            searchDlg.txtCode.Text = ExCast.zNumZeroNothingFormat(ExCast.zCStr(utlID.txtID.Text.Trim()));
            searchDlg.Show();
        }
Ejemplo n.º 7
0
        private void txtReceiptDivisionId_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            beforeValueDlg = "";
            if (_entityListD.Count >= DataForm.CurrentIndex)
            {
                beforeValueDlg = _entityListD[DataForm.CurrentIndex]._receipt_division_id;
            }

            if (_txtReceiptDivisionId == null)
            {
                _txtReceiptDivisionId = ExVisualTreeHelper.FindTextBox(this.DataForm, "txtReceiptDivisionId");
            }

            Dlg_MstSearch searchDlg = new Dlg_MstSearch();

            searchDlg.MstKbn = MstData.geMDataKbn.RecieptDivision;
            searchDlg.Show();
            searchDlg.Closed += searchDlg_Closed;
        }
Ejemplo n.º 8
0
        private void searchDlg_Closed(object sender, EventArgs e)
        {
            Dlg_MstSearch dlg = (Dlg_MstSearch)sender;

            if (Dlg_MstSearch.this_DialogResult == true)
            {
                if (_entityListD.Count > DataForm.CurrentIndex && DataForm.CurrentIndex != -1)
                {
                    _entityListD[DataForm.CurrentIndex]._receipt_division_id = Dlg_MstSearch.this_id;
                    _entityListD[DataForm.CurrentIndex]._receipt_division_nm = Dlg_MstSearch.this_name;
                }
            }
            if (_entityListD.Count > DataForm.CurrentIndex && DataForm.CurrentIndex != -1)
            {
                if (beforeValueDlg != _entityListD[DataForm.CurrentIndex]._receipt_division_id)
                {
                    MstData _mstData = new MstData();
                    _mstData.GetMData(MstData.geMDataKbn.RecieptDivision, new string[] { _entityListD[DataForm.CurrentIndex]._receipt_division_id }, this);
                    this.Focus();
                    _txtReceiptDivisionNm.Focus();
                    _txtReceiptDivisionId = null;
                }
            }
        }
Ejemplo n.º 9
0
        private void searchDlg_Closed(object sender, EventArgs e)
        {
            Dlg_MstSearch dlg = (Dlg_MstSearch)sender;

            if (Dlg_MstSearch.this_DialogResult == true)
            {
                if (_entityListD.Count > DataForm.CurrentIndex && DataForm.CurrentIndex != -1)
                {
                    _entityListD[DataForm.CurrentIndex]._commodity_id   = Dlg_MstSearch.this_id;
                    _entityListD[DataForm.CurrentIndex]._commodity_name = Dlg_MstSearch.this_name;
                }
            }
            if (_entityListD.Count > DataForm.CurrentIndex && DataForm.CurrentIndex != -1)
            {
                if (beforeValueDlg != _entityListD[DataForm.CurrentIndex]._commodity_id)
                {
                    MstData _mstData = new MstData();
                    _mstData.GetMData(MstData.geMDataKbn.Commodity, new string[] { _entityListD[DataForm.CurrentIndex]._commodity_id }, this);
                    this.Focus();
                    _txtGoodsId.Focus();
                    _txtGoodsId = null;
                }
            }
        }