添加领料单

This commit is contained in:
admin
2020-12-19 15:30:38 +08:00
parent ee176b4e24
commit 1e8bbc7493
7 changed files with 262 additions and 27 deletions

View File

@@ -26,7 +26,7 @@ namespace U8AppMain
{
this.richTextBox1.SelectionColor = Color.Black;
this.richTextBox1.AppendText($"单据:{info.requestroottag} 操作:{info.proc} \r\n");
foreach (var item in info.Items)
{
string tag;
@@ -44,7 +44,7 @@ namespace U8AppMain
}
this.richTextBox1.SelectionColor = Color.Black;
this.richTextBox1.AppendText($"---------------------------------------------------------------------------------------\r\n");
}
@@ -73,6 +73,7 @@ namespace U8AppMain
}
private string url = ConfigurationManager.AppSettings.Get("url");
private string connStr = ConfigurationManager.AppSettings.Get("connStr");
private DataTable dataTable;
@@ -140,20 +141,20 @@ namespace U8AppMain
bom.Bom.ComponentBodies.Add(comp);
}
}
catch (Exception err)
catch (Exception)
{
this.richTextBox1.SelectionColor = Color.Red;
this.richTextBox1.AppendText("读取数据出错\r\n");
return;
}
foreach (var item in bomLookup.Values)
{
var strbody = XmlHelper.XmlSerialize(item, Encoding.UTF8);
var response = await this.HttpPost(strbody);
PrintLog(response);
Application.DoEvents();
}
@@ -200,7 +201,7 @@ namespace U8AppMain
this.richTextBox1.AppendText("读取数据出错\r\n");
return;
}
foreach (var item in bomLookup.Values)
{
var strbody = XmlHelper.XmlSerialize(item, Encoding.UTF8);
@@ -217,5 +218,30 @@ namespace U8AppMain
//滚动到光标位置
richTextBox1.ScrollToCaret();
}
private void 领料单ToolStripMenuItem_Click(object sender, EventArgs e)
{
var a = new Voucher.VoucherDAL(connStr);
a.Add(new Voucher.Vouch()
{
DDate=DateTime.Today,
CRdCode="201",
CDepCode="5401",
CPersonCode="wx014",
CMaker="朱杰",
Vt_id="30718",
IswfControlled=0,
Vouchs=new List<Voucher.Vouchs>() {
new Voucher.Vouchs(){
CInvCode="107001",
Iquantity=20,
CwhCode="2",
}
}
});;
}
}
}