diff --git a/InjectionSearch/FrmBarCodeSearch2408.cs b/InjectionSearch/FrmBarCodeSearch2408.cs index bbab4f2..3a0cdbe 100644 --- a/InjectionSearch/FrmBarCodeSearch2408.cs +++ b/InjectionSearch/FrmBarCodeSearch2408.cs @@ -396,6 +396,12 @@ namespace InjectionSearch string size = comBoxSizeL.SelectedValue.ToString(); int.TryParse(size, out packageSize); + if(packageSize == 0) + { + MessageBox.Show("该产品规格标包为0,无法打印箱码,请取消后重试."); + return; + } + int allCount = Convert.ToInt32(textBox4.Text.Trim()); int i = allCount % packageSize; @@ -531,12 +537,14 @@ namespace InjectionSearch headTable.Columns.Add("PartName"); headTable.Columns.Add("OneBarCode"); headTable.Columns.Add("BarCode"); + headTable.Columns.Add("Station"); DataRow row = headTable.NewRow(); row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); row["PartNo"] = partNo; row["PartName"] = PartName; row["OneBarCode"] = NewOneCode; row["BarCode"] = newcode; + row["Station"] = comboBox2.Text?.Trim(); string reportName = ConfigurationManager.AppSettings["Printer1"].ToString(); headTable.Rows.Add(row); @@ -823,12 +831,14 @@ namespace InjectionSearch headTable.Columns.Add("PartName"); headTable.Columns.Add("OneBarCode"); headTable.Columns.Add("BarCode"); + headTable.Columns.Add("Station"); DataRow row = headTable.NewRow(); row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); row["PartNo"] = partNo; row["PartName"] = PartName; row["OneBarCode"] = NewOneCode; row["BarCode"] = newcode; + row["Station"] = comboBox2.Text?.Trim(); string reportName = ConfigurationManager.AppSettings["Printer1"].ToString(); headTable.Rows.Add(row); @@ -1003,6 +1013,7 @@ namespace InjectionSearch } catch (Exception ex) { + MessageBox.Show(ex.Message); LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); } } @@ -1126,14 +1137,14 @@ namespace InjectionSearch rp.Report.Print(false); - if (pnBoxReprint.Visible == true) - { - pnBoxReprint.Visible = false; - } - else - { - pnBoxReprint.Visible = true; - } + //if (pnBoxReprint.Visible == true) + //{ + // pnBoxReprint.Visible = false; + //} + //else + //{ + // pnBoxReprint.Visible = true; + //} } private void UpdateBoxRecordPrintState(string UpdatePrinted) { diff --git a/PaintingPC/Function.cs b/PaintingPC/Function.cs index 5e60388..efeb1d6 100644 --- a/PaintingPC/Function.cs +++ b/PaintingPC/Function.cs @@ -1177,7 +1177,7 @@ namespace PaintingPC select count(0) from tb_InspectResult where barcode = '" + barcode + @"' - and inspectResult = '[打磨]' + and inspectResult like '%打磨%' "; object aa = SqlHelper.ExecuteScalar(SqlHelper.SqlConnString, CommandType.Text, sql, null);