public M_SKU_Entity GetDataEntity() { msku_Entity = new M_SKU_Entity() { ChangeDate = LB_ChangeDate.Text, MainVendorCD = Shiiresaki.TxtCode.Text, MakerVendorCD = Maker.TxtCode.Text, BrandCD = SearchBrand.TxtCode.Text, SKUName = TB_Shohinmei.Text, JanCD = jan.TxtCode.Text, SKUCD = sku.TxtCode.Text, MakerItem = TB_mekashohinCD.Text, ITemCD = TB_item.Text, CommentInStore = TB_Bikokeyword.Text, ReserveCD = CB_ReserveCD.SelectedValue.ToString(), NoticesCD = CB_NoticesCD.SelectedValue.ToString(), PostageCD = CB_PostageCD.SelectedValue.ToString(), OrderAttentionCD = CB_OrderAttentionCD.SelectedValue.ToString(), SportsCD = Sports.TxtCode.Text, InputDateFrom = TB_ShinkitorokuF.Text, InputDateTo = TB_ShinkitorokuT.Text, UpdateDateFrom = TB_SaiShuhenkobiF.Text, UpdateDateTo = TB_SaiShuhenkobiT.Text, ApprovalDateFrom = TB_ShoninbiF.Text, ApprovalDateTo = TB_ShoninbiT.Text, }; return(msku_Entity); }
public DataTable M_SKU_SelectAllForTempoShukka(M_SKU_Entity mse, string juchuuNo) { string sp = "M_SKU_SelectAllForTempoShukka"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@AdminNO", new ValuePair { value1 = SqlDbType.Int, value2 = mse.AdminNO } }, { "@SKUCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.SKUCD } }, { "@JanCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.JanCD } }, { "@ChangeDate", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.ChangeDate } }, { "@JuchuuNo", new ValuePair { value1 = SqlDbType.VarChar, value2 = juchuuNo } }, }; return(SelectData(dic, sp)); }
private M_SKU_Entity GetEntity() { mse = new M_SKU_Entity(); mse.JanCD = parJANCD; mse.ChangeDate = parChangeDate; return(mse); }
private M_SKU_Entity GetDataEntity() { msku_Entity = new M_SKU_Entity() { ChangeDate = changedate, }; return(msku_Entity); }
private M_SKU_Entity GetEntity() { mse = new M_SKU_Entity(); mse.BrandCD = txtBrandCD.Text; mse.SKUName = txtSKUName.Text; mse.JanCD = txtJanCD.Text; mse.ChangeDate = skuBL.GetDate(); return(mse); }
private M_SKU_Entity GetEntity() { mse = new M_SKU_Entity { JanCD = parJANCD, ChangeDate = parChangeDate }; return(mse); }
public bool M_SKU_SelectByMaker(M_SKU_Entity mse) { DataTable dt = mdl.M_SKU_SelectByMaker(mse); if (dt.Rows.Count > 0) { mse.SKUName = dt.Rows[0]["SKUName"].ToString(); return(true); } return(false); }
private M_SKU_Entity M_SKU_data() { sku_data = new M_SKU_Entity() { MakerItem = scMakerShohinCD.Code, ITemCD = scITEM.Code, SKUCD = scSKUCD.Code, JanCD = scJANCD.Code, SKUName = txtSKUName.Text }; return(sku_data); }
private bool BindGrid() { mse = GetEntity(); DataTable dt = sbl.M_SKU_SelectAllForTempoShukka(mse, ""); if (dt.Rows.Count == 0) { return(false); } dgvDetail.DataSource = dt; return(true); }
public bool M_SKU_SelectByJANCD(M_SKU_Entity me) { M_SKU_DL msdl = new M_SKU_DL(); DataTable dt = msdl.M_SKU_SelectByJANCD(me); if (dt.Rows.Count > 0) { return(true); } else { return(false); } }
private void ShowDetail() { mse = GetEntity(); sbl = new SKU_BL(); DataTable dt = sbl.M_SKU_SelectAll(mse); if (dt.Rows.Count > 0) { dgvDetail.DataSource = dt; dgvDetail.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect; dgvDetail.CurrentRow.Selected = true; dgvDetail.Focus(); } }
public DataTable M_SKU_SelectBySKUCD(M_SKU_Entity me) { string sp = "M_SKU_SelectBySKUCD"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@SKUCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = me.SKUCD } }, { "@ChangeDate", new ValuePair { value1 = SqlDbType.VarChar, value2 = me.ChangeDate } }, }; return(SelectData(dic, sp)); }
public DataTable M_SKU_SelectByMaker(M_SKU_Entity mse) { string sp = "M_SKU_SelectByMaker"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@MakerItem", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.MakerItem } }, { "@ChangeDate", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.ChangeDate } }, }; return(SelectData(dic, sp)); }
public DataTable M_SKU_Select(M_SKU_Entity mse) { string sp = "M_SKU_Select"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@AdminNO", new ValuePair { value1 = SqlDbType.Int, value2 = mse.AdminNO } }, { "@ChangeDate", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.ChangeDate } }, }; return(SelectData(dic, sp)); }
private void ShowDetail() { mse = GetEntity(); { dt = new DataTable(); dt = skuBL.M_SKU_SelectAllForTempoRegiShohin(mse); dgvDetail.DataSource = dt; if (dt.Rows.Count > 0) { //dgvDetail.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect; dgvDetail.CurrentRow.Selected = true; dgvDetail.Focus(); } } }
public bool M_SKU_SelectBySKUCD(M_SKU_Entity me) { M_SKU_DL msdl = new M_SKU_DL(); DataTable dt = msdl.M_SKU_SelectBySKUCD(me); if (dt.Rows.Count > 0) { me.SKUName = dt.Rows[0]["SKUName"].ToString(); return(true); } else { return(false); } }
private void F11() { msku_Entity = GetDataEntity(); dap_Entity = GetData(); DataTable dt = pa_bl.Search_PlanArrival(dap_Entity, msku_Entity, adminNO); if (dt.Rows.Count > 0) { GV_PlanArrival.Refresh(); GV_PlanArrival.DataSource = dt; } else { GV_PlanArrival.DataSource = null; bbl.ShowMessage("E128"); } }
public DataTable Search_PlanArrival(D_ArrivalPlan_Entity dap, M_SKU_Entity msku_entity, String adminno) { Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@ChangeDate", new ValuePair { value1 = SqlDbType.Date, value2 = msku_entity.ChangeDate } }, { "@SoukoCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dap.SoukoCD } }, { "@AdminNO", new ValuePair { value1 = SqlDbType.VarChar, value2 = adminno } }, }; return(SelectData(dic, "Search_PlanArrival")); }
public DataTable ZaikoMotochoulnsatsu_Report(M_SKU_Entity mse, D_MonthlyStock_Entity dms, int chk) { string sp = "ZaikoMotochoulnsatsu_Report"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@YYYYMMFrom", new ValuePair { value1 = SqlDbType.Int, value2 = dms.YYYYMMFrom } }, { "@YYYYMMTo", new ValuePair { value1 = SqlDbType.Int, value2 = dms.YYYYMMTo } }, { "@SoukoCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dms.SoukoCD } }, { "@itemcd", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.ITemCD } }, { "@sku", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.SKUCD } }, { "@jan", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.JanCD } }, { "@makeritem", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.MakerItem } }, { "@skuName", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.SKUName } }, { "@related", new ValuePair { value1 = SqlDbType.TinyInt, value2 = chk.ToString() } }, { "@targetDateFrom", new ValuePair { value1 = SqlDbType.Date, value2 = dms.TargetDateFrom } }, { "@targerDateTo", new ValuePair { value1 = SqlDbType.Date, value2 = dms.TargetDateTo } } }; return(SelectData(dic, sp)); }
public DataTable M_SKU_SelectForShiireTanka(M_SKU_Entity me) { string sp = "M_SKU_SelectForShiireTanka"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@MakerItem", new ValuePair { value1 = SqlDbType.VarChar, value2 = me.MakerItem } }, { "@AdminNO", new ValuePair { value1 = SqlDbType.Int, value2 = me.AdminNO } }, { "@ChangeDate", new ValuePair { value1 = SqlDbType.VarChar, value2 = me.ChangeDate } }, }; return(SelectData(dic, sp)); }
public DataTable M_SKU_SelectAllForTempoRegiShohin(M_SKU_Entity mse) { string sp = "M_SKU_SelectAllForTempoRegiShohin"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@BrandCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.BrandCD } }, { "@SKUName", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.SKUName } }, { "@JanCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.JanCD } }, { "@ChangeDate", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.ChangeDate } }, }; return(SelectData(dic, sp)); }
public DataTable D_Purchase_SelectAll(D_Purchase_Entity dpe, M_SKU_Entity mse) { string sp = "D_Purchase_SelectAll"; Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@PurchaseDateFrom", new ValuePair { value1 = SqlDbType.VarChar, value2 = dpe.PurchaseDateFrom } }, { "@PurchaseDateTo", new ValuePair { value1 = SqlDbType.VarChar, value2 = dpe.PurchaseDateTo } }, { "@StoreCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dpe.StoreCD } }, { "@StaffCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dpe.StaffCD } }, { "@VendorCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = dpe.VendorCD } }, { "@SKUName", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.SKUName } }, { "@ITemCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.ITemCD } }, { "@SKUCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.SKUCD } }, { "@JanCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.JanCD } }, { "@MakerItem", new ValuePair { value1 = SqlDbType.VarChar, value2 = mse.MakerItem } }, }; return(SelectData(dic, sp)); }
private D_Purchase_Entity GetSearchInfo() { dpe = new D_Purchase_Entity { PurchaseDateFrom = detailControls[(int)EIndex.DayStart].Text, PurchaseDateTo = detailControls[(int)EIndex.DayEnd].Text, VendorCD = ScCustomer.TxtCode.Text, StaffCD = ScStaff.TxtCode.Text, StoreCD = CboStoreCD.SelectedValue.ToString().Equals("-1") ? string.Empty : CboStoreCD.SelectedValue.ToString(), }; mse = new M_SKU_Entity { SKUName = detailControls[(int)EIndex.SKUName].Text, ITemCD = detailControls[(int)EIndex.ITemCD].Text, //カンマ区切り SKUCD = detailControls[(int)EIndex.SKUCD].Text, //カンマ区切り JanCD = detailControls[(int)EIndex.JanCD].Text, //カンマ区切り MakerItem = detailControls[(int)EIndex.MakerItem].Text, //カンマ区切り }; return(dpe); }
private void F11() { if (ErrorCheck()) { if (CKB_searchsuru.Checked == true && RB_item.Checked == true) { type = 1; } else if (CKB_searchsuru.Checked == true && RB_Makashohincd.Checked == true) { type = 2; } else { type = 3; } msku_Entity = GetDataEntity(); msInfo_Entity = GetInfoEntity(); msT_Entity = GetTagEntity(); ds_Entity = GetStockEntity(); dtData = zaibl.ZaikoShoukai_Search(msku_Entity, msInfo_Entity, msT_Entity, ds_Entity, type); if (dtData.Rows.Count > 0) { GV_Zaiko.Refresh(); GV_Zaiko.DataSource = dtData; adminno = dtData.Rows[0]["AdminNo"].ToString(); soukocd = dtData.Rows[0]["倉庫CD"].ToString(); } else { GV_Zaiko.DataSource = null; bbl.ShowMessage("E128"); dtData.Clear(); } } }
private D_Order_Entity GetSearchInfo() { doe = new D_Order_Entity { OrderDateFrom = detailControls[(int)EIndex.DayStart].Text, OrderDateTo = detailControls[(int)EIndex.DayEnd].Text, ArrivalPlanDateFrom = detailControls[(int)EIndex.ArrivalPlanDateFrom].Text, ArrivalPlanDateTo = detailControls[(int)EIndex.ArrivalPlanDateTo].Text, ArrivalDateFrom = detailControls[(int)EIndex.ArrivalDateFrom].Text, ArrivalDateTo = detailControls[(int)EIndex.ArrivalDateTo].Text, PurchaseDateFrom = detailControls[(int)EIndex.PurchaseDateFrom].Text, PurchaseDateTo = detailControls[(int)EIndex.PurchaseDateTo].Text, OrderCD = ScVendor.TxtCode.Text, StoreCD = CboStoreCD.SelectedValue.ToString().Equals("-1") ? string.Empty : CboStoreCD.SelectedValue.ToString(), JuchuuNO = ScJuchuuNO.TxtCode.Text, }; if (CboArrivalPlan.SelectedIndex != -1) { doe.ArrivalPlanCD = CboArrivalPlan.SelectedValue.ToString(); } if (CboSoukoName.SelectedIndex != -1) { doe.DestinationSoukoCD = CboSoukoName.SelectedValue.ToString(); } if (((CheckBox)detailControls[(int)EIndex.ChkMikakutei]).Checked) { doe.ChkMikakutei = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkKanbai]).Checked) { doe.ChkKanbai = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkFuyo]).Checked) { doe.ChkFuyo = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkNyukaZumi]).Checked) { doe.ChkNyukaZumi = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkMiNyuka]).Checked) { doe.ChkMiNyuka = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkJuchuAri]).Checked) { doe.ChkJuchuAri = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkZaiko]).Checked) { doe.ChkZaiko = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkMisyonin]).Checked) { doe.ChkMisyonin = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkSyoninzumi]).Checked) { doe.ChkSyoninzumi = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkChokuso]).Checked) { doe.ChkChokuso = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkSouko]).Checked) { doe.ChkSouko = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkNet]).Checked) { doe.ChkNet = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkFax]).Checked) { doe.ChkFax = 1; } if (((CheckBox)detailControls[(int)EIndex.ChkEdi]).Checked) { doe.ChkEdi = 1; } mse = new M_SKU_Entity { SKUName = detailControls[(int)EIndex.SKUName].Text, ITemCD = detailControls[(int)EIndex.ITemCD].Text, //カンマ区切り SKUCD = detailControls[(int)EIndex.SKUCD].Text, //カンマ区切り JanCD = detailControls[(int)EIndex.JanCD].Text, //カンマ区切り MakerItem = detailControls[(int)EIndex.MakerItem].Text, //カンマ区切り }; return(doe); }
/// <summary> /// 商品取得 /// </summary> /// <param name="dme"></param> /// <returns></returns> public DataTable M_SKU_SelectForMarkDown(M_SKU_Entity mse) { return(mdl.M_SKU_SelectForMarkDown(mse)); }
public DataTable ZaikoShoukai_Search(M_SKU_Entity msku_entity, M_SKUInfo_Entity msInfo_entity, M_SKUTag_Entity msTag, D_Stock_Entity ds_Entity, int Type) { Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair> { { "@ChangeDate", new ValuePair { value1 = SqlDbType.Date, value2 = msku_entity.ChangeDate } }, { "@VendorCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.MainVendorCD } }, { "@makerCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.MakerVendorCD } }, { "@brandCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.BrandCD } }, { "@SKUName", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.SKUName } }, { "@JanCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.JanCD } }, { "@SkuCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.SKUCD } }, { "@MakerItem", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.MakerItem } }, { "@ItemCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.ITemCD } }, { "@CommentInStore", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.CommentInStore } }, { "@ReserveCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.ReserveCD } }, { "@NticesCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.NoticesCD } }, { "@PostageCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.PostageCD } }, { "@OrderAttentionCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.OrderAttentionCD } }, { "@SportsCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = msku_entity.SportsCD } }, { "@InsertDateTimeT", new ValuePair { value1 = SqlDbType.Date, value2 = msku_entity.InputDateTo } }, { "@InsertDateTimeF", new ValuePair { value1 = SqlDbType.Date, value2 = msku_entity.InputDateFrom } }, { "@UpdateDateTimeT", new ValuePair { value1 = SqlDbType.Date, value2 = msku_entity.UpdateDateFrom } }, { "@UpdateDateTimeF", new ValuePair { value1 = SqlDbType.Date, value2 = msku_entity.UpdateDateTo } }, { "@ApprovalDateF", new ValuePair { value1 = SqlDbType.Date, value2 = msku_entity.ApprovalDateFrom } }, { "@ApprovalDateT", new ValuePair { value1 = SqlDbType.Date, value2 = msku_entity.ApprovalDateTo } }, { "@YearTerm", new ValuePair { value1 = SqlDbType.VarChar, value2 = msInfo_entity.YearTerm } }, { "@Season", new ValuePair { value1 = SqlDbType.VarChar, value2 = msInfo_entity.Season } }, { "@CatalogNo", new ValuePair { value1 = SqlDbType.VarChar, value2 = msInfo_entity.CatalogNO } }, { "@InstructionsNO", new ValuePair { value1 = SqlDbType.VarChar, value2 = msInfo_entity.InstructionsNO } }, { "@TagName1", new ValuePair { value1 = SqlDbType.VarChar, value2 = msTag.TagName1 } }, { "@TagName2", new ValuePair { value1 = SqlDbType.VarChar, value2 = msTag.TagName2 } }, { "@TagName3", new ValuePair { value1 = SqlDbType.VarChar, value2 = msTag.TagName3 } }, { "@TagName4", new ValuePair { value1 = SqlDbType.VarChar, value2 = msTag.TagName4 } }, { "@TagName5", new ValuePair { value1 = SqlDbType.VarChar, value2 = msTag.TagName5 } }, { "@type", new ValuePair { value1 = SqlDbType.Int, value2 = Type.ToString() } }, { "@SoukoCD", new ValuePair { value1 = SqlDbType.VarChar, value2 = ds_Entity.SoukoCD } }, { "@RackNoF", new ValuePair { value1 = SqlDbType.VarChar, value2 = ds_Entity.RackNOFrom } }, { "@RackNoT", new ValuePair { value1 = SqlDbType.VarChar, value2 = ds_Entity.RackNOTo } }, }; return(SelectData(dic, "ZaikoShoukai_Search")); }
/// <summary> /// Print Report on F12 Click /// </summary> protected override void PrintSec() { if (PrintMode != EPrintMode.DIRECT) { return; } if (ErrorCheck()) { sku_data = M_SKU_data(); dms = D_MonthlyStock_data(); chk = Check_ITemORMakerItem(); dtReport = new DataTable(); dtReport = zmibl.ZaikoMotochoulnsatsu_Report(sku_data, dms, chk); if (dtReport.Rows.Count > 0) { CheckBeforeExport(); try { ZaikoMotochoulnsatsu_Report zm_report = new ZaikoMotochoulnsatsu_Report(); DialogResult DResult; switch (PrintMode) { case EPrintMode.DIRECT: DResult = bbl.ShowMessage("Q201"); if (DResult == DialogResult.Cancel) { return; } // 印字データをセット zm_report.SetDataSource(dtReport); zm_report.Refresh(); zm_report.SetParameterValue("lblYearMonth", txtTargetPeriodF.Text + " ~ " + txtTargetPeriodT.Text); zm_report.SetParameterValue("lblSouko", cboSouko.SelectedValue.ToString() + " " + cboSouko.Text); zm_report.SetParameterValue("lblToday", DateTime.Now.ToString("yyyy/MM/dd") + " " + DateTime.Now.ToString("HH:mm")); //zm_report.SetParameterValue("lblSKU", dtReport.Rows[0]["SKUCD"].ToString()); // zm_report.SetParameterValue("lblJANCD", dtReport.Rows[0]["JANCD"].ToString()); // zm_report.SetParameterValue("lblCSB", dtReport.Rows[0]["ColorName"].ToString() + " " + dtReport.Rows[0]["SizeName"].ToString() + " " + dtReport.Rows[0]["BrandName"].ToString()); vr.CrystalReportViewer1.ReportSource = zm_report; //vr.ShowDialog(); try { // crv = vr.CrystalReportViewer1; } catch (Exception ex) { var msg = ex.Message; } //out log before print if (DResult == DialogResult.Yes) { //印刷処理プレビュー vr = new Viewer(); vr.CrystalReportViewer1.ShowPrintButton = true; vr.CrystalReportViewer1.ReportSource = zm_report; vr.ShowDialog(); } else { //int marginLeft = 360; CrystalDecisions.Shared.PageMargins margin = zm_report.PrintOptions.PageMargins; margin.leftMargin = DefaultMargin.Left; // mmの指定をtwip単位に変換する margin.topMargin = DefaultMargin.Top; margin.bottomMargin = DefaultMargin.Bottom; //mmToTwip(marginLeft); margin.rightMargin = DefaultMargin.Right; zm_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(); zm_report.PrintOptions.PrinterName = "\\\\dataserver\\Canon LBP2900"; System.Drawing.Printing.PageSettings pSettings = new System.Drawing.Printing.PageSettings(printerSettings); zm_report.PrintOptions.DissociatePageSizeAndPrinterPaperSize = true; zm_report.PrintOptions.PrinterDuplex = PrinterDuplex.Simplex; zm_report.PrintToPrinter(printerSettings, pSettings, false, PrintLayout); // Print the report. Set the startPageN and endPageN // parameters to 0 to print all pages. //Report.PrintToPrinter(1, false, 0, 0); } catch (Exception ex) { } } break; } //プログラム実行履歴 InsertLog(Get_L_Log_Entity()); } finally { //画面はそのまま txtTargetPeriodF.Focus(); } } else { bbl.ShowMessage("E128"); } } }
protected override void ExecDisp() { bool inputFlg = false; for (int i = 0; i < detailControls.Length; i++) { if (!string.IsNullOrWhiteSpace(detailControls[i].Text)) { inputFlg = true; } if (CheckDetail(i) == false) { detailControls[i].Focus(); return; } } if (inputFlg == false) { //全てが空白(入力が無い)場合、エラーとする。 sbl.ShowMessage("E111"); return; } M_SKUInfo_Entity msie = new M_SKUInfo_Entity(); mse = GetSearchInfo(msie); DataTable dt = sbl.M_SKU_SelectForSearchProduct(mse, msie); if (dt.Rows.Count > 0) { //ストアドで実装するように変更 //if (!string.IsNullOrWhiteSpace(detailControls[(int)EIndex.ITemCD].Text)) //{ // string[] itemDt = detailControls[(int)EIndex.ITemCD].Text.Split(','); // if (itemDt.Length > 0) // { // //foreach (DataRow dr in dt.Rows) // for(int i=dt.Rows.Count-1; 0<=i; i--) // { // int index = Array.IndexOf(itemDt, dt.Rows[i]["ItemCD"].ToString()); // if (index < 0) // { // dt.Rows.Remove(dt.Rows[i]); // } // } // } //} //if (!string.IsNullOrWhiteSpace(detailControls[(int)EIndex.MakerItem].Text)) //{ // string[] makerDt = detailControls[(int)EIndex.MakerItem].Text.Split(','); // if (makerDt.Length > 0) // { // for (int i = dt.Rows.Count - 1; 0 <= i; i--) // { // int index = Array.IndexOf(makerDt, dt.Rows[i]["MakerItem"].ToString()); // if (index < 0) // { // dt.Rows.Remove(dt.Rows[i]); // } // } // } //} if (ChkSearch.Checked) { string[] item = new string[dt.Rows.Count]; int itemCount = 0; if (ckM_RadioButton3.Checked) { foreach (DataRow dr in dt.Rows) { int index = Array.IndexOf(item, dr["ItemCD"].ToString()); if (index < 0) { item[itemCount] = dr["ItemCD"].ToString(); itemCount++; } } string val = ""; for (int i = 0; i < itemCount; i++) { if (i == 0) { val += item[i]; } else { val += "," + item[i]; } } detailControls[(int)EIndex.ITemCD].Text = val; } else { foreach (DataRow dr in dt.Rows) { int index = Array.IndexOf(item, dr["MakerItem"].ToString()); if (index < 0) { item[itemCount] = dr["MakerItem"].ToString(); itemCount++; } } string val = ""; for (int i = 0; i < itemCount; i++) { if (i == 0) { val += item[i]; } else { val += "," + item[i]; } } detailControls[(int)EIndex.MakerItem].Text = val; } } GvDetail.DataSource = dt; GvDetail.ScrollBars = ScrollBars.Both; GvDetail.SelectionMode = DataGridViewSelectionMode.FullRowSelect; GvDetail.CurrentRow.Selected = true; if (Mode == "5") { GvDetail.ReadOnly = false; for (int i = 0; i < GvDetail.ColumnCount; i++) { if (i.Equals(0)) { GvDetail.Columns[i].ReadOnly = false; } else { GvDetail.Columns[i].ReadOnly = true; } } } GvDetail.Enabled = true; GvDetail.Focus(); } else { sbl.ShowMessage("E128"); } }
private M_SKU_Entity GetSearchInfo(M_SKUInfo_Entity msie) { string rsvCd = ""; if (cboReserveCD.SelectedValue != null) { if (!cboReserveCD.SelectedValue.Equals("-1")) { rsvCd = cboReserveCD.SelectedValue.ToString(); } } string posCd = ""; if (cboPostageCD.SelectedValue != null) { if (!cboPostageCD.SelectedValue.Equals("-1")) { posCd = cboPostageCD.SelectedValue.ToString(); } } string notCd = ""; if (cboNoticesCD.SelectedValue != null) { if (!cboNoticesCD.SelectedValue.Equals("-1")) { notCd = cboNoticesCD.SelectedValue.ToString(); } } string orACd = ""; if (cboOrderAttentionCD.SelectedValue != null) { if (!cboOrderAttentionCD.SelectedValue.Equals("-1")) { orACd = cboOrderAttentionCD.SelectedValue.ToString(); } } string tag1 = ""; if (cboTagName1.SelectedValue != null) { if (!cboTagName1.SelectedValue.Equals("-1")) { tag1 = cboTagName1.SelectedText; } } string tag2 = ""; if (cboTagName2.SelectedValue != null) { if (!cboTagName2.SelectedValue.Equals("-1")) { tag2 = cboTagName2.SelectedText; } } string tag3 = ""; if (cboTagName3.SelectedValue != null) { if (!cboTagName3.SelectedValue.Equals("-1")) { tag3 = cboTagName3.SelectedText; } } string tag4 = ""; if (cboTagName4.SelectedValue != null) { if (!cboTagName4.SelectedValue.Equals("-1")) { tag4 = cboTagName4.Text; } } string tag5 = ""; if (cboTagName5.SelectedValue != null) { if (!cboTagName5.SelectedValue.Equals("-1")) { tag5 = cboTagName5.SelectedText; } } mse = new M_SKU_Entity { MainVendorCD = detailControls[(int)EIndex.VendorCd].Text, BrandCD = detailControls[(int)EIndex.BrandCD].Text, SKUName = detailControls[(int)EIndex.SKUName].Text, JanCD = detailControls[(int)EIndex.JanCD].Text, SKUCD = detailControls[(int)EIndex.SKUCD].Text, CommentInStore = detailControls[(int)EIndex.CommentInStore].Text, //カンマ区切り ReserveCD = rsvCd, NoticesCD = notCd, PostageCD = posCd, OrderAttentionCD = orACd, SportsCD = detailControls[(int)EIndex.SportsCD].Text, TagName1 = cboTagName1.Text, TagName2 = cboTagName2.Text, TagName3 = cboTagName3.Text, TagName4 = cboTagName4.Text, TagName5 = cboTagName5.Text, //ClassificationA = scClassificationA.TxtCode.Text, //ClassificationB = scClassificationB.TxtCode.Text, //ClassificationC = scClassificationC.TxtCode.Text, MakerItem = detailControls[(int)EIndex.MakerItem].Text, //カンマ区切り ITemCD = detailControls[(int)EIndex.ITemCD].Text, //カンマ区切り InputDateFrom = detailControls[(int)EIndex.InputStart].Text, InputDateTo = detailControls[(int)EIndex.InputEnd].Text, UpdateDateFrom = detailControls[(int)EIndex.UpdateStart].Text, UpdateDateTo = detailControls[(int)EIndex.UpdateEnd].Text, ApprovalDateFrom = detailControls[(int)EIndex.DayStart].Text, ApprovalDateTo = detailControls[(int)EIndex.DayEnd].Text, ChangeDate = this.ChangeDate, }; msie.YearTerm = CboYearTerm.SelectedValue.Equals("-1") ? string.Empty : CboYearTerm.SelectedValue.ToString(); msie.Season = CboSeason.SelectedValue.Equals("-1") ? string.Empty : CboSeason.SelectedValue.ToString(); msie.CatalogNO = detailControls[(int)EIndex.CatalogNO].Text; msie.InstructionsNO = detailControls[(int)EIndex.InstructionsNO].Text; if (ckM_RadioButton1.Checked) { mse.OrOrAnd = "0"; } else { mse.OrOrAnd = "1"; } if (ChkSearch.Checked) { mse.SearchFlg = "1"; if (ckM_RadioButton3.Checked) { mse.ItemOrMaker = "0"; } else { mse.ItemOrMaker = "1"; } } else { mse.SearchFlg = "0"; } return(mse); }