|
|
@@ -462,7 +462,18 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- for (int i = 0; i < Input.Text.Split(sg_separator.Text.ToCharArray()).Length; i++)
|
|
|
+ int DataCount = Input.Text.Split(sg_separator.Text.ToCharArray()).Length;
|
|
|
+ if (DataCount > ItemData.Length)
|
|
|
+ {
|
|
|
+ MessageBox.Show("采集数据大于采集项次");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else if (DataCount < ItemData.Length)
|
|
|
+ {
|
|
|
+ MessageBox.Show("采集数据小于采集项次");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (int i = 0; i < DataCount; i++)
|
|
|
CollectData.Add(ItemData[i].ToString().ToUpper(), Input.Text.Split(sg_separator.Text.ToCharArray())[i]);
|
|
|
}
|
|
|
//首先判断当前采集的个数,如果采集的个数为1则不对数据进行分隔符验证
|
|
|
@@ -1345,7 +1356,8 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
LogManager.DoLog(ParamLog.ToString());
|
|
|
//保存参数打印
|
|
|
- if (EnablePrint) {
|
|
|
+ if (EnablePrint)
|
|
|
+ {
|
|
|
SingleDoc.Printer.SwitchTo(SingleLabelPrinter.Text);
|
|
|
SingleDoc.PrintDocument();
|
|
|
}
|
|
|
@@ -1844,7 +1856,8 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
}
|
|
|
//保存参数打印
|
|
|
- if (EnablePrint) {
|
|
|
+ if (EnablePrint)
|
|
|
+ {
|
|
|
MidDoc.Printer.SwitchTo(MidLabelPrinter.Text);
|
|
|
MidDoc.PrintDocument();
|
|
|
}
|
|
|
@@ -1928,7 +1941,8 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
}
|
|
|
//保存参数打印
|
|
|
- if (EnablePrint) {
|
|
|
+ if (EnablePrint)
|
|
|
+ {
|
|
|
MidDoc.Printer.SwitchTo(MidLabelPrinter.Text);
|
|
|
MidDoc.PrintDocument();
|
|
|
}
|
|
|
@@ -2022,7 +2036,8 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
}
|
|
|
//保存参数打印
|
|
|
- if (EnablePrint) {
|
|
|
+ if (EnablePrint)
|
|
|
+ {
|
|
|
OutBoxDoc.Printer.SwitchTo(OutBoxPrinter.Text);
|
|
|
OutBoxDoc.PrintDocument();
|
|
|
}
|
|
|
@@ -2726,11 +2741,17 @@ namespace UAS_LabelMachine
|
|
|
if (e.ColumnIndex >= 0 && e.RowIndex >= 0)
|
|
|
{
|
|
|
CurrentItemIndex = 0;
|
|
|
+ DataGridViewSelectedRowCollection col = LabelInf.SelectedRows;
|
|
|
+ for (int i = 0; i < col.Count; i++)
|
|
|
+ {
|
|
|
+ col[i].Selected = false;
|
|
|
+ }
|
|
|
for (int i = 0; i < LabelInf.RowCount; i++)
|
|
|
{
|
|
|
if (GridPrcode.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
|
|
|
{
|
|
|
CurrentRowIndex = i;
|
|
|
+ LabelInf.Rows[i].Selected=true;
|
|
|
break;
|
|
|
}
|
|
|
}
|