private D_Collect_Entity GetDCollectData() { dce = new D_Collect_Entity() { InputKBN = "3", StoreCD = StoreCD, StaffCD = InOperatorCD, CollectCustomerCD = txtCustomerCD.Text, PaymentMethodCD = cboDenominationName.SelectedValue.ToString(), CollectAmount = txtPayment.Text, FeeDeduction = "0", Deduction1 = "0", Deduction2 = "0", DeductionConfirm = "0", ConfirmSource = txtPayment.Text, ConfirmAmount = "0", Remark = txtRemarks.Text, Operator = InOperatorCD, ProgramID = InProgramID, PC = InPcID, ProcessMode = "登 録", Key = txtPayment.Text.ToString() }; if (chkAdvanceFlg.Checked == true) { dce.AdvanceFLG = "1"; } else { dce.AdvanceFLG = "0"; } return(dce); }
public DataTable NyuukinKesikomiItiranHyou_Report(D_Collect_Entity collect_data) { string sp = "NyuukinKesikomiItiranHyou_Report"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@CollectDateF", new ValuePair { value1 = SqlDbType.Date, value2 = collect_data.CollectDateFrom } }, { "@CollectDateT", new ValuePair { value1 = SqlDbType.Date, value2 = collect_data.CollectDateTo } }, { "@InputDateTimeF", new ValuePair { value1 = SqlDbType.Date, value2 = collect_data.InputDateFrom } }, { "@InputDateTimeT", new ValuePair { value1 = SqlDbType.Date, value2 = collect_data.InputDateTo } }, { "@WebCollectType", new ValuePair { value1 = SqlDbType.VarChar, value2 = collect_data.WebCollectType } }, { "@CollectCustomerCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = collect_data.CollectCustomerCD } } }; return(SelectData(dic, sp)); }
public DataTable SelectDataForNyukin(D_Collect_Entity dce) { string sp = "SelectDataForNyukin"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@RdoSyubetsu", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dce.RdoSyubetsu.ToString() } }, { "@WebCollectType", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.WebCollectType } }, { "@DateFrom", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.InputDateFrom } }, { "@DateTo", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.InputDateTo } }, { "@StoreCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.StoreCD } }, { "@CustomerCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectCustomerCD } }, }; return(SelectData(dic, sp)); }
/// <summary> /// 入金検索にて使用 /// </summary> /// <param name="dce"></param> /// <returns></returns> public DataTable D_Collect_SelectForSearch(D_Collect_Entity dce) { string sp = "D_Collect_SelectForSearch"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@CollectDateFrom", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectDateFrom } }, { "@CollectDateTo", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectDateTo } }, { "@DateFrom", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.InputDateFrom } }, { "@DateTo", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.InputDateTo } }, //{ "@StoreCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.StoreCD } }, { "@CustomerCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectCustomerCD } }, }; return(SelectData(dic, sp)); }
protected override void ExecDisp() { for (int i = 0; i < detailControls.Length; i++) { if (CheckDetail(i) == false) { detailControls[i].Focus(); return; } } doe = GetSearchInfo(); DataTable dt = nnbl.D_Collect_SelectAll(doe); GvDetail.DataSource = dt; if (dt.Rows.Count > 0) { GvDetail.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect; GvDetail.CurrentRow.Selected = true; GvDetail.Enabled = true; GvDetail.Focus(); Btn_F10.Enabled = true; } else { nnbl.ShowMessage("E128"); } }
private D_Collect_Entity GetSearchInfo() { doe = new D_Collect_Entity { CollectDateFrom = detailControls[(int)EIndex.DayStart].Text, CollectDateTo = detailControls[(int)EIndex.DayEnd].Text, InputDateFrom = detailControls[(int)EIndex.InputDateFrom].Text, InputDateTo = detailControls[(int)EIndex.InputDateTo].Text, CollectCustomerCD = ScCustomer.TxtCode.Text, StoreCD = CboStoreCD.SelectedValue.ToString().Equals("-1") ? string.Empty : CboStoreCD.SelectedValue.ToString(), StaffCD = ScStaff.TxtCode.Text, }; if (CboArrivalPlan.SelectedIndex != -1) { if (!string.IsNullOrWhiteSpace(CboArrivalPlan.SelectedText)) { doe.WebCollectType = CboArrivalPlan.SelectedValue.ToString(); } } if (((RadioButton)detailControls[(int)EIndex.RdoZan]).Checked) { doe.ChkZan = 1; } return(doe); }
/// <summary> /// 入金入力更新処理 /// NyuukinNyuuryokuより更新時に使用 /// </summary> /// <param name="dme"></param> /// <param name="operationMode"></param> /// <returns></returns> public bool D_Collect_Exec(D_Collect_Entity dce, DataTable dt, short operationMode) { string sp = "PRC_NyuukinNyuuryoku"; command = new SqlCommand(sp, GetConnection()); command.CommandType = CommandType.StoredProcedure; command.CommandTimeout = 0; AddParam(command, "@OperateMode", SqlDbType.Int, operationMode.ToString()); AddParam(command, "@StoreCD", SqlDbType.VarChar, dce.StoreCD); AddParam(command, "@CollectNO", SqlDbType.VarChar, dce.CollectNO); AddParam(command, "@ConfirmNO", SqlDbType.VarChar, dce.ConfirmNO); AddParam(command, "@CollectDate", SqlDbType.VarChar, dce.CollectDate); AddParam(command, "@StaffCD", SqlDbType.VarChar, dce.StaffCD); AddParam(command, "@CollectCustomerCD", SqlDbType.VarChar, dce.CollectCustomerCD); AddParam(command, "@WebCollectNO", SqlDbType.VarChar, dce.WebCollectNO); AddParam(command, "@WebCollectType", SqlDbType.VarChar, dce.WebCollectType); AddParam(command, "@PaymentMethodCD", SqlDbType.VarChar, dce.PaymentMethodCD); AddParam(command, "@KouzaCD", SqlDbType.VarChar, dce.KouzaCD); AddParam(command, "@BillDate", SqlDbType.VarChar, dce.BillDate); AddParam(command, "@CollectClearDate", SqlDbType.VarChar, dce.CollectClearDate); AddParam(command, "@Head_CollectAmount", SqlDbType.Money, dce.CollectAmount); AddParam(command, "@FeeDeduction", SqlDbType.Money, dce.FeeDeduction); AddParam(command, "@Deduction1", SqlDbType.Money, dce.Deduction1); AddParam(command, "@Deduction2", SqlDbType.Money, dce.Deduction2); AddParam(command, "@DeductionConfirm", SqlDbType.Money, dce.DeductionConfirm); AddParam(command, "@ConfirmSource", SqlDbType.Money, dce.ConfirmSource); AddParam(command, "@Head_ConfirmAmount", SqlDbType.Money, dce.ConfirmAmount); AddParam(command, "@Remark", SqlDbType.VarChar, dce.Remark); AddParamForDataTable(command, "@Table", SqlDbType.Structured, dt); AddParam(command, "@Operator", SqlDbType.VarChar, dce.Operator); AddParam(command, "@PC", SqlDbType.VarChar, dce.PC); //OUTパラメータの追加 string outPutParam = "@OutCollectNO"; command.Parameters.Add(outPutParam, SqlDbType.VarChar, 11); command.Parameters[outPutParam].Direction = ParameterDirection.Output; UseTransaction = true; bool ret = InsertUpdateDeleteData(sp, ref outPutParam); if (ret) { dce.CollectNO = outPutParam; } return(ret); }
public string GetMaeukeKin(D_Collect_Entity de) { string ret = ""; D_Collect_DL dl = new D_Collect_DL(); DataTable dt = dl.D_Collect_SelectMaeukeKin(de); if (dt.Rows.Count > 0) { ret = Z_SetStr(dt.Rows[0]["MaeukeKin"]); } return(ret); }
private D_Collect_Entity D_Collect_data() { dce = new D_Collect_Entity { CollectDateFrom = txtCollectDateF.Text, CollectDateTo = txtCollectDateT.Text, InputDateFrom = txtInputDateF.Text, InputDateTo = txtInputDateT.Text, WebCollectType = cboWebCollectType.SelectedValue.ToString(), CollectCustomerCD = ScCollectCustomerCD.Code }; return(dce); }
private D_Collect_Entity GetSearchInfo() { dce = new D_Collect_Entity { CollectDateFrom = detailControls[(int)EIndex.DayStart].Text, CollectDateTo = detailControls[(int)EIndex.DayEnd].Text, InputDateFrom = detailControls[(int)EIndex.InputStart].Text, InputDateTo = detailControls[(int)EIndex.InputEnd].Text, CollectCustomerCD = ScCustomer.TxtCode.Text, StoreCD = CboStoreCD.SelectedValue.ToString().Equals("-1") ? string.Empty : CboStoreCD.SelectedValue.ToString(), }; return(dce); }
/// <summary> /// 入金入力(修正時)よりデータ抽出時に使用 /// </summary> /// <param name="dce"></param> /// <returns></returns> public DataTable D_Collect_SelectData(D_Collect_Entity dce) { string sp = "D_Collect_SelectData"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@CollectNO", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectNO } }, { "@ConfirmNO", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.ConfirmNO } }, }; return(SelectData(dic, sp)); }
public DataTable D_Collect_SelectMaeukeKin(D_Collect_Entity dce) { string sp = "D_Collect_SelectMaeukeKin"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@StoreCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.StoreCD } }, { "@CustomerCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectCustomerCD } }, { "@AdvanceFLG", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dce.AdvanceFLG } }, }; return(SelectData(dic, sp)); }
private void Save() { if (ErrorCheck()) { if (trntBL.ShowMessage("Q101") == DialogResult.Yes) { DataTable dt = new DataTable(); dt = trntBL.SimpleSelect1("70", ChangeDate.Replace("/", "-"), StoreCD); if (dt.Rows.Count > 0) { trntBL.ShowMessage("E252"); } ddpe = GetDepositEntity(); if (trntBL.TempoNyuukinTouroku_D_DepositHistory_InsertUpdate(ddpe)) { if (!string.IsNullOrWhiteSpace(txtCustomerCD.Text)) { dce = GetDCollectData(); trntBL.TempoNyuukinTouroku_D_Collect_Insert(dce); } trntBL.ShowMessage("I101"); RunConsole(); txtPayment.Clear(); txtPayment.Focus(); cboDenominationName.SelectedValue = "-1"; txtCustomerCD.Clear(); lblCustomerName.Text = string.Empty; txtRemarks.Clear(); DisplayData(); chkAdvanceFlg.Enabled = chkAdvanceFlg.Checked = false; } } else { PreviousCtrl.Focus(); } } }
/// <summary> /// 入金入力よりデータ抽出時に使用 /// </summary> /// <param name="dce"></param> /// <returns></returns> public DataTable D_Collect_SelectAll(D_Collect_Entity dce) { string sp = "D_Collect_SelectAll"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@CollectDateFrom", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectDateFrom } }, { "@CollectDateTo", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectDateTo } }, { "@DateFrom", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.InputDateFrom } }, { "@DateTo", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.InputDateTo } }, { "@StoreCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.StoreCD } }, { "@StaffCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.StaffCD } }, { "@CustomerCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectCustomerCD } }, { "@WebCollectType", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.WebCollectType } }, { "@ChkZan", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dce.ChkZan.ToString() } }, }; return(SelectData(dic, sp)); }
/// <summary> /// 入金検索にて使用 /// </summary> /// <param name="de"></param> /// <returns></returns> public DataTable D_Collect_SelectForSearch(D_Collect_Entity de) { return(mdl.D_Collect_SelectForSearch(de)); }
/// <summary> /// Print Report on F12 Click /// </summary> protected override void PrintSec() { if (PrintMode != EPrintMode.DIRECT) { return; } if (ErrorCheck()) { dce = D_Collect_data(); dtReport = new DataTable(); dtReport = nkih_bl.NyuukinKesikomiItiranHyou_Report(dce); if (dtReport.Rows.Count > 0) { try { NyuukinKesikomiItiranHyou_Report Nkh_report = new NyuukinKesikomiItiranHyou_Report(); DialogResult DResult; switch (PrintMode) { case EPrintMode.DIRECT: DResult = bbl.ShowMessage("Q201"); if (DResult == DialogResult.Cancel) { return; } // 印字データをセット Nkh_report.SetDataSource(dtReport); Nkh_report.Refresh(); Nkh_report.SetParameterValue("lblStore", cboStoreAuthorizations.SelectedValue.ToString() + " " + cboStoreAuthorizations.Text); Nkh_report.SetParameterValue("lblToday", DateTime.Now.ToString("yyyy/MM/dd") + " " + DateTime.Now.ToString("HH:mm")); Nkh_report.SetParameterValue("lblWebCollectType", cboWebCollectType.Text); vr.CrystalReportViewer1.ReportSource = Nkh_report; try { // crv = vr.CrystalReportViewer1; } catch (Exception ex) { var msg = ex.Message; } //out log before print if (DResult == DialogResult.Yes) { //印刷処理プレビュー vr.CrystalReportViewer1.ShowPrintButton = true; vr.CrystalReportViewer1.ReportSource = Nkh_report; vr.ShowDialog(); } else { //int marginLeft = 360; CrystalDecisions.Shared.PageMargins margin = Nkh_report.PrintOptions.PageMargins; margin.leftMargin = DefaultMargin.Left; // mmの指定をtwip単位に変換する margin.topMargin = DefaultMargin.Top; margin.bottomMargin = DefaultMargin.Bottom; //mmToTwip(marginLeft); margin.rightMargin = DefaultMargin.Right; Nkh_report.PrintOptions.ApplyPageMargins(margin); /// Error Now // プリンタに印刷 System.Drawing.Printing.PageSettings ps; try { System.Drawing.Printing.PrintDocument pDoc = new System.Drawing.Printing.PrintDocument(); CrystalDecisions.Shared.PrintLayoutSettings PrintLayout = new CrystalDecisions.Shared.PrintLayoutSettings(); System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings(); Nkh_report.PrintOptions.PrinterName = "\\\\dataserver\\Canon LBP2900"; System.Drawing.Printing.PageSettings pSettings = new System.Drawing.Printing.PageSettings(printerSettings); Nkh_report.PrintOptions.DissociatePageSizeAndPrinterPaperSize = true; Nkh_report.PrintOptions.PrinterDuplex = PrinterDuplex.Simplex; Nkh_report.PrintToPrinter(printerSettings, pSettings, false, PrintLayout); } catch (Exception ex) { } } break; } //プログラム実行履歴 //InsertLog(Get_L_Log_Entity()); } finally { //画面はそのまま txtCollectDateF.Focus(); } } } }
public DataTable NyuukinKesikomiItiranHyou_Report(D_Collect_Entity collect_data) { return(collectDL.NyuukinKesikomiItiranHyou_Report(collect_data)); }
private void Form_Load(object sender, EventArgs e) { try { InProgramID = "TempoRegiHanbaiTouroku"; StartProgram(); SetRequireField(); Bind(cboDenominationName1, 1); Bind(cboDenominationName2, 1); Bind(cboCardDenominationCD); InitialControlArray(); //領収書ボタンを押せないようにする btnRyosyusyo.Enabled = false; //決定ボタンを押せるようにする btnProcess.Enabled = true; //入金データからその会員から預かっている前受金を計算する D_Collect_Entity dce = new D_Collect_Entity(); dce.StoreCD = StoreCD; dce.CollectCustomerCD = dse.CustomerCD; dce.AdvanceFLG = "1"; mMaeuke = tprg_Hanbai_Bl.GetMaeukeKin(dce); lblMaeZan.Text = mMaeuke; if (OperationMode != FrmMainForm.EOperationMode.DELETE) { lblHenpin.Visible = false; if (OperationMode == FrmMainForm.EOperationMode.SHOW) { lblHenpin.Text = "返品"; lblHenpin.Visible = true; } //第二画面(支払画面)表示 画面転送表02 lblJuchuuTaxRitsu.Text = dse.SalesNO; lblSalesGaku.Text = bbl.Z_SetStr(dse.SalesGaku); lblZei.Text = bbl.Z_SetStr(dse.SalesTax); txtDiscount.Text = "0"; lblSeikyuGaku.Text = bbl.Z_SetStr(dse.SalesGaku); txtPoint.Text = "0"; txtCash.Text = "0"; txtAzukari.Text = "0"; lblRefund.Text = "0"; txtCard.Text = "0"; txtKake.Text = "0"; txtMaeuke.Text = "0"; txtOther1.Text = "0"; txtOther2.Text = "0"; lblShiharaiKei.Text = "0"; //lblZan.Text = bbl.Z_SetStr(dse.LastPoint); txtDiscount.Focus(); } else { lblJuchuuTaxRitsu.Text = dse.SalesNO; lblSalesGaku.Text = bbl.Z_SetStr(dse.SalesGaku); lblZei.Text = bbl.Z_SetStr(dse.SalesTax); txtDiscount.Text = bbl.Z_SetStr(dspe.DiscountAmount); lblSeikyuGaku.Text = bbl.Z_SetStr(dse.SalesGaku); txtMaeuke.Text = bbl.Z_SetStr(dspe.AdvanceAmount); txtPoint.Text = bbl.Z_SetStr(dspe.PointAmount); txtCash.Text = bbl.Z_SetStr(dspe.CashAmount); txtAzukari.Text = bbl.Z_SetStr(dspe.DepositAmount); lblRefund.Text = bbl.Z_SetStr(dspe.RefundAmount); txtCard.Text = bbl.Z_SetStr(dspe.CardAmount); if (!string.IsNullOrWhiteSpace(dspe.CardDenominationCD)) { cboCardDenominationCD.SelectedValue = dspe.CardDenominationCD; } txtOther1.Text = bbl.Z_SetStr(dspe.Denomination1Amount); if (!string.IsNullOrWhiteSpace(dspe.Denomination1CD)) { cboDenominationName1.SelectedValue = dspe.Denomination1CD; } txtOther2.Text = bbl.Z_SetStr(dspe.Denomination2Amount); if (!string.IsNullOrWhiteSpace(dspe.Denomination2CD)) { cboDenominationName2.SelectedValue = dspe.Denomination2CD; } txtKake.Text = bbl.Z_SetStr(dspe.CreditAmount); lblShiharaiKei.Text = "0"; //lblZan.Text = bbl.Z_SetStr(dse.LastPoint); btnProcess.Focus(); } } catch (Exception ex) { //エラー時共通処理 MessageBox.Show(ex.Message); EndSec(); } }
public bool TempoNyuukinTouroku_D_Collect_Insert(D_Collect_Entity dce) { return(coldl.D_Collect_Insert(dce)); }
/// <summary> /// 入金入力(修正時)にて使用 /// </summary> /// <param name="de"></param> /// <returns></returns> public DataTable D_Collect_SelectData(D_Collect_Entity de) { return(mdl.D_Collect_SelectData(de)); }
/// <summary> /// 入金入力(新規時)にて使用 /// </summary> /// <param name="de"></param> /// <returns></returns> public DataTable SelectDataForNyukin(D_Collect_Entity de) { return(mdl.SelectDataForNyukin(de)); }
/// <summary> /// 入金入力更新処理 /// NyuukinNyuuryoku_Seikyuより更新時に使用 /// </summary> public bool D_Collect_Exec(D_Collect_Entity dce, DataTable dt, short operationMode) { return(mdl.D_Collect_Exec(dce, dt, operationMode)); }
public bool D_Collect_Insert(D_Collect_Entity dce) { Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@InputKBN", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.InputKBN } }, { "@StoreCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.StoreCD } }, { "@StaffCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.StaffCD } }, { "@CollectCustomerCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectCustomerCD } }, { "@PaymentMethodCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.PaymentMethodCD } }, { "@CollectAmount", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.CollectAmount } }, { "@FeeDeduction", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.FeeDeduction } }, { "@Deduction1", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dce.Deduction1 } }, { "@Deduction2", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dce.Deduction2 } }, { "@DeductionConfirm", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dce.DeductionConfirm } }, { "@ConfirmSource", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.ConfirmSource } }, { "@ConfirmAmount", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.ConfirmAmount } }, { "@Remark", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.Remark } }, { "@AdvanceFLG", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dce.AdvanceFLG } }, { "@Operator", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.Operator } }, { "@Program", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.ProgramID } }, { "@PC", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.PC } }, { "@OperateMode", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.ProcessMode } }, { "@KeyItem", new ValuePair { value1 = SqlDbType.VarChar, value2 = dce.StoreCD + " " + dce.Key } } }; return(InsertUpdateDeleteData(dic, "D_Collect_Insert")); }