添加自动编号
This commit is contained in:
@@ -168,7 +168,7 @@ namespace U8AppMain
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var bomLookup = new Dictionary<string, Purchase.ufinterface>();
|
var bomLookup = new Dictionary<string, Purchase.ufinterface>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -215,15 +215,17 @@ namespace U8AppMain
|
|||||||
{
|
{
|
||||||
|
|
||||||
this.richTextBox1.SelectionColor = Color.Red;
|
this.richTextBox1.SelectionColor = Color.Red;
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -467,7 +469,7 @@ namespace U8AppMain
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
NX.ERP.U8.U8LoginContext.Instance.Login();
|
NX.ERP.U8.U8LoginContext.Instance.Login();
|
||||||
this.Text =$"[{NX.ERP.U8.U8LoginContext.Instance.AccID}]{NX.ERP.U8.U8LoginContext.Instance.AccName}";
|
this.Text = $"[{NX.ERP.U8.U8LoginContext.Instance.AccID}]{NX.ERP.U8.U8LoginContext.Instance.AccName}";
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
|
|||||||
Reference in New Issue
Block a user