获取默认VID

This commit is contained in:
admin
2021-01-18 16:44:18 +08:00
parent 6f56a4ead3
commit caae14f652
9 changed files with 31 additions and 13 deletions

View File

@@ -105,7 +105,6 @@ namespace U8AppMain
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem2.Text = "采购入库单";
this.toolStripMenuItem2.Visible = false;
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
//
// 材料出库单ToolStripMenuItem
@@ -113,7 +112,6 @@ namespace U8AppMain
this.材料出库单ToolStripMenuItem.Name = "材料出库单ToolStripMenuItem";
this.材料出库单ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.材料出库单ToolStripMenuItem.Text = "材料出库单";
this.材料出库单ToolStripMenuItem.Visible = false;
this.材料出库单ToolStripMenuItem.Click += new System.EventHandler(this.材料出库单ToolStripMenuItem_Click);
//
// 其他入库ToolStripMenuItem
@@ -121,7 +119,6 @@ namespace U8AppMain
this.其他入库ToolStripMenuItem.Name = "其他入库ToolStripMenuItem";
this.其他入库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.其他入库ToolStripMenuItem.Text = "其他入库";
this.其他入库ToolStripMenuItem.Visible = false;
this.其他入库ToolStripMenuItem.Click += new System.EventHandler(this.其他入库ToolStripMenuItem_Click);
//
// 其他出库ToolStripMenuItem
@@ -129,7 +126,6 @@ namespace U8AppMain
this.其他出库ToolStripMenuItem.Name = "其他出库ToolStripMenuItem";
this.其他出库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.其他出库ToolStripMenuItem.Text = "其他出库";
this.其他出库ToolStripMenuItem.Visible = false;
this.其他出库ToolStripMenuItem.Click += new System.EventHandler(this.其他出库ToolStripMenuItem_Click);
//
// 销售出库ToolStripMenuItem
@@ -137,15 +133,13 @@ namespace U8AppMain
this.销售出库ToolStripMenuItem.Name = "销售出库ToolStripMenuItem";
this.销售出库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.销售出库ToolStripMenuItem.Text = "销售出库";
this.销售出库ToolStripMenuItem.Visible = false;
this.销售出库ToolStripMenuItem.Click += new System.EventHandler(this.销售出库ToolStripMenuItem_Click);
//
// 成品入库ToolStripMenuItem
//
this.成品入库ToolStripMenuItem.Name = "成品入库ToolStripMenuItem";
this.成品入库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.成品入库ToolStripMenuItem.Text = " 成品入库";
this.成品入库ToolStripMenuItem.Visible = false;
this.成品入库ToolStripMenuItem.Text = "成品入库";
this.成品入库ToolStripMenuItem.Click += new System.EventHandler(this.成品入库ToolStripMenuItem_Click);
//
// 导入ToolStripMenuItem

View File

@@ -59,6 +59,7 @@
<Compile Include="Base\UnitDAL.cs" />
<Compile Include="Base\WarehouseDAL.cs" />
<Compile Include="VoucherParameter.cs" />
<Compile Include="VT.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@@ -43,7 +43,7 @@ namespace NX.ERP.U8.Store
headXml.setAttribute("brdflag", 0);
headXml.setAttribute("cmaker", "");
headXml.setAttribute("cvouchtype", this.VoucherID);
headXml.setAttribute("vt_id", "65");
headXml.setAttribute("vt_id", new VT().GetDefaltVTID("0412"));
headXml.setAttribute("editprop", "A");
headXml.setAttribute("cdepcode", "1");

View File

@@ -39,7 +39,7 @@ namespace NX.ERP.U8.Store
headXml.setAttribute("ddate", storeIn.Date);
headXml.setAttribute("cmaker", "/");
headXml.setAttribute("cvouchtype", this.VoucherID);
headXml.setAttribute("vt_id", "");
headXml.setAttribute("vt_id",new VT().GetDefaltVTID("0301"));
headXml.setAttribute("editprop", "A");
headXml.setAttribute("cdepcode", "");
headXml.setAttribute("cpersoncode", "");

View File

@@ -38,7 +38,7 @@ namespace NX.ERP.U8.Store
headXml.setAttribute("ddate", storeIn.Date);
headXml.setAttribute("cmaker", "/");
headXml.setAttribute("cvouchtype", this.VoucherID);
headXml.setAttribute("vt_id", "");
headXml.setAttribute("vt_id", new VT().GetDefaltVTID("0302"));
headXml.setAttribute("editprop", "A");
headXml.setAttribute("cdepcode", "");
headXml.setAttribute("cpersoncode", "");

View File

@@ -37,7 +37,7 @@ namespace NX.ERP.U8.Store
headXml.setAttribute("ddate", storeIn.Date);
headXml.setAttribute("cmaker", "");
headXml.setAttribute("vt_id", "63");
headXml.setAttribute("vt_id", new VT().GetDefaltVTID("0411"));
headXml.setAttribute("editprop", "A");
headXml.setAttribute("cdepcode", "");
headXml.setAttribute("cpersoncode", "");

View File

@@ -44,7 +44,7 @@ namespace NX.ERP.U8.Store
headXml.setAttribute("brdflag", 1); //DomHead[0]["brdflag"] = ""; //收发标志,int类型
headXml.setAttribute("csource", puStoreIn.Source); //DomHead[0]["csource"] = ""; //单据来源,int类型
headXml.setAttribute("cmaker", puStoreIn.Maker);//DomHead[0]["cmaker"] = ""; //制单人,string类型
headXml.setAttribute("vt_id", "27");
headXml.setAttribute("vt_id", new VT().GetDefaltVTID("24"));
headXml.setAttribute("editprop", "A");
headXml.setAttribute("cdepcode", puStoreIn.Depcode);
headXml.setAttribute("cpersoncode", puStoreIn.PersonCode);

View File

@@ -40,7 +40,7 @@ namespace NX.ERP.U8.Store
headXml.setAttribute("ddate", storeOut.Date);
headXml.setAttribute("cmaker", "");
headXml.setAttribute("vt_id","");
headXml.setAttribute("vt_id", new VT().GetDefaltVTID("0303"));
headXml.setAttribute("editprop", "A");
headXml.setAttribute("cdepcode", "");
headXml.setAttribute("cpersoncode", "");

23
NX.ERP.U8/VT.cs Normal file
View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dapper;
namespace NX.ERP.U8
{
public class VT
{
public string GetDefaltVTID(string CardNumber)
{
using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net))
{
var strSql= "select DEF_ID from vouchers_base where CardNumber=@CardNumber";
return conn.ExecuteScalar<string>(strSql, new { CardNumber }, null, 100, System.Data.CommandType.Text);
}
}
}
}