添加自动编号

This commit is contained in:
admin
2021-01-20 09:53:06 +08:00
parent 10c02c8807
commit e85d5724cb

View File

@@ -218,12 +218,14 @@ namespace U8AppMain
this.richTextBox1.AppendText("读取数据出错\r\n" + err.Message);
return;
}
int index = 0;
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 response = this.HttpPost(strbody);
PrintLog(response);
index++;
Application.DoEvents();
}