|
@ -25,7 +25,7 @@ namespace InjectionSearch |
|
|
public FrmBarCodeSearchNew() |
|
|
public FrmBarCodeSearchNew() |
|
|
{ |
|
|
{ |
|
|
InitializeComponent(); |
|
|
InitializeComponent(); |
|
|
_printTemplateName = Application.StartupPath + "\\Report\\P02 - 副本.grf"; |
|
|
_printTemplateName = Application.StartupPath + "\\Report\\111 - 副本.grf"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void initProduct() |
|
|
private void initProduct() |
|
@ -113,6 +113,11 @@ namespace InjectionSearch |
|
|
_stationTable = sbll.SearchAllInfo(); |
|
|
_stationTable = sbll.SearchAllInfo(); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 补打
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
private void label18_Click(object sender, EventArgs e) |
|
|
private void label18_Click(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
string code = ""; |
|
|
string code = ""; |
|
@ -171,15 +176,18 @@ namespace InjectionSearch |
|
|
|
|
|
|
|
|
#region 打印条码
|
|
|
#region 打印条码
|
|
|
|
|
|
|
|
|
GridppReport report = new GridppReport(); |
|
|
//GridppReport report = new GridppReport();
|
|
|
|
|
|
|
|
|
report.Register(""); |
|
|
//report.Register("");
|
|
|
//report.LoadFromFile(@"D:\P02 - 副本.grf");
|
|
|
////report.LoadFromFile(@"D:\P02 - 副本.grf");
|
|
|
report.LoadFromFile(_printTemplateName); |
|
|
//report.LoadFromFile(_printTemplateName);
|
|
|
report.ConnectionString = ConfigurationManager.ConnectionStrings["report"].ToString(); |
|
|
//report.ConnectionString = ConfigurationManager.ConnectionStrings["report"].ToString();
|
|
|
|
|
|
|
|
|
|
|
|
////report.PrintPreview(true);
|
|
|
|
|
|
//report.Print(false);
|
|
|
|
|
|
|
|
|
|
|
|
Print(md.OneBarCode, md.BarCode, md.Import); |
|
|
|
|
|
|
|
|
//report.PrintPreview(true);
|
|
|
|
|
|
report.Print(false); |
|
|
|
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
bll.Update_Info(md); |
|
|
bll.Update_Info(md); |
|
@ -351,19 +359,25 @@ namespace InjectionSearch |
|
|
{ |
|
|
{ |
|
|
#region 打印条码
|
|
|
#region 打印条码
|
|
|
|
|
|
|
|
|
GridppReport report = new GridppReport(); |
|
|
//GridppReport report = new GridppReport();
|
|
|
|
|
|
|
|
|
|
|
|
//report.Register("");
|
|
|
|
|
|
////report.LoadFromFile(@"D:\P02.grf");
|
|
|
|
|
|
////report.LoadFromFile(@"D:\P02 - 副本.grf");
|
|
|
|
|
|
//report.LoadFromFile(_printTemplateName);
|
|
|
|
|
|
//report.ConnectionString = ConfigurationManager.ConnectionStrings["report"].ToString();
|
|
|
|
|
|
|
|
|
|
|
|
////report.PrintPreview(true);
|
|
|
|
|
|
//report.Print(false);
|
|
|
|
|
|
|
|
|
report.Register(""); |
|
|
Print(NewOneCode, newcode, md.Import); |
|
|
//report.LoadFromFile(@"D:\P02.grf");
|
|
|
|
|
|
//report.LoadFromFile(@"D:\P02 - 副本.grf");
|
|
|
|
|
|
report.LoadFromFile(_printTemplateName); |
|
|
|
|
|
report.ConnectionString = ConfigurationManager.ConnectionStrings["report"].ToString(); |
|
|
|
|
|
|
|
|
|
|
|
//report.PrintPreview(true);
|
|
|
|
|
|
report.Print(false); |
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bll.Update_Info(md); |
|
|
bll.Update_Info(md); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -511,7 +525,36 @@ namespace InjectionSearch |
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); |
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
void Print(string NewOneCode,string newcode,string Import) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
string filename = _printTemplateName; |
|
|
|
|
|
DataTable headTable = new DataTable(); |
|
|
|
|
|
headTable.Columns.Add("StationNo"); |
|
|
|
|
|
headTable.Columns.Add("OneBarCode"); |
|
|
|
|
|
headTable.Columns.Add("BarCode"); |
|
|
|
|
|
headTable.Columns.Add("ProductName"); |
|
|
|
|
|
headTable.Columns.Add("IsImport"); |
|
|
|
|
|
DataRow row = headTable.NewRow(); |
|
|
|
|
|
row["StationNo"] = Program.station; |
|
|
|
|
|
|
|
|
|
|
|
row["OneBarCode"] = NewOneCode; |
|
|
|
|
|
row["BarCode"] = newcode; |
|
|
|
|
|
row["ProductName"] = comboBox2.Text + ";"; |
|
|
|
|
|
row["IsImport"] = Import; |
|
|
|
|
|
string reportName = ConfigurationManager.AppSettings["Printer"]; |
|
|
|
|
|
|
|
|
|
|
|
headTable.Rows.Add(row); |
|
|
|
|
|
|
|
|
|
|
|
InjectionPC.ReportHelper rp = new InjectionPC.ReportHelper(filename, headTable, null, |
|
|
|
|
|
(int)GRPaperOrientation.grpoDefault, 1, reportName); |
|
|
|
|
|
rp.Report.Print(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InjectionPC.LogHelper.WriteLog("打印时间:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ";" + NewOneCode); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
private void button1_Click(object sender, EventArgs e) |
|
|
private void button1_Click(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
BarCodeBLL bll = new BarCodeBLL(); |
|
|
BarCodeBLL bll = new BarCodeBLL(); |
|
|