|
@@ -1398,7 +1398,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
int begin = int.Parse(SingleBoxBegin.Text == "" ? "1" : SingleBoxBegin.Text);
|
|
|
int end = int.Parse(SingleBoxEnd.Text == "" ? LabelInf.Rows.Count.ToString() : SingleBoxEnd.Text);
|
|
|
- if (begin > 0 && end <= LabelInf.Rows.Count)
|
|
|
+ if (begin > 0 && end <= LabelInf.Rows.Count && begin <= end)
|
|
|
{
|
|
|
for (int i = begin - 1; i < end; i++)
|
|
|
{
|
|
@@ -1442,7 +1442,7 @@ namespace UAS_LabelMachine
|
|
|
end = int.Parse(MidBoxEnd.Text == "" ? LabelInf.Rows[LabelInf.Rows.Count - 1].Cells["pib_outboxcode1"].Value.ToString() : MidBoxEnd.Text);
|
|
|
int minmidbox = int.Parse(LabelInf.Rows[0].Cells["pib_outboxcode1"].Value.ToString());
|
|
|
int maxmidbox = int.Parse(LabelInf.Rows[LabelInf.Rows.Count - 1].Cells["pib_outboxcode1"].Value.ToString());
|
|
|
- if (begin >= minmidbox && end <= maxmidbox)
|
|
|
+ if (begin >= minmidbox && end <= maxmidbox && begin <= end)
|
|
|
{
|
|
|
//设置中盒打印范围的行号
|
|
|
for (int i = 0; i < LabelInf.Rows.Count; i++)
|