// データ取得コールバック呼出 public override void DataSelect(int intKbn, object objList) { switch ((ExWebService.geWebServiceCallKbn)intKbn) { #region 出金 // ヘッダ case _GetHeadWebServiceCallKbn: // 更新 if (objList != null) { _entityH = (EntityPaymentCashH)objList; // エラー発生時 if (_entityH._message != "" && _entityH._message != null) { webService.ProcessingDlgClose(); this.utlNo.txtID.Text = ""; return; } // バインド反映 SetBinding(); // 明細データ取得 GetDetailData(_entityH._id); } // 新規 else { //// 明細追加 //this.btnF7_Click(null, null); //this.dg.ItemsSource = _entityListD; //webService.ProcessingDlgClose(); //this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.New; //this.utlNo.txtID_IsReadOnly = true; webService.ProcessingDlgClose(); this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.New; SetDatePickerNotEnabled(); this.utlNo.txtID_IsReadOnly = false; } ExBackgroundWorker.DoWork_Focus(this.datPaymentCashYmd, 10); break; // 明細 case _GetDetailWebServiceCallKbn: // 2回設定がかかりエラーになる為 try { this.dg.ItemsSource = null; } catch { return; } if (objList != null) { _entityListD = (ObservableCollection<EntityPaymentCashD>)objList; } else { _entityListD = null; } // 明細追加 this.btnF7_Click(null, null); this.dg.ItemsSource = _entityListD; // 前回情報保持 ConvertBeforeData(_entityH, _before_entityH); if (_entityH._lock_flg == 0) { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Upd; SetDatePickerNotEnabled(); } else { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Sel; SetDatePickerNotEnabled(); } // 明細再計算 DetailSumPrice(); // 支払番号指定時、仕入先は変更不可 if (!string.IsNullOrEmpty(this.utlPaymentNo.txtID.Text.Trim())) { this.utlPurchase.txtID.IsEnabled = false; } ExBackgroundWorker.DoWork_Focus(this.datPaymentCashYmd, 10); this.utlNo.txtID_IsReadOnly = true; //this.utlNo.IsEnabled = false; break; #endregion #region 支払出金 // 支払出金 case ExWebService.geWebServiceCallKbn.GetPaymentCashOut: // 更新 if (objList != null) { _entityPaymentCashOut = (EntityPaymentCashOut)objList; // エラー発生時 if (_entityPaymentCashOut.message != "" && _entityPaymentCashOut.message != null) { webService.ProcessingDlgClose(); this.utlPaymentNo.txtID.Text = ""; _entityH._payment_no = 0; _entityH._payment_kbn = 0; _entityH._payment_kbn_nm = ""; _entityH._summing_up_group_id = ""; _entityH._summing_up_group_nm = ""; _entityH._payment_yyyymmdd = ""; _entityH._payment_plan_day = ""; _entityH._payment_price = 0; _entityH._before_payment_cash_price = 0; DetailSumPrice(); this.utlPurchase.txtID.IsEnabled = true; ExBackgroundWorker.DoWork_Focus(this.utlPaymentNo.txtID, 10); return; } // 2回設定がかかりエラーになる為 try { this.dg.ItemsSource = null; } catch { return; } _entityH._payment_no = _entityPaymentCashOut._no; this.utlPurchase.txtID.Text = _entityPaymentCashOut._purchase_id; _entityH._purchase_id = _entityPaymentCashOut._purchase_id; _entityH._purchase_name = _entityPaymentCashOut._purchase_nm; _entityH._payment_kbn = _entityPaymentCashOut._payment_kbn; _entityH._payment_kbn_nm = _entityPaymentCashOut._payment_kbn_nm; _entityH._summing_up_group_id = _entityPaymentCashOut._summing_up_group_id; _entityH._summing_up_group_nm = _entityPaymentCashOut._summing_up_group_nm; _entityH._payment_yyyymmdd = _entityPaymentCashOut._payment_close_yyyymmdd; _entityH._payment_plan_day = _entityPaymentCashOut._payment_plan_day; _entityH._payment_price = _entityPaymentCashOut._payment_price; _entityH._before_payment_cash_price = _entityPaymentCashOut._before_payment_cash_price; _entityH._before_credit_price = _entityPaymentCashOut._credit_price; _entityH._credit_price = _entityPaymentCashOut._credit_price; _entityH._payment_division_id = _entityPaymentCashOut._payment_division_id; _entityH._payment_division_nm = _entityPaymentCashOut._payment_division_nm; // バインド反映 SetBinding(); // 前回情報保持 ConvertBeforeData(_entityH, _before_entityH); _entityListD = null; _entityListD = new ObservableCollection<EntityPaymentCashD>(); EntityPaymentCashD entity = new EntityPaymentCashD(); entity._rec_no = 1; entity._payment_cash_division_id = this._entityH._payment_division_id; entity._payment_cash_division_nm = this._entityH._payment_division_nm; _entityListD.Add(entity); DetailSumPrice(); this._entityListD[0]._price = ExCast.zCDbl(this.txtPaymentZanPrice.Text); this._entityListD[0]._payment_cash_division_id = _entityH._payment_division_id; this._entityListD[0]._payment_cash_division_nm = _entityH._payment_division_nm; this.dg.ItemsSource = null; this.dg.ItemsSource = this._entityListD; DetailSumPrice(); // 支払番号指定時、仕入先は変更不可 this.utlPurchase.txtID.IsEnabled = false; ExBackgroundWorker.DoWork_Focus(this.txtMemo, 10); } else { MessageBox.Show("支払番号:" + this.utlPaymentNo.txtID.Text + " は存在しません。"); webService.ProcessingDlgClose(); this.utlPaymentNo.txtID.Text = ""; _entityH._payment_no = 0; _entityH._payment_kbn = 0; _entityH._payment_kbn_nm = ""; _entityH._summing_up_group_id = ""; _entityH._summing_up_group_nm = ""; _entityH._payment_yyyymmdd = ""; _entityH._payment_plan_day = ""; _entityH._payment_price = 0; _entityH._before_payment_cash_price = 0; DetailSumPrice(); ExBackgroundWorker.DoWork_Focus(this.utlPaymentNo.txtID, 10); this.utlPurchase.txtID.IsEnabled = true; } break; #endregion default: break; } }
private void GetPaymentCashOutCompleted(Object sender, GetPaymentCashOutCompletedEventArgs e) { try { objPaymentCashOut = e.Result; if (DialogCloseFlg == geDialogCloseFlg.Yes & win != null) { win.Close(); win = null; } if (objPaymentCashOut != null) { if (objPaymentCashOut.message != "" && objPaymentCashOut.message != null) { // 認証失敗 ExMessageBox.Show(objPaymentCashOut.message); objPerent.DataSelect((int)geWebServiceCallKbn.GetPaymentCashOut, (object)objPaymentCashOut); } else { // 認証成功 objPerent.DataSelect((int)geWebServiceCallKbn.GetPaymentCashOut, (object)objPaymentCashOut); } } else { objPerent.DataSelect((int)geWebServiceCallKbn.GetPaymentCashOut, null); } } catch (Exception ex) { this.ProcessingDlgClose(); ExMessageBox.Show(CLASS_NM + ".GetPaymentCashOutCompleted" + Environment.NewLine + ex.ToString(), "エラー確認"); } finally { if (DialogCloseFlg == geDialogCloseFlg.Yes & win != null) { win.Close(); win = null; } } }
private void GetPaymentCashOut(long _No) { _entityPaymentCashOut = null; object[] prm = new object[2]; prm[0] = _No.ToString(); prm[1] = ExCast.zCLng(this.utlNo.txtID.Text.Trim()); webService.objPerent = this; webService.CallWebService(ExWebService.geWebServiceCallKbn.GetPaymentCashOut, ExWebService.geDialogDisplayFlg.Yes, ExWebService.geDialogCloseFlg.Yes, prm); }
private void GetPaymentCashOut(long paymentNo, long paymentCashNo) { try { objPaymentCashOut = null; // 初期化 svcPaymentCloseClient svc = new svcPaymentCloseClient(); svc.GetPaymentCashOutCompleted += new EventHandler<GetPaymentCashOutCompletedEventArgs>(this.GetPaymentCashOutCompleted); svc.GetPaymentCashOutAsync(Common.gstrSessionString, paymentNo, paymentCashNo); } catch (Exception ex) { this.ProcessingDlgClose(); ExMessageBox.Show(CLASS_NM + ".GetPaymentCashOut" + Environment.NewLine + ex.ToString(), "エラー確認"); } }