Browse Source

补打不显示名称的bug修改

master
ruoxing.wang 6 months ago
parent
commit
686cf147f2
  1. 23
      InjectionSearch/FrmBarCodeSearchNew.cs

23
InjectionSearch/FrmBarCodeSearchNew.cs

@ -187,8 +187,17 @@ namespace InjectionSearch
////report.PrintPreview(true); ////report.PrintPreview(true);
//report.Print(false); //report.Print(false);
//(glacialList1.SelectedItems[0] as GlacialComponents.Controls.GLItem).SubItems[1].Text
Print(md.OneBarCode, md.BarCode, md.Import); string productName = string.Empty;
if (glacialList1.SelectedItems.Count > 0)
{
GlacialComponents.Controls.GLItem gLItem = glacialList1.SelectedItems[0] as GlacialComponents.Controls.GLItem;
if(gLItem.SubItems.Count > 1)
{
productName = gLItem.SubItems[1].Text;
}
}
Print(md.OneBarCode, md.BarCode, md.Import, productName);
#endregion #endregion
@ -345,6 +354,7 @@ namespace InjectionSearch
md.PrintType = 1; md.PrintType = 1;
DataTable pdt = pbll.SearchIsImportByStockNo(stockNo); DataTable pdt = pbll.SearchIsImportByStockNo(stockNo);
string productName = string.Empty;
if (pdt != null && pdt.Rows.Count > 0) if (pdt != null && pdt.Rows.Count > 0)
{ {
if (pdt.Rows[0]["isImport"].ToString() == "1") if (pdt.Rows[0]["isImport"].ToString() == "1")
@ -355,6 +365,7 @@ namespace InjectionSearch
{ {
md.Import = ""; md.Import = "";
} }
productName = pdt.Rows[0]["ProductName"].ToString();
} }
if (bll.Add_Info(md)) if (bll.Add_Info(md))
@ -372,7 +383,7 @@ namespace InjectionSearch
////report.PrintPreview(true); ////report.PrintPreview(true);
//report.Print(false); //report.Print(false);
Print(NewOneCode, newcode, md.Import); Print(NewOneCode, newcode, md.Import, productName);
#endregion #endregion
@ -527,7 +538,7 @@ namespace InjectionSearch
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
} }
} }
void Print(string NewOneCode,string newcode,string Import) void Print(string NewOneCode,string newcode,string Import,string productName)
{ {
string filename = _printTemplateName; string filename = _printTemplateName;
@ -542,7 +553,9 @@ namespace InjectionSearch
row["OneBarCode"] = NewOneCode; row["OneBarCode"] = NewOneCode;
row["BarCode"] = newcode; row["BarCode"] = newcode;
row["ProductName"] = comboBox2.Text + ";";
row["ProductName"] = productName + ";";
row["IsImport"] = Import; row["IsImport"] = Import;
string reportName = ConfigurationManager.AppSettings["Printer"]; string reportName = ConfigurationManager.AppSettings["Printer"];

Loading…
Cancel
Save