private void GetPaymentCashInCompleted(Object sender, GetPaymentCashInCompletedEventArgs e) { try { objInvocieReceipt = e.Result; if (DialogCloseFlg == geDialogCloseFlg.Yes & win != null) { win.Close(); win = null; } if (objInvocieReceipt != null) { if (objInvocieReceipt.message != "" && objInvocieReceipt.message != null) { // 認証失敗 ExMessageBox.Show(objInvocieReceipt.message); objPerent.DataSelect((int)geWebServiceCallKbn.GetInvocieReceipt, (object)objInvocieReceipt); } else { // 認証成功 objPerent.DataSelect((int)geWebServiceCallKbn.GetInvocieReceipt, (object)objInvocieReceipt); } } else { objPerent.DataSelect((int)geWebServiceCallKbn.GetInvocieReceipt, null); } } catch (Exception ex) { this.ProcessingDlgClose(); ExMessageBox.Show(CLASS_NM + ".GetInvocieReceiptCompleted" + Environment.NewLine + ex.ToString(), "エラー確認"); } finally { if (DialogCloseFlg == geDialogCloseFlg.Yes & win != null) { win.Close(); win = null; } } }
// データ取得コールバック呼出 public override void DataSelect(int intKbn, object objList) { switch ((ExWebService.geWebServiceCallKbn)intKbn) { #region 入金 // ヘッダ case _GetHeadWebServiceCallKbn: // 更新 if (objList != null) { _entityH = (EntityReceiptH)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.datReceiptYmd, 10); break; // 明細 case _GetDetailWebServiceCallKbn: // 2回設定がかかりエラーになる為 try { this.dg.ItemsSource = null; } catch { return; } if (objList != null) { _entityListD = (ObservableCollection<EntityReceiptD>)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.utlInvoiceNo.txtID.Text.Trim())) { this.utlInvoice.txtID.IsEnabled = false; } ExBackgroundWorker.DoWork_Focus(this.datReceiptYmd, 10); this.utlNo.txtID_IsReadOnly = true; //this.utlNo.IsEnabled = false; break; #endregion #region 請求入金 // 請求入金 case ExWebService.geWebServiceCallKbn.GetInvocieReceipt: // 更新 if (objList != null) { _entityInvoiceReceipt = (EntityInvoiceReceipt)objList; // エラー発生時 if (_entityInvoiceReceipt.message != "" && _entityInvoiceReceipt.message != null) { webService.ProcessingDlgClose(); this.utlInvoiceNo.txtID.Text = ""; _entityH._invoice_no = 0; _entityH._invoice_kbn = 0; _entityH._invoice_kbn_nm = ""; _entityH._summing_up_group_id = ""; _entityH._summing_up_group_nm = ""; _entityH._invoice_yyyymmdd = ""; _entityH._collect_plan_day = ""; _entityH._invoice_price = 0; _entityH._before_receipt_price = 0; DetailSumPrice(); this.utlInvoice.txtID.IsEnabled = true; ExBackgroundWorker.DoWork_Focus(this.utlInvoiceNo.txtID, 10); return; } // 2回設定がかかりエラーになる為 try { this.dg.ItemsSource = null; } catch { return; } _entityH._invoice_no = _entityInvoiceReceipt._no; this.utlInvoice.txtID.Text = _entityInvoiceReceipt._invoice_id; _entityH._invoice_id = _entityInvoiceReceipt._invoice_id; _entityH._invoice_name = _entityInvoiceReceipt._invoice_nm; _entityH._invoice_kbn = _entityInvoiceReceipt._invoice_kbn; _entityH._invoice_kbn_nm = _entityInvoiceReceipt._invoice_kbn_nm; _entityH._summing_up_group_id = _entityInvoiceReceipt._summing_up_group_id; _entityH._summing_up_group_nm = _entityInvoiceReceipt._summing_up_group_nm; _entityH._invoice_yyyymmdd = _entityInvoiceReceipt._invoice_yyyymmdd; _entityH._collect_plan_day = _entityInvoiceReceipt._collect_plan_day; _entityH._invoice_price = _entityInvoiceReceipt._invoice_price; _entityH._before_receipt_price = _entityInvoiceReceipt._before_receipt_price; _entityH._before_credit_price = _entityInvoiceReceipt._credit_price; _entityH._credit_price = _entityInvoiceReceipt._credit_price; _entityH._receipt_division_id = _entityInvoiceReceipt._receipt_division_id; _entityH._receipt_division_nm = _entityInvoiceReceipt._receipt_division_nm; // バインド反映 SetBinding(); // 前回情報保持 ConvertBeforeData(_entityH, _before_entityH); _entityListD = null; _entityListD = new ObservableCollection<EntityReceiptD>(); EntityReceiptD entity = new EntityReceiptD(); entity._rec_no = 1; entity._receipt_division_id = this._entityH._receipt_division_id; entity._receipt_division_nm = this._entityH._receipt_division_nm; _entityListD.Add(entity); DetailSumPrice(); this._entityListD[0]._price = ExCast.zCDbl(this.txtInvoiceZanPrice.Text); this._entityListD[0]._receipt_division_id = _entityH._receipt_division_id; this._entityListD[0]._receipt_division_nm = _entityH._receipt_division_nm; this.dg.ItemsSource = null; this.dg.ItemsSource = this._entityListD; DetailSumPrice(); // 請求番号指定時、請求先は変更不可 this.utlInvoice.txtID.IsEnabled = false; ExBackgroundWorker.DoWork_Focus(this.txtMemo, 10); } else { MessageBox.Show("請求番号:" + this.utlInvoiceNo.txtID.Text + " は存在しません。"); webService.ProcessingDlgClose(); this.utlInvoiceNo.txtID.Text = ""; _entityH._invoice_no = 0; _entityH._invoice_kbn = 0; _entityH._invoice_kbn_nm = ""; _entityH._summing_up_group_id = ""; _entityH._summing_up_group_nm = ""; _entityH._invoice_yyyymmdd = ""; _entityH._collect_plan_day = ""; _entityH._invoice_price = 0; _entityH._before_receipt_price = 0; DetailSumPrice(); ExBackgroundWorker.DoWork_Focus(this.utlInvoiceNo.txtID, 10); this.utlInvoice.txtID.IsEnabled = true; } break; #endregion default: break; } }
private void GetInvoiceReceipt(long invoiceNo, long receiptNo) { try { objInvocieReceipt = null; // 初期化 svcInvoiceCloseClient svc = new svcInvoiceCloseClient(); svc.GetPaymentCashInCompleted += new EventHandler<GetPaymentCashInCompletedEventArgs>(this.GetPaymentCashInCompleted); svc.GetPaymentCashInAsync(Common.gstrSessionString, invoiceNo, receiptNo); } catch (Exception ex) { this.ProcessingDlgClose(); ExMessageBox.Show(CLASS_NM + ".GetPaymentCashIn" + Environment.NewLine + ex.ToString(), "エラー確認"); } }
private void GetInvocieReceipt(long _No) { _entityInvoiceReceipt = 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.GetInvocieReceipt, ExWebService.geDialogDisplayFlg.Yes, ExWebService.geDialogCloseFlg.Yes, prm); }