ruoxing.wang 23 hours ago
parent
commit
d40ac9f44f
  1. 10
      PunchingMistake/FrmAssemble.cs
  2. 13
      PunchingMistake/Printer.cs

10
PunchingMistake/FrmAssemble.cs

@ -31,7 +31,7 @@ namespace PunchingMistake
private string _partNo1 = string.Empty;
private string _partNo2 = string.Empty;
private string _carModelCode = string.Empty;
private string _barCodeFormate = string.Empty;
private string _barCodeFormat = string.Empty;
/// <summary>
/// 当前设备行数据ID
/// </summary>
@ -58,10 +58,10 @@ namespace PunchingMistake
private void FrmAssemble_Load(object sender, EventArgs e)
{
_barCodeFormate = ConfigurationManager.AppSettings["BarCodeFormate"];
if (string.IsNullOrEmpty(_barCodeFormate))
_barCodeFormat = ConfigurationManager.AppSettings["BarCodeFormat"];
if (string.IsNullOrEmpty(_barCodeFormat))
{
MessageBox.Show("配置文件中,条码格式[BarCodeFormate]不能为空.");
MessageBox.Show("配置文件中,条码格式[BarCodeFormat]不能为空.");
return;
}
//stationId = ProScreenFunc.GetStationId(stationNo);
@ -487,7 +487,7 @@ namespace PunchingMistake
//
string serailNo = "00001";
string assembleBarCode = "";
if(_barCodeFormate == "MI")
if(_barCodeFormat == "MI")
{
assembleBarCode = _uniqueBll.GetPunchSerialNoMI(partNo1, 5, ref serailNo);
}

13
PunchingMistake/Printer.cs

@ -49,9 +49,16 @@ namespace PunchingMistake
}
static string GetPrintFileName()
{
string templateName = ConfigurationManager.AppSettings["PrintTemplate"].ToString();
return System.AppDomain.CurrentDomain.BaseDirectory + $"Report\\{templateName}.grf";
string templateName = ConfigurationManager.AppSettings["BarCodeFormat"].ToString();
if(templateName == "MI")
{
return System.AppDomain.CurrentDomain.BaseDirectory + $"Report\\总成条码MI.grf";
}
else
{
return System.AppDomain.CurrentDomain.BaseDirectory + $"Report\\总成条码Hyundai.grf";
}
}
}
}

Loading…
Cancel
Save