添加自动编号
This commit is contained in:
@@ -218,12 +218,14 @@ namespace U8AppMain
|
|||||||
this.richTextBox1.AppendText("读取数据出错\r\n" + err.Message);
|
this.richTextBox1.AppendText("读取数据出错\r\n" + err.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
int index = 0;
|
||||||
foreach (var item in bomLookup.Values)
|
foreach (var item in bomLookup.Values)
|
||||||
{
|
{
|
||||||
|
item.purchaseapp.header.code = $"CGQG{DateTime.Today.ToString("yyMM")}{index.ToString().PadLeft(5, '0')}";
|
||||||
var strbody = XmlHelper.XmlSerialize(item, Encoding.UTF8);
|
var strbody = XmlHelper.XmlSerialize(item, Encoding.UTF8);
|
||||||
var response = this.HttpPost(strbody);
|
var response = this.HttpPost(strbody);
|
||||||
PrintLog(response);
|
PrintLog(response);
|
||||||
|
index++;
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user