private void SetBinding()
        {
            if (_entityPrm == null)
            {
                _entityPrm = new EntityPaymentClosePrm();
            }

            // マスタコントロールPropertyChanged
            _entityPrm.PropertyChanged += this.utlPurchase.MstID_Changed;
            _entityPrm.PropertyChanged += this.utlSummingUp.MstID_Changed;

            #region Bind

            // バインド
            Binding BindingPurchaseId = new Binding("_purchase_id");
            BindingPurchaseId.Mode   = BindingMode.TwoWay;
            BindingPurchaseId.Source = _entityPrm;
            this.utlPurchase.txtID.SetBinding(TextBox.TextProperty, BindingPurchaseId);

            Binding BindingPurchaseNm = new Binding("_purchase_nm");
            BindingPurchaseNm.Mode   = BindingMode.TwoWay;
            BindingPurchaseNm.Source = _entityPrm;
            this.utlPurchase.txtNm.SetBinding(TextBox.TextProperty, BindingPurchaseNm);

            Binding BindingSummingUpGroupId = new Binding("_summing_up_group_id");
            BindingSummingUpGroupId.Mode   = BindingMode.TwoWay;
            BindingSummingUpGroupId.Source = _entityPrm;
            this.utlSummingUp.txtID.SetBinding(TextBox.TextProperty, BindingSummingUpGroupId);

            Binding BindingSummingUpGroupNm = new Binding("_summing_up_group_nm");
            BindingSummingUpGroupNm.Mode   = BindingMode.TwoWay;
            BindingSummingUpGroupNm.Source = _entityPrm;
            this.utlSummingUp.txtNm.SetBinding(TextBox.TextProperty, BindingSummingUpGroupNm);

            Binding BindingInvoiceYmd = new Binding("_payment_yyyymmdd");
            BindingInvoiceYmd.Mode   = BindingMode.TwoWay;
            BindingInvoiceYmd.Source = _entityPrm;
            this.datPaymentYmd.SetBinding(DatePicker.SelectedDateProperty, BindingInvoiceYmd);

            Binding BindingPaymentPlanYmd = new Binding("_payment_plan_yyyymmdd");
            BindingPaymentPlanYmd.Mode   = BindingMode.TwoWay;
            BindingPaymentPlanYmd.Source = _entityPrm;
            this.datPaymentPlanDay.SetBinding(DatePicker.SelectedDateProperty, BindingPaymentPlanYmd);

            #endregion
        }
        // F2ボタン(クリア) クリック
        public override void btnF2_Click(object sender, RoutedEventArgs e)
        {
            // 初期化
            _entity             = null;
            this.dg.ItemsSource = _entity;

            this.utlPurchase.IsEnabled       = true;
            this.utlSummingUp.IsEnabled      = true;
            this.datPaymentYmd.IsEnabled     = true;
            this.datPaymentPlanDay.IsEnabled = true;

            _entityPrm = null;
            SetBinding();

            ExBackgroundWorker.DoWork_Focus(this.utlPurchase.txtID, 10);

            utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init;

            // ロック解除
            DataPgLock.gLockPg(PG_NM, "", (int)DataPgLock.geLockType.UnLock);
        }
        private void SetBinding()
        {
            if (_entityPrm == null)
            {
                _entityPrm = new EntityPaymentClosePrm();
            }

            // マスタコントロールPropertyChanged
            _entityPrm.PropertyChanged += this.utlPurchase.MstID_Changed;
            _entityPrm.PropertyChanged += this.utlSummingUp.MstID_Changed;

            #region Bind

            // バインド
            Binding BindingPurchaseId = new Binding("_purchase_id");
            BindingPurchaseId.Mode = BindingMode.TwoWay;
            BindingPurchaseId.Source = _entityPrm;
            this.utlPurchase.txtID.SetBinding(TextBox.TextProperty, BindingPurchaseId);

            Binding BindingPurchaseNm = new Binding("_purchase_nm");
            BindingPurchaseNm.Mode = BindingMode.TwoWay;
            BindingPurchaseNm.Source = _entityPrm;
            this.utlPurchase.txtNm.SetBinding(TextBox.TextProperty, BindingPurchaseNm);

            Binding BindingSummingUpGroupId = new Binding("_summing_up_group_id");
            BindingSummingUpGroupId.Mode = BindingMode.TwoWay;
            BindingSummingUpGroupId.Source = _entityPrm;
            this.utlSummingUp.txtID.SetBinding(TextBox.TextProperty, BindingSummingUpGroupId);

            Binding BindingSummingUpGroupNm = new Binding("_summing_up_group_nm");
            BindingSummingUpGroupNm.Mode = BindingMode.TwoWay;
            BindingSummingUpGroupNm.Source = _entityPrm;
            this.utlSummingUp.txtNm.SetBinding(TextBox.TextProperty, BindingSummingUpGroupNm);

            Binding BindingInvoiceYmd = new Binding("_payment_yyyymmdd");
            BindingInvoiceYmd.Mode = BindingMode.TwoWay;
            BindingInvoiceYmd.Source = _entityPrm;
            this.datPaymentYmd.SetBinding(DatePicker.SelectedDateProperty, BindingInvoiceYmd);

            Binding BindingPaymentPlanYmd = new Binding("_payment_plan_yyyymmdd");
            BindingPaymentPlanYmd.Mode = BindingMode.TwoWay;
            BindingPaymentPlanYmd.Source = _entityPrm;
            this.datPaymentPlanDay.SetBinding(DatePicker.SelectedDateProperty, BindingPaymentPlanYmd);

            #endregion
        }
 private void GetPaymentTotal(EntityPaymentClosePrm entityPrm)
 {
     try
     {
         objClass = null;   // 初期化
         svcPaymentCloseClient svc = new svcPaymentCloseClient();
         svc.GetPaymentTotalCompleted += new EventHandler<GetPaymentTotalCompletedEventArgs>(this.GetPaymentTotalCompleted);
         svc.GetPaymentTotalAsync(Common.gstrSessionString, entityPrm);
     }
     catch (Exception ex)
     {
         this.ProcessingDlgClose();
         ExMessageBox.Show(CLASS_NM + ".GetPaymentTotal" + Environment.NewLine + ex.ToString(), "エラー確認");
     }
 }
        // F2ボタン(クリア) クリック
        public override void btnF2_Click(object sender, RoutedEventArgs e)
        {
            // 初期化
            _entity = null;
            this.dg.ItemsSource = _entity;

            this.utlPurchase.IsEnabled = true;
            this.utlSummingUp.IsEnabled = true;
            this.datPaymentYmd.IsEnabled = true;
            this.datPaymentPlanDay.IsEnabled = true;

            _entityPrm = null;
            SetBinding();

            ExBackgroundWorker.DoWork_Focus(this.utlPurchase.txtID, 10);

            utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init;

            // ロック解除
            DataPgLock.gLockPg(PG_NM, "", (int)DataPgLock.geLockType.UnLock);
        }