protected override void ExecDisp() { for (int i = 0; i < detailControls.Length; i++) { if (CheckDetail(i) == false) { detailControls[i].Focus(); return; } } dbe = GetSearchInfo(); DataTable dt = nnbl.D_Billing_SelectForSearch(dbe); GvDetail.DataSource = dt; if (dt.Rows.Count > 0) { GvDetail.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect; GvDetail.CurrentRow.Selected = true; GvDetail.Enabled = true; GvDetail.Focus(); } else { nnbl.ShowMessage("E128"); } }
/// <summary> /// 店舗請求書よりデータ抽出時に使用 /// </summary> /// <param name="dbe"></param> /// <returns></returns> public DataTable D_Billing_SelectForPrint(D_Billing_Entity dbe, M_Customer_Entity mce) { string sp = "D_Billing_SelectForPrint"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@BillingCloseDate", new ValuePair { value1 = SqlDbType.VarChar, value2 = dbe.BillingCloseDate } }, { "@StoreCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dbe.StoreCD } }, { "@StaffCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = mce.StaffCD } }, { "@CustomerCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dbe.BillingCustomerCD } }, { "@CustomerName", new ValuePair { value1 = SqlDbType.VarChar, value2 = dbe.CustomerName } }, { "@PrintFLG", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dbe.PrintFLG } }, }; return(SelectData(dic, sp)); }
/// <summary> /// お買上データ取得処理 /// </summary> /// <param name="set">画面展開なしの場合:falesに設定する</param> /// <returns></returns> private DataTable CheckData(out DataTable dtForUpdate) { dtForUpdate = null; for (int i = 0; i < detailControls.Length; i++) { if (CheckDetail(i, false) == false) { detailControls[i].Focus(); return(null); } } dse = GetSearchInfo(); M_Customer_Entity mce = new M_Customer_Entity { StaffCD = ScStaff.TxtCode.Text }; DataTable dt = mibl.D_Billing_SelectForPrint(dse, mce); //以下の条件で請求データが存在しなければエラー (Error if record does not exist)E133 if (dt.Rows.Count == 0) { bbl.ShowMessage("E133"); previousCtrl.Focus(); return(null); } else { //明細にデータをセット int i = 0; dtForUpdate = new DataTable(); dtForUpdate.Columns.Add("no", Type.GetType("System.String")); string oldBillingNO = ""; foreach (DataRow row in dt.Rows) { if (row["BillingNO"].ToString() != oldBillingNO) { bool ret = SelectAndInsertExclusive(row["BillingNO"].ToString()); if (!ret) { return(null); } i++; // データを追加 DataRow rowForUpdate; rowForUpdate = dtForUpdate.NewRow(); rowForUpdate["no"] = row["BillingNO"].ToString(); dtForUpdate.Rows.Add(rowForUpdate); oldBillingNO = row["BillingNO"].ToString(); } } } return(dt); }
/// <summary> /// 請求書より更新時に使用 /// </summary> /// <param name="dbe"></param> /// <param name="dt"></param> /// <param name="operatorNm"></param> /// <param name="pc"></param> /// <returns></returns> public bool D_Billing_Update(D_Billing_Entity dbe, DataTable dt, string operatorNm, string pc) { string sp = "D_Billing_Update"; command = new SqlCommand(sp, GetConnection()); command.CommandType = CommandType.StoredProcedure; command.CommandTimeout = 0; AddParamForDataTable(command, "@Table", SqlDbType.Structured, dt); AddParam(command, "@Operator", SqlDbType.VarChar, operatorNm); AddParam(command, "@PC", SqlDbType.VarChar, pc); UseTransaction = true; string outPutParam = ""; //未使用 bool ret = InsertUpdateDeleteData(sp, ref outPutParam); return(ret); }
protected override void ExecDisp() { for (int i = 0; i < detailControls.Length; i++) { if (CheckDetail(i) == false) { detailControls[i].Focus(); return; } } D_Billing_Entity dbe = new D_Billing_Entity { StoreCD = CboStoreCD.SelectedValue.ToString(), BillingCustomerCD = detailControls[(int)EIndex.CustomerCD].Text, BillingCloseDate = detailControls[(int)EIndex.SeqSDT].Text, }; M_Customer_Entity mce = new M_Customer_Entity { BillingCloseDate = detailControls[(int)EIndex.Simbi].Text }; DataTable dt = ssbl.D_Billing_SelectAll(dbe, mce); GvDetail.DataSource = dt; if (dt.Rows.Count > 0) { lblSum.Text = bbl.Z_SetStr(dt.Rows[0]["SUM_BillingGaku"].ToString()); GvDetail.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect; GvDetail.CurrentRow.Selected = true; GvDetail.Enabled = true; GvDetail.Focus(); } else { lblSum.Text = ""; ssbl.ShowMessage("E128"); } }
/// <summary> /// 画面情報をセット /// </summary> /// <returns></returns> private D_Billing_Entity GetSearchInfo() { dbe = new D_Billing_Entity { BillingGakuFrom = detailControls[(int)EIndex.BillingGakuStart].Text, BillingGakuTo = detailControls[(int)EIndex.BillingGakuStartEnd].Text, CollectDateFrom = detailControls[(int)EIndex.InputStart].Text, CollectDateTo = detailControls[(int)EIndex.InputEnd].Text, CustomerName = detailControls[(int)EIndex.CustomerName].Text, StoreCD = CboStoreCD.SelectedValue.ToString().Equals("-1") ? string.Empty : CboStoreCD.SelectedValue.ToString(), }; if (ckM_RadioButton1.Checked) { dbe.RdoDispKbn = 1; } else { dbe.RdoDispKbn = 2; } if (ckM_CheckBox1.Checked) { dbe.ChkMinyukin = "1"; } else { dbe.ChkMinyukin = "0"; } if (ckM_CheckBox2.Checked) { dbe.ChkNyukinzumi = "1"; } else { dbe.ChkNyukinzumi = "0"; } return(dbe); }
private D_Billing_Entity GetSearchInfo() { dse = new D_Billing_Entity { BillingCloseDate = detailControls[(int)EIndex.Simebi].Text, BillingCustomerCD = ScCustomer.TxtCode.Text, //CustomerName = detailControls[(int)EIndex.CustomerName].Text, StoreCD = CboStoreCD.SelectedValue.ToString().Equals("-1") ? string.Empty : CboStoreCD.SelectedValue.ToString(), }; if (ckM_RadioButton1.Checked) { //印刷済 dse.PrintFLG = "1"; } else { //未印刷 dse.PrintFLG = "0"; } return(dse); }
/// <summary> /// 入金元検索よりデータ抽出時に使用 /// </summary> /// <param name="dbe"></param> /// <returns></returns> public DataTable D_Billing_SelectForSearch(D_Billing_Entity dbe) { string sp = "D_Billing_SelectForSearch"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@StoreCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dbe.StoreCD } }, { "@CustomerName", new ValuePair { value1 = SqlDbType.VarChar, value2 = dbe.CustomerName } }, { "@BillingGakuFrom", new ValuePair { value1 = SqlDbType.Money, value2 = dbe.BillingGakuFrom } }, { "@BillingGakuTo", new ValuePair { value1 = SqlDbType.Money, value2 = dbe.BillingGakuTo } }, { "@CollectDateFrom", new ValuePair { value1 = SqlDbType.VarChar, value2 = dbe.CollectDateFrom } }, { "@CollectDateTo", new ValuePair { value1 = SqlDbType.VarChar, value2 = dbe.CollectDateTo } }, { "@ChkMinyukin", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dbe.ChkMinyukin } }, { "@ChkNyukinzumi", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dbe.ChkNyukinzumi } }, { "@RdoDispKbn", new ValuePair { value1 = SqlDbType.TinyInt, value2 = dbe.RdoDispKbn.ToString() } }, }; return(SelectData(dic, sp)); }
/// <summary> /// 店舗請求書更新処理 /// SeikyuuShoよりフラグ更新時に使用 /// </summary> public bool D_Billing_Update(D_Billing_Entity dbe, DataTable dt, string operatorNm, string pc) { return(mdl.D_Billing_Update(dbe, dt, operatorNm, pc)); }
public DataTable D_Billing_SelectForPrint(D_Billing_Entity dbe, M_Customer_Entity mce) { return(mdl.D_Billing_SelectForPrint(dbe, mce)); }
public DataTable D_Billing_SelectAll(D_Billing_Entity dbe, M_Customer_Entity mce) { return(ddl.D_Billing_SelectAll(dbe, mce)); }
/// <summary> /// 入金元検索よりデータ抽出時に使用 /// </summary> /// <param name="de"></param> /// <returns></returns> public DataTable D_Billing_SelectForSearch(D_Billing_Entity de) { D_Billing_DL dl = new D_Billing_DL(); return(dl.D_Billing_SelectForSearch(de)); }