private void SetBinding() { if (_entityPrm == null) { _entityPrm = new EntityInvoiceClosePrm(); } // マスタコントロールPropertyChanged _entityPrm.PropertyChanged += this.utlInvoice.MstID_Changed; _entityPrm.PropertyChanged += this.utlSummingUp.MstID_Changed; #region Bind // バインド Binding BindingInvoiceId = new Binding("_invoice_id"); BindingInvoiceId.Mode = BindingMode.TwoWay; BindingInvoiceId.Source = _entityPrm; this.utlInvoice.txtID.SetBinding(TextBox.TextProperty, BindingInvoiceId); Binding BindingInvoiceNm = new Binding("_invoice_nm"); BindingInvoiceNm.Mode = BindingMode.TwoWay; BindingInvoiceNm.Source = _entityPrm; this.utlInvoice.txtNm.SetBinding(TextBox.TextProperty, BindingInvoiceNm); 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("_invoice_yyyymmdd"); BindingInvoiceYmd.Mode = BindingMode.TwoWay; BindingInvoiceYmd.Source = _entityPrm; this.datInvoiceYmd.SetBinding(DatePicker.SelectedDateProperty, BindingInvoiceYmd); Binding BindingCollectPlanYmd = new Binding("_collect_plan_yyyymmdd"); BindingCollectPlanYmd.Mode = BindingMode.TwoWay; BindingCollectPlanYmd.Source = _entityPrm; this.datCollectPlanDay.SetBinding(DatePicker.SelectedDateProperty, BindingCollectPlanYmd); #endregion }
// F2ボタン(クリア) クリック public override void btnF2_Click(object sender, RoutedEventArgs e) { // 初期化 _entity = null; this.dg.ItemsSource = _entity; this.utlInvoice.IsEnabled = true; this.utlSummingUp.IsEnabled = true; this.datInvoiceYmd.IsEnabled = true; this.datCollectPlanDay.IsEnabled = true; _entityPrm = null; SetBinding(); ExBackgroundWorker.DoWork_Focus(this.utlInvoice.txtID, 10); utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init; // ロック解除 DataPgLock.gLockPg(PG_NM, "", (int)DataPgLock.geLockType.UnLock); }
private void GetInvoiceTotal(EntityInvoiceClosePrm entityPrm) { try { objClass = null; // 初期化 svcInvoiceCloseClient svc = new svcInvoiceCloseClient(); svc.GetInvoiceTotalCompleted += new EventHandler<GetInvoiceTotalCompletedEventArgs>(this.GetInvoiceTotalCompleted); svc.GetInvoiceTotalAsync(Common.gstrSessionString, entityPrm); } catch (Exception ex) { this.ProcessingDlgClose(); ExMessageBox.Show(CLASS_NM + ".GetInvoiceTotal" + Environment.NewLine + ex.ToString(), "エラー確認"); } }