diff --git a/NX.ERP.Model/Model/Arrival.cs b/NX.ERP.Model/Model/Arrival.cs new file mode 100644 index 0000000..cae924a --- /dev/null +++ b/NX.ERP.Model/Model/Arrival.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model +{ + /// + /// 到货单 + /// + public class Arrival + { + private int id; + private string arrivalCode; + private DateTime _date; + + + + + + + + + } +} diff --git a/NX.ERP.Model/Model/ArrivalDetail.cs b/NX.ERP.Model/Model/ArrivalDetail.cs new file mode 100644 index 0000000..520df88 --- /dev/null +++ b/NX.ERP.Model/Model/ArrivalDetail.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model.Model +{ + public class ArrivalDetail + { + public int Autoid; + } +} diff --git a/NX.ERP.Model/Model/Bin.cs b/NX.ERP.Model/Model/Bin.cs new file mode 100644 index 0000000..7e5aa52 --- /dev/null +++ b/NX.ERP.Model/Model/Bin.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model +{ + public class Bin + { + private string _BinCode; + private string _BinName; + private string _IsPosGrade; + private bool _bPosEnd; + private string _WarehouseCode; + private int _VolumeLimit; + private int _WeightLimit; + private string _cMemo; + private string _cBarCode; + + public string BinCode { get => _BinCode; set => _BinCode = value; } + public string BinName { get => _BinName; set => _BinName = value; } + public string IsPosGrade { get => _IsPosGrade; set => _IsPosGrade = value; } + public bool BPosEnd { get => _bPosEnd; set => _bPosEnd = value; } + public string WarehouseCode { get => _WarehouseCode; set => _WarehouseCode = value; } + public int VolumeLimit { get => _VolumeLimit; set => _VolumeLimit = value; } + public int WeightLimit { get => _WeightLimit; set => _WeightLimit = value; } + public string CMemo { get => _cMemo; set => _cMemo = value; } + public string CBarCode { get => _cBarCode; set => _cBarCode = value; } + } +} diff --git a/NX.ERP.Model/Model/Customer.cs b/NX.ERP.Model/Model/Customer.cs new file mode 100644 index 0000000..c4b1d2f --- /dev/null +++ b/NX.ERP.Model/Model/Customer.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model +{ + public class Customer + { + private string customerCode; + private string customerName; + private string postalCode; + private string address; + private string contract; + private string contractPhone; + public string CustomerCode { get => customerCode; set => customerCode = value; } + public string PostalCode { get => postalCode; set => postalCode = value; } + public string Address { get => address; set => address = value; } + public string Contract { get => contract; set => contract = value; } + public string ContractPhone { get => contractPhone; set => contractPhone = value; } + public string CustomerName { get => customerName; set => customerName = value; } + } +} diff --git a/NX.ERP.Model/Model/Materiel.cs b/NX.ERP.Model/Model/Materiel.cs new file mode 100644 index 0000000..73c01ea --- /dev/null +++ b/NX.ERP.Model/Model/Materiel.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model +{ + public class Materiel + { + private string materielCode; + private string materielName; + private decimal length; + private decimal wide; + private decimal height; + private int volume; + private int weight; + private int unitPrice; + private string unitCode; + private string specsModel; + private int maxStock; + private int minStock; + private int aql; + + public string MaterielCode { get => materielCode; set => materielCode = value; } + public string MaterielName { get => materielName; set => materielName = value; } + public decimal Length { get => length; set => length = value; } + public decimal Wide { get => wide; set => wide = value; } + public decimal Height { get => height; set => height = value; } + public int Volume { get => volume; set => volume = value; } + public int Weight { get => weight; set => weight = value; } + public int UnitPrice { get => unitPrice; set => unitPrice = value; } + public string UnitCode { get => unitCode; set => unitCode = value; } + public string SpecsModel { get => specsModel; set => specsModel = value; } + public int MaxStock { get => maxStock; set => maxStock = value; } + public int MinStock { get => minStock; set => minStock = value; } + public int Aql { get => aql; set => aql = value; } + } +} diff --git a/NX.ERP.Model/Model/MaterielType.cs b/NX.ERP.Model/Model/MaterielType.cs new file mode 100644 index 0000000..f02ad23 --- /dev/null +++ b/NX.ERP.Model/Model/MaterielType.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model +{ + public class MaterielType + { + private string materielTypeCode; + private string materielTypeName; + + public string MaterielTypeCode { get => materielTypeCode; set => materielTypeCode = value; } + public string MaterielTypeName { get => materielTypeName; set => materielTypeName = value; } + } +} diff --git a/NX.ERP.Model/Model/Supplier.cs b/NX.ERP.Model/Model/Supplier.cs new file mode 100644 index 0000000..8ab0f65 --- /dev/null +++ b/NX.ERP.Model/Model/Supplier.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model +{ + public class Supplier + { + private string supplierCode; + private string supplierName; + private string postalCode; + private string address; + private string contract; + + public string SupplierCode { get => supplierCode; set => supplierCode = value; } + public string SupplierName { get => supplierName; set => supplierName = value; } + public string PostalCode { get => postalCode; set => postalCode = value; } + public string Address { get => address; set => address = value; } + public string Contract { get => contract; set => contract = value; } + } +} diff --git a/NX.ERP.Model/Model/Unit.cs b/NX.ERP.Model/Model/Unit.cs new file mode 100644 index 0000000..df90572 --- /dev/null +++ b/NX.ERP.Model/Model/Unit.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model +{ + public class Unit + { + private string unitCode; + private string unitName; + private bool mainUnit; + private string groupCode; + + public string UnitCode { get => unitCode; set => unitCode = value; } + public string UnitName { get => unitName; set => unitName = value; } + public bool MainUnit { get => mainUnit; set => mainUnit = value; } + public string GroupCode { get => groupCode; set => groupCode = value; } + } +} diff --git a/NX.ERP.Model/Model/Warehouse.cs b/NX.ERP.Model/Model/Warehouse.cs new file mode 100644 index 0000000..e23e813 --- /dev/null +++ b/NX.ERP.Model/Model/Warehouse.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model +{ + public class Warehouse + { + private string _WarehouseCode; + private string _WarehouseName; + + public string WarehouseCode { get => _WarehouseCode; set => _WarehouseCode = value; } + public string WarehouseName { get => _WarehouseName; set => _WarehouseName = value; } + } +} diff --git a/NX.ERP.Model/NX.ERP.Model.csproj b/NX.ERP.Model/NX.ERP.Model.csproj new file mode 100644 index 0000000..7c9a4bb --- /dev/null +++ b/NX.ERP.Model/NX.ERP.Model.csproj @@ -0,0 +1,72 @@ + + + + + Debug + AnyCPU + {5D012E0A-AFED-474E-81A9-5820890B1B29} + Library + Properties + NX.ERP.Model + NX.ERP.Model + v3.5 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + 7.3 + prompt + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + 7.3 + prompt + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NX.ERP.Model/Properties/AssemblyInfo.cs b/NX.ERP.Model/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..dc3258b --- /dev/null +++ b/NX.ERP.Model/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("NX.ERP.Model")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NX.ERP.Model")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("5d012e0a-afed-474e-81a9-5820890b1b29")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/NX.ERP.U8.App/App.config b/NX.ERP.U8.App/App.config new file mode 100644 index 0000000..1b23a4e --- /dev/null +++ b/NX.ERP.U8.App/App.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/U8AppMain/Bom/Bom.cs b/NX.ERP.U8.App/Bom/Bom.cs similarity index 97% rename from U8AppMain/Bom/Bom.cs rename to NX.ERP.U8.App/Bom/Bom.cs index eacc516..9d4fccb 100644 --- a/U8AppMain/Bom/Bom.cs +++ b/NX.ERP.U8.App/Bom/Bom.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + using System.Xml.Serialization; namespace U8AppMain.Bom diff --git a/U8AppMain/Bom/ComponentBody.cs b/NX.ERP.U8.App/Bom/ComponentBody.cs similarity index 93% rename from U8AppMain/Bom/ComponentBody.cs rename to NX.ERP.U8.App/Bom/ComponentBody.cs index 47df1f8..bc56ff7 100644 --- a/U8AppMain/Bom/ComponentBody.cs +++ b/NX.ERP.U8.App/Bom/ComponentBody.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + using System.Xml.Serialization; namespace U8AppMain.Bom diff --git a/U8AppMain/Bom/ComponentEnity.cs b/NX.ERP.U8.App/Bom/ComponentEnity.cs similarity index 98% rename from U8AppMain/Bom/ComponentEnity.cs rename to NX.ERP.U8.App/Bom/ComponentEnity.cs index 8bf3d1a..95f6025 100644 --- a/U8AppMain/Bom/ComponentEnity.cs +++ b/NX.ERP.U8.App/Bom/ComponentEnity.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Bom { diff --git a/U8AppMain/Bom/ComponentOptEnity.cs b/NX.ERP.U8.App/Bom/ComponentOptEnity.cs similarity index 95% rename from U8AppMain/Bom/ComponentOptEnity.cs rename to NX.ERP.U8.App/Bom/ComponentOptEnity.cs index 04f8444..7dc503f 100644 --- a/U8AppMain/Bom/ComponentOptEnity.cs +++ b/NX.ERP.U8.App/Bom/ComponentOptEnity.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Bom { diff --git a/U8AppMain/Bom/ComponentRmkEnity.cs b/NX.ERP.U8.App/Bom/ComponentRmkEnity.cs similarity index 84% rename from U8AppMain/Bom/ComponentRmkEnity.cs rename to NX.ERP.U8.App/Bom/ComponentRmkEnity.cs index eb521b0..ed333e4 100644 --- a/U8AppMain/Bom/ComponentRmkEnity.cs +++ b/NX.ERP.U8.App/Bom/ComponentRmkEnity.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Bom { diff --git a/U8AppMain/Bom/ParentEnity.cs b/NX.ERP.U8.App/Bom/ParentEnity.cs similarity index 94% rename from U8AppMain/Bom/ParentEnity.cs rename to NX.ERP.U8.App/Bom/ParentEnity.cs index c475f9a..184dcfe 100644 --- a/U8AppMain/Bom/ParentEnity.cs +++ b/NX.ERP.U8.App/Bom/ParentEnity.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Bom { diff --git a/U8AppMain/Bom/Version.cs b/NX.ERP.U8.App/Bom/Version.cs similarity index 96% rename from U8AppMain/Bom/Version.cs rename to NX.ERP.U8.App/Bom/Version.cs index 54afb93..e57ac4f 100644 --- a/U8AppMain/Bom/Version.cs +++ b/NX.ERP.U8.App/Bom/Version.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Bom { diff --git a/U8AppMain/Bom/ufinterface.cs b/NX.ERP.U8.App/Bom/ufinterface.cs similarity index 98% rename from U8AppMain/Bom/ufinterface.cs rename to NX.ERP.U8.App/Bom/ufinterface.cs index 8b2b7b1..bac80cf 100644 --- a/U8AppMain/Bom/ufinterface.cs +++ b/NX.ERP.U8.App/Bom/ufinterface.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + using System.Xml; namespace U8AppMain.Bom { diff --git a/U8AppMain/ExcelHelper.cs b/NX.ERP.U8.App/ExcelHelper.cs similarity index 98% rename from U8AppMain/ExcelHelper.cs rename to NX.ERP.U8.App/ExcelHelper.cs index 46d3bfe..d8921da 100644 --- a/U8AppMain/ExcelHelper.cs +++ b/NX.ERP.U8.App/ExcelHelper.cs @@ -1,11 +1,12 @@ -using NPOI.SS.UserModel; + +using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain { diff --git a/U8AppMain/FrmMain.Designer.cs b/NX.ERP.U8.App/FrmMain.Designer.cs similarity index 93% rename from U8AppMain/FrmMain.Designer.cs rename to NX.ERP.U8.App/FrmMain.Designer.cs index f531771..3a87739 100644 --- a/U8AppMain/FrmMain.Designer.cs +++ b/NX.ERP.U8.App/FrmMain.Designer.cs @@ -36,17 +36,18 @@ namespace U8AppMain this.ImportBom = new System.Windows.Forms.ToolStripMenuItem(); this.BtnPurchaseImport = new System.Windows.Forms.ToolStripMenuItem(); this.领料单ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.打印ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.打印ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.richTextBox1 = new System.Windows.Forms.RichTextBox(); - this.打印ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.打印ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.登录ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); // // menuStrip1 @@ -66,7 +67,8 @@ namespace U8AppMain // 操作ToolStripMenuItem // this.操作ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.BtnReadExcel}); + this.BtnReadExcel, + this.登录ToolStripMenuItem}); this.操作ToolStripMenuItem.Name = "操作ToolStripMenuItem"; this.操作ToolStripMenuItem.Size = new System.Drawing.Size(45, 19); this.操作ToolStripMenuItem.Text = "文件"; @@ -91,24 +93,39 @@ namespace U8AppMain // ImportBom // this.ImportBom.Name = "ImportBom"; - this.ImportBom.Size = new System.Drawing.Size(180, 22); + this.ImportBom.Size = new System.Drawing.Size(113, 22); this.ImportBom.Text = "BOM"; this.ImportBom.Click += new System.EventHandler(this.ImportBom_Click); // // BtnPurchaseImport // this.BtnPurchaseImport.Name = "BtnPurchaseImport"; - this.BtnPurchaseImport.Size = new System.Drawing.Size(180, 22); + this.BtnPurchaseImport.Size = new System.Drawing.Size(113, 22); this.BtnPurchaseImport.Text = "请购单"; this.BtnPurchaseImport.Click += new System.EventHandler(this.BtnPurchaseImport_Click); // // 领料单ToolStripMenuItem // this.领料单ToolStripMenuItem.Name = "领料单ToolStripMenuItem"; - this.领料单ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.领料单ToolStripMenuItem.Size = new System.Drawing.Size(113, 22); this.领料单ToolStripMenuItem.Text = "领料单"; this.领料单ToolStripMenuItem.Click += new System.EventHandler(this.领料单ToolStripMenuItem_Click); // + // 打印ToolStripMenuItem + // + this.打印ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.打印ToolStripMenuItem1}); + this.打印ToolStripMenuItem.Name = "打印ToolStripMenuItem"; + this.打印ToolStripMenuItem.Size = new System.Drawing.Size(45, 19); + this.打印ToolStripMenuItem.Text = "打印"; + // + // 打印ToolStripMenuItem1 + // + this.打印ToolStripMenuItem1.Name = "打印ToolStripMenuItem1"; + this.打印ToolStripMenuItem1.Size = new System.Drawing.Size(100, 22); + this.打印ToolStripMenuItem1.Text = "打印"; + this.打印ToolStripMenuItem1.Click += new System.EventHandler(this.打印ToolStripMenuItem1_Click); + // // splitContainer1 // this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; @@ -161,20 +178,12 @@ namespace U8AppMain this.richTextBox1.Text = ""; this.richTextBox1.TextChanged += new System.EventHandler(this.richTextBox1_TextChanged); // - // 打印ToolStripMenuItem + // 登录ToolStripMenuItem // - this.打印ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.打印ToolStripMenuItem1}); - this.打印ToolStripMenuItem.Name = "打印ToolStripMenuItem"; - this.打印ToolStripMenuItem.Size = new System.Drawing.Size(45, 19); - this.打印ToolStripMenuItem.Text = "打印"; - // - // 打印ToolStripMenuItem1 - // - this.打印ToolStripMenuItem1.Name = "打印ToolStripMenuItem1"; - this.打印ToolStripMenuItem1.Size = new System.Drawing.Size(180, 22); - this.打印ToolStripMenuItem1.Text = "打印"; - this.打印ToolStripMenuItem1.Click += new System.EventHandler(this.打印ToolStripMenuItem1_Click); + this.登录ToolStripMenuItem.Name = "登录ToolStripMenuItem"; + this.登录ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.登录ToolStripMenuItem.Text = "登录"; + this.登录ToolStripMenuItem.Click += new System.EventHandler(this.登录ToolStripMenuItem_Click); // // FrmMain // @@ -192,9 +201,9 @@ namespace U8AppMain this.menuStrip1.PerformLayout(); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); this.PerformLayout(); @@ -213,6 +222,7 @@ namespace U8AppMain private System.Windows.Forms.ToolStripMenuItem 领料单ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 打印ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 打印ToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem 登录ToolStripMenuItem; } } diff --git a/U8AppMain/FrmMain.cs b/NX.ERP.U8.App/FrmMain.cs similarity index 93% rename from U8AppMain/FrmMain.cs rename to NX.ERP.U8.App/FrmMain.cs index 2205e54..0be68ca 100644 --- a/U8AppMain/FrmMain.cs +++ b/NX.ERP.U8.App/FrmMain.cs @@ -4,9 +4,7 @@ using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; -using System.Net.Http; using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; using System.Xml.Serialization; using System.IO; @@ -21,6 +19,7 @@ namespace U8AppMain InitializeComponent(); } + private NX.ERP.U8.U8LoginContext u8LoginContext = null; private void PrintLog(ResultEnity.ufinterface info) { @@ -48,12 +47,12 @@ namespace U8AppMain } - private async Task HttpPost(string body) + private ResultEnity.ufinterface HttpPost(string body) { try { - var response = await HttpHelper.Post(url, body); + var response = HttpHelper.HttpPost(url, body); return XmlHelper.XmlDeserialize(response, Encoding.UTF8); // var strResult = $"单据:{result.requestroottag} 操作:{result.proc} \r\n"; //foreach (var item in result.Items) @@ -99,7 +98,7 @@ namespace U8AppMain return; } - private async void ImportBom_Click(object sender, EventArgs e) + private void ImportBom_Click(object sender, EventArgs e) { if (this.dataTable == null || this.dataTable.Rows.Count == 0) @@ -154,14 +153,14 @@ namespace U8AppMain { var strbody = XmlHelper.XmlSerialize(item, Encoding.UTF8); - var response = await this.HttpPost(strbody); + var response = this.HttpPost(strbody); PrintLog(response); Application.DoEvents(); } } - private async void BtnPurchaseImport_Click(object sender, EventArgs e) + private void BtnPurchaseImport_Click(object sender, EventArgs e) { if (this.dataTable == null || this.dataTable.Rows.Count == 0) { @@ -207,7 +206,7 @@ namespace U8AppMain foreach (var item in bomLookup.Values) { var strbody = XmlHelper.XmlSerialize(item, Encoding.UTF8); - var response = await this.HttpPost(strbody); + var response = this.HttpPost(strbody); PrintLog(response); Application.DoEvents(); } @@ -259,7 +258,7 @@ namespace U8AppMain } foreach (var item in bomLookup.Values) { - var a = new Voucher.VoucherDAL(connStr); + var a = new Voucher.VoucherDAL(this.u8LoginContext.Constr4Net); if (a.Add(item)) { this.richTextBox1.SelectionColor = Color.Green; @@ -283,11 +282,13 @@ namespace U8AppMain private void 打印ToolStripMenuItem1_Click(object sender, EventArgs e) { - FastReport.Report report = new FastReport.Report(); - if (report.Design()) - { - report.Design(); - } + + } + + private void 登录ToolStripMenuItem_Click(object sender, EventArgs e) + { + u8LoginContext = new NX.ERP.U8.U8LoginContext(); + u8LoginContext.Login(true); } } } diff --git a/U8AppMain/FrmMain.resx b/NX.ERP.U8.App/FrmMain.resx similarity index 100% rename from U8AppMain/FrmMain.resx rename to NX.ERP.U8.App/FrmMain.resx diff --git a/NX.ERP.U8.App/HttpHelper.cs b/NX.ERP.U8.App/HttpHelper.cs new file mode 100644 index 0000000..db4007c --- /dev/null +++ b/NX.ERP.U8.App/HttpHelper.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; + + +namespace U8AppMain +{ + public static class HttpHelper + { + /// + /// HTTP POST方式请求数据 + /// + /// URL. + /// POST的数据 + /// + public static string HttpPost(string url, string param = null) + { + var request = WebRequest.Create(url) as HttpWebRequest; + request.Method = "POST"; + request.ContentType = "application/x-www-form-urlencoded"; + request.Accept = "*/*"; + request.Timeout = 15000; + request.AllowAutoRedirect = false; + StreamWriter requestStream = null; + WebResponse response = null; + string responseStr = null; + try + { + requestStream = new StreamWriter(request.GetRequestStream()); + requestStream.Write(param); + requestStream.Close(); + response = request.GetResponse(); + if (response != null) + { + StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8); + responseStr = reader.ReadToEnd(); + reader.Close(); + } + } + catch (Exception) + { + throw; + } + finally + { + request = null; + requestStream = null; + response = null; + } + + return responseStr; + } + + } +} diff --git a/U8AppMain/MessageFilter.cs b/NX.ERP.U8.App/MessageFilter.cs similarity index 97% rename from U8AppMain/MessageFilter.cs rename to NX.ERP.U8.App/MessageFilter.cs index be0772a..e38ac84 100644 --- a/U8AppMain/MessageFilter.cs +++ b/NX.ERP.U8.App/MessageFilter.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + using System.Windows.Forms; namespace U8AppMain diff --git a/U8AppMain/U8AppMain.csproj b/NX.ERP.U8.App/NX.ERP.U8.App.csproj similarity index 69% rename from U8AppMain/U8AppMain.csproj rename to NX.ERP.U8.App/NX.ERP.U8.App.csproj index f9edb90..4f8129b 100644 --- a/U8AppMain/U8AppMain.csproj +++ b/NX.ERP.U8.App/NX.ERP.U8.App.csproj @@ -6,9 +6,9 @@ AnyCPU {8A6603B0-444A-49C7-80C9-195638129068} WinExe - U8AppMain - U8AppMain - v4.5 + NX.ERP.U8.App + NX.ERP.U8.App + v3.5 512 true @@ -16,7 +16,7 @@ - AnyCPU + x86 true full false @@ -36,46 +36,40 @@ 4 false + + false + - - ..\packages\Portable.BouncyCastle.1.8.6\lib\net40\BouncyCastle.Crypto.dll + + ..\packages\Dapper.1.42\lib\net35\Dapper.dll - - ..\packages\Dapper.1.50.0\lib\net45\Dapper.dll - - - False - fastreport\FastReport.dll - - - ..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll + + ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - ..\packages\NPOI.2.2.1\lib\net40\NPOI.dll + ..\packages\NPOI.2.2.1\lib\net20\NPOI.dll - ..\packages\NPOI.2.2.1\lib\net40\NPOI.OOXML.dll + ..\packages\NPOI.2.2.1\lib\net20\NPOI.OOXML.dll - ..\packages\NPOI.2.2.1\lib\net40\NPOI.OpenXml4Net.dll + ..\packages\NPOI.2.2.1\lib\net20\NPOI.OpenXml4Net.dll - ..\packages\NPOI.2.2.1\lib\net40\NPOI.OpenXmlFormats.dll + ..\packages\NPOI.2.2.1\lib\net20\NPOI.OpenXmlFormats.dll - + - - - + @@ -136,12 +130,18 @@ + + + {5d012e0a-afed-474e-81a9-5820890b1b29} + NX.ERP.Model + + + {bd673da9-0606-4bcf-a016-fb5c4e7b5d59} + NX.ERP.U8 + + + + + - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - \ No newline at end of file diff --git a/U8AppMain/Program.cs b/NX.ERP.U8.App/Program.cs similarity index 94% rename from U8AppMain/Program.cs rename to NX.ERP.U8.App/Program.cs index c156c25..ad4afb2 100644 --- a/U8AppMain/Program.cs +++ b/NX.ERP.U8.App/Program.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; + using System.Windows.Forms; namespace U8AppMain diff --git a/U8AppMain/Properties/AssemblyInfo.cs b/NX.ERP.U8.App/Properties/AssemblyInfo.cs similarity index 100% rename from U8AppMain/Properties/AssemblyInfo.cs rename to NX.ERP.U8.App/Properties/AssemblyInfo.cs diff --git a/U8AppMain/Properties/Resources.Designer.cs b/NX.ERP.U8.App/Properties/Resources.Designer.cs similarity index 94% rename from U8AppMain/Properties/Resources.Designer.cs rename to NX.ERP.U8.App/Properties/Resources.Designer.cs index 7f8d09e..43184ed 100644 --- a/U8AppMain/Properties/Resources.Designer.cs +++ b/NX.ERP.U8.App/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace U8AppMain.Properties { +namespace NX.ERP.U8.App.Properties { using System; @@ -39,7 +39,7 @@ namespace U8AppMain.Properties { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("U8AppMain.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NX.ERP.U8.App.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/U8AppMain/Properties/Resources.resx b/NX.ERP.U8.App/Properties/Resources.resx similarity index 100% rename from U8AppMain/Properties/Resources.resx rename to NX.ERP.U8.App/Properties/Resources.resx diff --git a/U8AppMain/Properties/Settings.Designer.cs b/NX.ERP.U8.App/Properties/Settings.Designer.cs similarity index 96% rename from U8AppMain/Properties/Settings.Designer.cs rename to NX.ERP.U8.App/Properties/Settings.Designer.cs index f24a371..2c94f65 100644 --- a/U8AppMain/Properties/Settings.Designer.cs +++ b/NX.ERP.U8.App/Properties/Settings.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace U8AppMain.Properties { +namespace NX.ERP.U8.App.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] diff --git a/U8AppMain/Properties/Settings.settings b/NX.ERP.U8.App/Properties/Settings.settings similarity index 100% rename from U8AppMain/Properties/Settings.settings rename to NX.ERP.U8.App/Properties/Settings.settings diff --git a/U8AppMain/Purchase/BodyEnity.cs b/NX.ERP.U8.App/Purchase/BodyEnity.cs similarity index 91% rename from U8AppMain/Purchase/BodyEnity.cs rename to NX.ERP.U8.App/Purchase/BodyEnity.cs index aa9a69b..6479a54 100644 --- a/U8AppMain/Purchase/BodyEnity.cs +++ b/NX.ERP.U8.App/Purchase/BodyEnity.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Purchase { diff --git a/U8AppMain/Purchase/EntryEnity.cs b/NX.ERP.U8.App/Purchase/EntryEnity.cs similarity index 98% rename from U8AppMain/Purchase/EntryEnity.cs rename to NX.ERP.U8.App/Purchase/EntryEnity.cs index 083e0f3..656a257 100644 --- a/U8AppMain/Purchase/EntryEnity.cs +++ b/NX.ERP.U8.App/Purchase/EntryEnity.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Purchase { diff --git a/U8AppMain/Purchase/HeaderEnity.cs b/NX.ERP.U8.App/Purchase/HeaderEnity.cs similarity index 98% rename from U8AppMain/Purchase/HeaderEnity.cs rename to NX.ERP.U8.App/Purchase/HeaderEnity.cs index f363392..1196886 100644 --- a/U8AppMain/Purchase/HeaderEnity.cs +++ b/NX.ERP.U8.App/Purchase/HeaderEnity.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Purchase { diff --git a/U8AppMain/Purchase/PurchaseEnity.cs b/NX.ERP.U8.App/Purchase/PurchaseEnity.cs similarity index 92% rename from U8AppMain/Purchase/PurchaseEnity.cs rename to NX.ERP.U8.App/Purchase/PurchaseEnity.cs index 5b0396b..e62f46f 100644 --- a/U8AppMain/Purchase/PurchaseEnity.cs +++ b/NX.ERP.U8.App/Purchase/PurchaseEnity.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Purchase { diff --git a/U8AppMain/Purchase/ufinterface.cs b/NX.ERP.U8.App/Purchase/ufinterface.cs similarity index 97% rename from U8AppMain/Purchase/ufinterface.cs rename to NX.ERP.U8.App/Purchase/ufinterface.cs index c0ac11a..36682fe 100644 --- a/U8AppMain/Purchase/ufinterface.cs +++ b/NX.ERP.U8.App/Purchase/ufinterface.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Purchase { diff --git a/U8AppMain/ResultEnity/Item.cs b/NX.ERP.U8.App/ResultEnity/Item.cs similarity index 94% rename from U8AppMain/ResultEnity/Item.cs rename to NX.ERP.U8.App/ResultEnity/Item.cs index 36e0ffb..77722d0 100644 --- a/U8AppMain/ResultEnity/Item.cs +++ b/NX.ERP.U8.App/ResultEnity/Item.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + using System.Xml.Serialization; namespace U8AppMain.ResultEnity { diff --git a/U8AppMain/ResultEnity/ufinterface.cs b/NX.ERP.U8.App/ResultEnity/ufinterface.cs similarity index 96% rename from U8AppMain/ResultEnity/ufinterface.cs rename to NX.ERP.U8.App/ResultEnity/ufinterface.cs index 3ab5bad..5bdfe4d 100644 --- a/U8AppMain/ResultEnity/ufinterface.cs +++ b/NX.ERP.U8.App/ResultEnity/ufinterface.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + using System.Xml.Serialization; namespace U8AppMain.ResultEnity { diff --git a/NX.ERP.U8.App/U8LoginContext.cs b/NX.ERP.U8.App/U8LoginContext.cs new file mode 100644 index 0000000..72f95d7 --- /dev/null +++ b/NX.ERP.U8.App/U8LoginContext.cs @@ -0,0 +1,97 @@ +using System; +using U8Login; + + +namespace U8ApiInterface +{ + public class U8LoginContext : IDisposable + { + + + private static U8LoginContext _u8LoginContext; + + public static U8LoginContext Instance + { + get + { + + if (_u8LoginContext == null) + { + _u8LoginContext = new U8LoginContext(); + } + return _u8LoginContext; + } + } + + + private UFSoft.U8.Framework.Login.UI.clsLogin clsLogin; + + private clsLogin _clslogin; + + private U8LoginContext() + { + clsLogin = new UFSoft.U8.Framework.Login.UI.clsLogin(); + } + + public clsLogin ClsLogin + { + get + { + if (this._clslogin == null) + { + this.Login(); + } + return this._clslogin; + } + } + + public void Dispose() + { + if (clsLogin != null) + { + clsLogin.SubLogout(AccID); + clsLogin.ShutDown(); + clsLogin = null; + } + + } + public string UserId { get; set; } = "003"; + + public string PassWord { get; set; } = "123456"; + + public string Server { get; set; } = "192.168.0.242"; + + public string AccID { get; set; } = "u8@889"; + + public string Serial { get; set; } + + public void Login() + { + var a = clsLogin.GetDataSource("192.168.0.250"); + + if (!clsLogin.login("DP", "wx998", "nx123456", "192.168.0.250","2020-12-31", AccID, Serial)) + { + throw new Exception(clsLogin.ErrDescript); + } + + if (clsLogin.SubLogin("ST") == null) + { + throw new Exception(clsLogin.ErrDescript); + } + this._clslogin = new clsLoginClass(); + if (!_clslogin.ConstructLogin(clsLogin.userToken)) + { + throw new Exception(_clslogin.ShareString); + } + _clslogin.set_TaskId(clsLogin.GetTaskID("ST")); + + //U8EnvContext u8EnvContext = new U8EnvContext + //{ + // U8Login = this._clslogin + //}; + + //return true; + + } + } +} diff --git a/U8AppMain/Voucher/Vouch.cs b/NX.ERP.U8.App/Voucher/Vouch.cs similarity index 97% rename from U8AppMain/Voucher/Vouch.cs rename to NX.ERP.U8.App/Voucher/Vouch.cs index 1139c23..6e0d274 100644 --- a/U8AppMain/Voucher/Vouch.cs +++ b/NX.ERP.U8.App/Voucher/Vouch.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Voucher { diff --git a/U8AppMain/Voucher/VoucherDAL.cs b/NX.ERP.U8.App/Voucher/VoucherDAL.cs similarity index 94% rename from U8AppMain/Voucher/VoucherDAL.cs rename to NX.ERP.U8.App/Voucher/VoucherDAL.cs index bd427bf..4bb12f8 100644 --- a/U8AppMain/Voucher/VoucherDAL.cs +++ b/NX.ERP.U8.App/Voucher/VoucherDAL.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + using Dapper; using System.Data.SqlClient; namespace U8AppMain.Voucher @@ -53,23 +53,23 @@ namespace U8AppMain.Voucher iAmount = vouch.Vouchs.Count() }; DynamicParameters sp = new DynamicParameters(idEnity); - sp.Add("@iFatherId", 0, System.Data.DbType.Int32, System.Data.ParameterDirection.Output); - sp.Add("@iChildId", 0, System.Data.DbType.Int32, System.Data.ParameterDirection.Output); + sp.Add("@iFatherId", 0, System.Data.DbType.Int32, System.Data.ParameterDirection.Output,0); + sp.Add("@iChildId", 0, System.Data.DbType.Int32, System.Data.ParameterDirection.Output,0); conn.Execute("sp_GetID", sp, trans, commandType: System.Data.CommandType.StoredProcedure); int iFatherId = sp.Get("@iFatherId"); int iChildId = sp.Get("@iChildId"); //获取最大值 var cSeed = DateTime.Today.ToString("yyyyMM"); var sqlMax = $@"select cNumber as Maxnumber From VoucherHistory with (ROWLOCK) Where CardNumber='0413' and cContent='日期' and cSeed=@cSeed"; - var maxCode = conn.ExecuteScalar(sqlMax, new { cSeed }, trans); + var maxCode = conn.ExecuteScalar(sqlMax, new { cSeed }, trans,200,System.Data.CommandType.Text); maxCode++; //更新最大之 - var sqlUpdate = "update VoucherHistory set cNumber=@cNumber Where CardNumber='0413' and cContent='日期' and cSeed=cSeed "; + var sqlUpdate = "update VoucherHistory set cNumber=@cNumber Where CardNumber='0413' and cContent='日期' and cSeed=@cSeed "; conn.Execute(sqlUpdate, new { cNumber = maxCode, cSeed }, trans); //获取前缀 var sqlPrefix = " Select Prefix1Rule From VoucherNumber Where CardNumber = '0413'"; - var prefix = conn.ExecuteScalar(sqlPrefix, null, trans); + var prefix = conn.ExecuteScalar(sqlPrefix, null, trans,200,System.Data.CommandType.Text); //组装Code var cCode = prefix + cSeed.Substring(2, cSeed.Length - 2) + maxCode.ToString().PadLeft(5, '0'); //主表 diff --git a/U8AppMain/Voucher/Vouchs.cs b/NX.ERP.U8.App/Voucher/Vouchs.cs similarity index 96% rename from U8AppMain/Voucher/Vouchs.cs rename to NX.ERP.U8.App/Voucher/Vouchs.cs index bcb34fe..1a39c1e 100644 --- a/U8AppMain/Voucher/Vouchs.cs +++ b/NX.ERP.U8.App/Voucher/Vouchs.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain.Voucher { diff --git a/U8AppMain/WindowsMessages.cs b/NX.ERP.U8.App/WindowsMessages.cs similarity index 99% rename from U8AppMain/WindowsMessages.cs rename to NX.ERP.U8.App/WindowsMessages.cs index 1cee908..d181c12 100644 --- a/U8AppMain/WindowsMessages.cs +++ b/NX.ERP.U8.App/WindowsMessages.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; + namespace U8AppMain { diff --git a/U8AppMain/XmlHelper.cs b/NX.ERP.U8.App/XmlHelper.cs similarity index 97% rename from U8AppMain/XmlHelper.cs rename to NX.ERP.U8.App/XmlHelper.cs index cfb79b5..b90e754 100644 --- a/U8AppMain/XmlHelper.cs +++ b/NX.ERP.U8.App/XmlHelper.cs @@ -23,7 +23,7 @@ namespace U8AppMain settings.NewLineChars = "\r\n"; settings.Encoding = encoding; settings.IndentChars = " "; - settings.NamespaceHandling = NamespaceHandling.OmitDuplicates; + //settings.NamespaceHandling = NamespaceHandling.OmitDuplicates; using (XmlWriter writer = XmlWriter.Create(stream, settings)) { serializer.Serialize(writer, o, ns); diff --git a/U8AppMain/fastreport/FastReport.Bars.dll b/NX.ERP.U8.App/fastreport/FastReport.Bars.dll similarity index 100% rename from U8AppMain/fastreport/FastReport.Bars.dll rename to NX.ERP.U8.App/fastreport/FastReport.Bars.dll diff --git a/U8AppMain/fastreport/FastReport.Editor.dll b/NX.ERP.U8.App/fastreport/FastReport.Editor.dll similarity index 100% rename from U8AppMain/fastreport/FastReport.Editor.dll rename to NX.ERP.U8.App/fastreport/FastReport.Editor.dll diff --git a/U8AppMain/fastreport/FastReport.Install.dll b/NX.ERP.U8.App/fastreport/FastReport.Install.dll similarity index 100% rename from U8AppMain/fastreport/FastReport.Install.dll rename to NX.ERP.U8.App/fastreport/FastReport.Install.dll diff --git a/U8AppMain/fastreport/FastReport.Service.dll b/NX.ERP.U8.App/fastreport/FastReport.Service.dll similarity index 100% rename from U8AppMain/fastreport/FastReport.Service.dll rename to NX.ERP.U8.App/fastreport/FastReport.Service.dll diff --git a/U8AppMain/fastreport/FastReport.Web.dll b/NX.ERP.U8.App/fastreport/FastReport.Web.dll similarity index 100% rename from U8AppMain/fastreport/FastReport.Web.dll rename to NX.ERP.U8.App/fastreport/FastReport.Web.dll diff --git a/U8AppMain/fastreport/FastReport.dll b/NX.ERP.U8.App/fastreport/FastReport.dll similarity index 100% rename from U8AppMain/fastreport/FastReport.dll rename to NX.ERP.U8.App/fastreport/FastReport.dll diff --git a/NX.ERP.U8.App/packages.config b/NX.ERP.U8.App/packages.config new file mode 100644 index 0000000..d1de6b2 --- /dev/null +++ b/NX.ERP.U8.App/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/NX.ERP.U8/Base/BinDAL.cs b/NX.ERP.U8/Base/BinDAL.cs new file mode 100644 index 0000000..aa67bca --- /dev/null +++ b/NX.ERP.U8/Base/BinDAL.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Dapper; +using NX.ERP.Model; + + +namespace NX.ERP.U8.Base +{ + public class BinDAL + { + public IEnumerable GetList() + { + using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net)) + { + var sql = @"select cPosCode as BinCode,cPosName as BinName,iPosGrade,bPosEnd,cWhCode as WarehouseCode, + iMaxCubage as VolumeLimit, iMaxweight as WeightLimit,cMemo,cBarCode from Position"; + return conn.Query(sql, null); + } + } + } +} diff --git a/NX.ERP.U8/Base/CustomerDAL.cs b/NX.ERP.U8/Base/CustomerDAL.cs new file mode 100644 index 0000000..93c26fc --- /dev/null +++ b/NX.ERP.U8/Base/CustomerDAL.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Dapper; +using NX.ERP.Model; + +namespace NX.ERP.U8 +{ + public class CustomerDAL + { + public IEnumerable GetList() + { + + + using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net)) + { + var sql = @" select + cCusCode AS CustomerCode, + cCusName AS CustomerName, + cCusPostCode AS PostalCode, + cCusAddress AS Address, + cCusPerson AS Contract,cCusPhone AS ContractPhone from Customer "; + return conn.Query(sql, null); + } + } + } +} diff --git a/NX.ERP.U8/Base/MaterielDAL.cs b/NX.ERP.U8/Base/MaterielDAL.cs new file mode 100644 index 0000000..bf28c86 --- /dev/null +++ b/NX.ERP.U8/Base/MaterielDAL.cs @@ -0,0 +1,271 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Dapper; +using NX.ERP.Model; + +namespace NX.ERP.U8 +{ + public class MaterielDAL + { + public IEnumerable GetList() + { + + + using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net)) + { + var sql = @"select + cInvCode AS MaterielCode , + cInvAddCode AS 存货代码, + cInvName AS MaterielName , + fLength AS Length, + fWidth AS Wide, + fHeight AS Height, + iVolume AS Volume, + iInvWeight AS Weight, + iInvSCost AS UnitPrice, + cComUnitCode AS UnitCode , + iGroupType AS 计量单位组类别, + cGroupCode AS 计量单位组编码, + cAssComUnitCode AS 辅计量单位编码, + cInvStd AS SpecsModel, + iSafeNum AS 安全库存量, + iTopSum AS MaxStock, + iLowSum AS MinStock, + iMassDate AS 保质期数, + cMassUnit AS 保质期单位, + iWarnDays AS 保质期预警天数, + cInvCCode AS 存货大类编码, + cReplaceItem AS 替换件, + cPosition AS 货位编码, + bSale AS 是否销售, + bPurchase AS 是否外购, + bSelf AS 是否自制, + bComsume AS 是否生产耗用, + bProducing AS 是否在制, + bService AS 是否应税劳务, + bAccessary AS 是否成套件, + iTaxRate AS 税率, + iInvRCost AS 计划价或售价, + iInvSPrice AS 参考成本, + iInvLSCost AS 最低售价, + iInvNCost AS 最新成本, + iInvAdvance AS 提前期, + iInvBatch AS 经济批量, + iOverStock AS 积压标准, + cInvABC AS 存货ABC分类, + bInvQuality AS 是否保质期管理, + bInvBatch AS 是否批次管理, + bInvEntrust AS 是否受托代销, + bInvOverStock AS 是否呆滞积压, + dSDate AS 启用日期, + dEDate AS 停用日期, + bFree1 AS 存货是否有自由项1, + bFree2 AS 存货是否有自由项2, + cInvDefine1 AS 存货自定义项1, + cInvDefine2 AS 存货自定义项2, + cInvDefine3 AS 存货自定义项3, + I_id AS 自动编号, + bInvType AS 是否折扣, + iInvMPCost AS 最高进价, + cQuality AS 质量要求说明, + iInvSaleCost AS 零售单价, + iInvSCost1 AS 一级批发价, + iInvSCost2 AS 二级批发价, + iInvSCost3 AS 三级批发价, + bFree3 AS 存货是否有自由项3, + bFree4 AS 存货是否有自由项4, + bFree5 AS 存货是否有自由项5, + bFree6 AS 存货是否有自由项6, + bFree7 AS 存货是否有自由项7, + bFree8 AS 存货是否有自由项8, + bFree9 AS 存货是否有自由项9, + bFree10 AS 存货是否有自由项10, + cCreatePerson AS 建档人, + cModifyPerson AS 变更人, + dModifyDate AS 变更日期, + fSubscribePoint AS 订货点, + fVagQuantity AS 平均耗用量, + cValueType AS 计价方式, + bFixExch AS 是否为固定换算率, + fOutExcess AS 出库超额上限, + fInExcess AS 入库超额上限, + fExpensesExch AS 费用率, + bTrack AS 是否出库跟踪入库, + bSerial AS 是否有序列号管理, + bBarCode AS 是否条形码管理, + iId AS 所属权限组, + cBarCode AS 对应条形码编码, + cInvDefine4 AS 存货自定义项4, + cInvDefine5 AS 存货自定义项5, + cInvDefine6 AS 存货自定义项6, + cInvDefine7 AS 存货自定义项7, + cInvDefine8 AS 存货自定义项8, + cInvDefine9 AS 存货自定义项9, + cInvDefine10 AS 存货自定义项10, + cInvDefine11 AS 存货自定义项11, + cInvDefine12 AS 存货自定义项12, + cInvDefine13 AS 存货自定义项13, + cInvDefine14 AS 存货自定义项14, + cInvDefine15 AS 存货自定义项15, + cInvDefine16 AS 存货自定义项16, + cSAComUnitCode AS 销售默认计量单位编码, + cPUComUnitCode AS 采购默认计量单位编码, + cSTComUnitCode AS 库存默认计量单位编码, + cCAComUnitCode AS 成本默认计量单位编码, + cFrequency AS 盘点周期单位, + iFrequency AS 盘点周期, + iDays AS 盘点日, + dLastDate AS 上次盘点日期, + iWastage AS 合理损耗率, + bSolitude AS 是否单独存放, + cEnterprise AS 生产企业, + cAddress AS 产地, + cFile AS 批准文号或注册证号, + cLabel AS 注册商标, + cCheckOut AS 合格证号, + cLicence AS 生产许可证号, + bSpecialties AS 是否特殊药品, + iHighPrice AS 最高售价, + iExpSaleRate AS 销售加成率, + cPriceGroup AS 价格组, + cOfferGrade AS 销售贡献等级, + iOfferRate AS 销售贡献率, + cMonth AS 存货期末处理会计期, + iAdvanceDate AS 累计提前期, + cCurrencyName AS 通用名称, + cProduceAddress AS 生产地点, + cProduceNation AS 生产国别, + cRegisterNo AS 进口药品注册证号, + cEnterNo AS 入关证号, + cPackingType AS 包装规格, + cEnglishName AS 存货英文名称, + bPropertyCheck AS 是否质检, + cPreparationType AS 剂型, + cCommodity AS 注册商标批件, + iRecipeBatch AS 处方药或非处方药, + cNotPatentName AS 国际非专利名, + pubufts AS 时间戳, + bPromotSales AS 是否促销品, + iPlanPolicy AS 计划策略, + iROPMethod AS 再订货点方法, + iBatchRule AS 批量规则, + fBatchIncrement AS 批量增量, + iAssureProvideDays AS 保证供应天数, + iTestStyle AS 检验方式, + iDTMethod AS 抽检方案, + fDTRate AS 抽检率, + fDTNum AS 抽检量, + cDTUnit AS 检验计量单位, + iDTStyle AS 抽检方式, + iQTMethod AS 质量检验方案, + PictureGUID AS 图片GUID, + bPlanInv AS 是否计划品, + bProxyForeign AS 是否委外, + bATOModel AS 是否ATO模型, + bCheckItem AS 是否选项类, + bPTOModel AS 是否PTO模型, + bEquipment AS 设备, + cProductUnit AS 生产计量单位, + fOrderUpLimit AS 订货超额上限, + fRetailPrice AS 零售价格, + cInvDepCode AS 生产部门, + iAlterAdvance AS 变动提前期, + fAlterBaseNum AS 变动基数, + cPlanMethod AS 计划方法, + bMPS AS MPS件, + bROP AS ROP件, + bRePlan AS 是否重复计划, + cSRPolicy AS 供需政策, + bBillUnite AS 是否令单合并, + iSupplyDay AS 供应期间, + fSupplyMulti AS 供应倍数, + fMinSupply AS 最低供应量, + bCutMantissa AS 是否切除尾数, + cInvPersonCode AS 计划员, + iInvTfId AS 时栅代号, + cEngineerFigNo AS 工程图号, + bInTotalCost AS 成本累计否, + iSupplyType AS 供应类型, + bConfigFree1 AS 结构性自由项1, + bConfigFree2 AS 结构性自由项2, + bConfigFree3 AS 结构性自由项3, + bConfigFree4 AS 结构性自由项4, + bConfigFree5 AS 结构性自由项5, + bConfigFree6 AS 结构性自由项6, + bConfigFree7 AS 结构性自由项7, + bConfigFree8 AS 结构性自由项8, + bConfigFree9 AS 结构性自由项9, + bConfigFree10 AS 结构性自由项10, + iDTLevel AS 检验水平, + cDTAQL AS Aql, + bPeriodDT AS 是否周期检验, + cDTPeriod AS 检验周期, + iBigMonth AS 不大于月, + iBigDay AS 不大于天, + iSmallMonth AS 不小于月, + iSmallDay AS 不小于天, + bOutInvDT AS 是否发货检验, + bBackInvDT AS 是否退货检验, + iEndDTStyle AS 自制品检验严格度, + bDTWarnInv AS 保质期存货是否检验, + fBackTaxRate AS 退税率, + cCIQCode AS 海关代码, + cWGroupCode AS 重量计量组, + cWUnit AS 重量单位, + fGrossW AS 毛重, + cVGroupCode AS 体积计量组, + cVUnit AS 体积单位, + iDTUCounter AS 检验正方向记数, + iDTDCounter AS 检验反方向记数, + iBatchCounter AS 连续累计批记数, + cShopUnit AS 零售计量单位, + cPurPersonCode AS 采购员, + bImportMedicine AS 是否进口药品, + bFirstBusiMedicine AS 是否首营药品, + bForeExpland AS 预测展开, + cInvPlanCode AS 计划品, + fConvertRate AS 转换因子, + dReplaceDate AS 替换日期, + bInvModel AS 模型, + bKCCutMantissa AS 领料是否切除尾数, + bReceiptByDT AS 来料须依据检验结果入库, + iImpTaxRate AS 进项税率, + iExpTaxRate AS 出口税率, + bExpSale AS 外销, + iDrawBatch AS 领料批量, + bCheckBSATP AS 检查售前ATP, + cInvProjectCode AS 售前ATP方案, + iTestRule AS 检验规则, + cRuleCode AS 自定义抽检规则, + bCheckFree1 AS 核算自由项1, + bCheckFree2 AS 核算自由项2, + bCheckFree3 AS 核算自由项3, + bCheckFree4 AS 核算自由项4, + bCheckFree5 AS 核算自由项5, + bCheckFree6 AS 核算自由项6, + bCheckFree7 AS 核算自由项7, + bCheckFree8 AS 核算自由项8, + bCheckFree9 AS 核算自由项9, + bCheckFree10 AS 核算自由项10, + bBomMain AS 允许BOM母件, + bBomSub AS 允许BOM子件, + bProductBill AS 允许生产订单, + iCheckATP AS 检查ATP, + iInvATPId AS ATP规则 , + iPlanTfDay AS 计划时栅天数, + iOverlapDay AS 重叠天数, + bPiece AS 计件, + bSrvItem AS 服务项目, + bSrvFittings AS 服务配件, + fMaxSupply AS 最高供应量, + fMinSplit AS 最小分割量, + bSpecialOrder AS 客户订单专用, + bTrackSaleBill AS 销售跟单 + from Inventory"; + return conn.Query(sql, null); + } + } + } +} diff --git a/NX.ERP.U8/Base/MaterielTypeDAL.cs b/NX.ERP.U8/Base/MaterielTypeDAL.cs new file mode 100644 index 0000000..5ebf468 --- /dev/null +++ b/NX.ERP.U8/Base/MaterielTypeDAL.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Dapper; +using NX.ERP.Model; + +namespace NX.ERP.U8 +{ + public class MaterielTypeDAL + { + public IEnumerable GetList() + { + using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net)) + { + var sql = @"select cInvCCode AS MaterielTypeCode,cInvCName AS MaterielTypeName from InventoryClass "; + return conn.Query(sql, null); + } + } + } +} diff --git a/NX.ERP.U8/Base/SupplierDAL.cs b/NX.ERP.U8/Base/SupplierDAL.cs new file mode 100644 index 0000000..f82e8d5 --- /dev/null +++ b/NX.ERP.U8/Base/SupplierDAL.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Dapper; +using NX.ERP.Model; + +namespace NX.ERP.U8 +{ + public class SupplierDAL + { + public IEnumerable GetList() + { + + + using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net)) + { + var sql = @"select + cVenCode AS SupplierCode, + cVenName AS SupplierName, + cVenPostCode AS PostalCode, + cVenAddress AS Address, + cVenPerson AS Contract from Vendor "; + return conn.Query(sql, null); + } + } + } +} diff --git a/NX.ERP.U8/Base/UnitDAL.cs b/NX.ERP.U8/Base/UnitDAL.cs new file mode 100644 index 0000000..9b4e64e --- /dev/null +++ b/NX.ERP.U8/Base/UnitDAL.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Dapper; +using NX.ERP.Model; + + +namespace NX.ERP.U8 +{ + public class UnitDAL + { + public IEnumerable GetList() + { + using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net)) + { + var sql = @"select + cComunitCode AS UnitCode, + cComUnitName AS UnitName,bMainUnit as MainUnit, cGroupCode as GroupCode from ComputationUnit "; + return conn.Query(sql, null); + } + } + } +} diff --git a/NX.ERP.U8/Base/WarehouseDAL.cs b/NX.ERP.U8/Base/WarehouseDAL.cs new file mode 100644 index 0000000..10cae6e --- /dev/null +++ b/NX.ERP.U8/Base/WarehouseDAL.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Dapper; +using NX.ERP.Model; + +namespace NX.ERP.U8 +{ + public class WarehouseDAL + { + public IEnumerable GetList() + { + + + using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net)) + { + var sql = "select cWhCode as WarehouseCode,cWhName as WarehouseName from Warehouse"; + return conn.Query(sql, null); + } + } + } +} diff --git a/NX.ERP.U8/NX.ERP.U8.csproj b/NX.ERP.U8/NX.ERP.U8.csproj new file mode 100644 index 0000000..8a6cdfa --- /dev/null +++ b/NX.ERP.U8/NX.ERP.U8.csproj @@ -0,0 +1,104 @@ + + + + + Debug + AnyCPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59} + Library + Properties + NX.ERP.U8 + NX.ERP.U8 + v3.5 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AnyCPU + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + + + + + + + + + + + + + + + + False + True + E:\U8SOFT\Interop\ADODB.dll + + + ..\packages\Dapper.1.42\lib\net35\Dapper.dll + + + False + True + E:\U8SOFT\UFMOM\U8APIFramework\Interop.MSXML2.dll + + + False + True + E:\U8SOFT\Interop\Interop.U8Login.dll + + + + + False + E:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.MomServiceCommon.dll + + + False + E:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8APIFramework.dll + + + False + E:\U8SOFT\UFMOM\U8APIFramework\UFIDA.U8.U8MOMAPIFramework.dll + + + C:\Users\admin\Desktop\QuickScannerV4\QuickScannerV4\bin\UFSoft.U8.Framework.Login.UI.dll + + + False + C:\Users\admin\Desktop\QuickScannerV4\QuickScannerV4\bin\UFSoft.U8.Framework.LoginContext.dll + + + + + + + + + + + {5d012e0a-afed-474e-81a9-5820890b1b29} + NX.ERP.Model + + + + \ No newline at end of file diff --git a/NX.ERP.U8/Properties/AssemblyInfo.cs b/NX.ERP.U8/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..435908f --- /dev/null +++ b/NX.ERP.U8/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("U8ApiInterface")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("U8ApiInterface")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("bd673da9-0606-4bcf-a016-fb5c4e7b5d59")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/NX.ERP.U8/STVocher.cs b/NX.ERP.U8/STVocher.cs new file mode 100644 index 0000000..45c7b10 --- /dev/null +++ b/NX.ERP.U8/STVocher.cs @@ -0,0 +1,381 @@ +using System; +using System.Collections.Generic; + +using System.Text; +using UFIDA.U8.U8MOMAPIFramework; +using UFIDA.U8.U8APIFramework; + +using UFIDA.U8.U8APIFramework.Parameter; +using MSXML2; +using System.Runtime.InteropServices; +using U8Login; + +namespace NX.ERP.U8 +{ + public class STVocher + { + public void AddVocher() + { + var a = U8LoginContext.Instance; + U8EnvContext envContext = new U8EnvContext(); + envContext.U8Login =a.ClsLogin; + //第三步:设置API地址标识(Url) + //当前API:添加新单据的地址标识为:U8API/MaterialOut/Add + U8ApiAddress myApiAddress = new U8ApiAddress("U8API/MaterialOut/Add"); + + //第四步:构造APIBroker + U8ApiBroker broker = new U8ApiBroker(myApiAddress, envContext); + + //第五步:API参数赋值 + + //给普通参数sVouchType赋值。此参数的数据类型为System.String,此参数按值传递,表示单据类型:11 + broker.AssignNormalValue("sVouchType", "11"); + + //给BO表头参数DomHead赋值,此BO参数的业务类型为材料出库单,属表头参数。BO参数均按引用传递 + //提示:给BO表头参数DomHead赋值有两种方法 + + //方法一是直接传入MSXML2.DOMDocumentClass对象 + //broker.AssignNormalValue("DomHead", new MSXML2.DOMDocumentClass()) + + + + + + //方法二是构造BusinessObject对象,具体方法如下: + BusinessObject DomHead = broker.GetBoParam("DomHead"); + DomHead.RowCount = 1; //设置BO对象(表头)行数,只能为一行 + //给BO对象(表头)的字段赋值,值可以是真实类型,也可以是无类型字符串 + //以下代码示例只设置第一行值。各字段定义详见API服务接口定义 + + /****************************** 以下是必输字段 ****************************/ + DomHead[0]["id"] = 111; //主关键字段,int类型 + DomHead[0]["ccode"] = "323"; //出库单号,string类型 + DomHead[0]["ddate"] = DateTime.Today; //出库日期,DateTime类型 + DomHead[0]["cwhcode"] = "2"; //仓库,string类型 + + /***************************** 以下是非必输字段 ****************************/ + DomHead[0]["cmodifyperson"] = ""; //修改人,string类型 + DomHead[0]["dmodifydate"] = ""; //修改日期,DateTime类型 + DomHead[0]["dnmaketime"] = ""; //制单时间,DateTime类型 + DomHead[0]["dnmodifytime"] = ""; //修改时间,DateTime类型 + DomHead[0]["dnverifytime"] = ""; //审核时间,DateTime类型 + DomHead[0]["hcinvdefine1"] = ""; //存货自定义项1,string类型 + DomHead[0]["hcinvdefine2"] = ""; //存货自定义项2,string类型 + DomHead[0]["hcinvdefine3"] = ""; //存货自定义项3,string类型 + DomHead[0]["hcinvdefine4"] = ""; //存货自定义项3,string类型 + DomHead[0]["hcinvdefine5"] = ""; //存货自定义项5,string类型 + DomHead[0]["hcinvdefine6"] = ""; //存货自定义项3,string类型 + DomHead[0]["hcinvdefine7"] = ""; //存货自定义项7,string类型 + DomHead[0]["hcinvdefine8"] = ""; //存货自定义项8,string类型 + DomHead[0]["hcinvdefine9"] = ""; //存货自定义项9,string类型 + DomHead[0]["hcinvdefine10"] = ""; //存货自定义项10,string类型 + DomHead[0]["hcinvdefine11"] = ""; //存货自定义项11,int类型 + DomHead[0]["hcinvdefine12"] = ""; //存货自定义项12,int类型 + DomHead[0]["hcinvdefine13"] = ""; //存货自定义项13,double类型 + DomHead[0]["hcinvdefine14"] = ""; //存货自定义项14,double类型 + DomHead[0]["hcinvdefine15"] = ""; //存货自定义项15,DateTime类型 + DomHead[0]["hcinvdefine16"] = ""; //存货自定义项16,DateTime类型 + DomHead[0]["cinvstd"] = ""; //规格型号,string类型 + DomHead[0]["dchkdate"] = ""; //检验日期,DateTime类型 + DomHead[0]["iavaquantity"] = ""; //可用量,string类型 + DomHead[0]["iavanum"] = ""; //可用件数,string类型 + DomHead[0]["ipresentnum"] = ""; //现存件数,string类型 + DomHead[0]["ufts"] = ""; //时间戳,string类型 + DomHead[0]["iproorderid"] = "1000000429"; //生产订单ID,string类型 + DomHead[0]["cmpocode"] = "SCDD201200004"; //订单号,string类型 + DomHead[0]["cpspcode"] = "090312"; //产品编码,string类型 + DomHead[0]["cproinvaddcode"] = ""; //存货代码,string类型 + DomHead[0]["ireturncount"] = ""; //ireturncount,string类型 + DomHead[0]["iverifystate"] = ""; //iverifystate,string类型 + DomHead[0]["iswfcontrolled"] = ""; //iswfcontrolled,string类型 + DomHead[0]["imquantity"] = ""; //产量,double类型 + DomHead[0]["cprobatch"] = ""; //生产批号,string类型 + DomHead[0]["cbustype"] = "领料"; //业务类型,int类型 + DomHead[0]["cbuscode"] = ""; //业务号,string类型 + DomHead[0]["cchkperson"] = ""; //检验员,string类型 + DomHead[0]["crdname"] = "材料出库"; //出库类别,string类型 + DomHead[0]["cdepname"] = "研发LA组"; //部门,string类型 + DomHead[0]["itopsum"] = ""; //最高库存量,string类型 + DomHead[0]["ilowsum"] = ""; //最低库存量,string类型 + DomHead[0]["cvenabbname"] = ""; //委外商,string类型 + DomHead[0]["bomfirst"] = ""; //bomfirst,string类型 + DomHead[0]["isafesum"] = ""; //安全库存量,string类型 + DomHead[0]["dveridate"] = ""; //审核日期,DateTime类型 + DomHead[0]["crdcode"] = "201"; //出库类别编码,string类型 + DomHead[0]["cmemo"] = ""; //备注,string类型 + DomHead[0]["cmaker"] = ""; //制单人,string类型 + DomHead[0]["chandler"] = ""; //审核人,string类型 + DomHead[0]["caccounter"] = ""; //记账人,string类型 + DomHead[0]["ipresent"] = ""; //现存量,string类型 + DomHead[0]["cinvname"] = ""; //产品名称,string类型 + DomHead[0]["biscomplement"] = ""; //补料标志,int类型 + DomHead[0]["cpersonname"] = ""; //业务员,string类型 + DomHead[0]["bpositive"] = ""; //红蓝标识,string类型 + DomHead[0]["cdefine1"] = ""; //表头自定义项1,string类型 + DomHead[0]["cdefine11"] = ""; //表头自定义项11,string类型 + DomHead[0]["cdefine12"] = ""; //表头自定义项12,string类型 + DomHead[0]["cdefine13"] = ""; //表头自定义项13,string类型 + DomHead[0]["cdefine14"] = ""; //表头自定义项14,string类型 + DomHead[0]["cdefine2"] = ""; //表头自定义项2,string类型 + DomHead[0]["cdefine3"] = ""; //表头自定义项3,string类型 + DomHead[0]["csource"] = "生产订单"; //单据来源,int类型 + DomHead[0]["cdefine5"] = ""; //表头自定义项5,int类型 + DomHead[0]["cdefine15"] = ""; //表头自定义项15,int类型 + DomHead[0]["cdefine6"] = ""; //表头自定义项6,DateTime类型 + DomHead[0]["brdflag"] = ""; //收发标志,string类型 + DomHead[0]["cdefine7"] = ""; //表头自定义项7,double类型 + DomHead[0]["cdefine16"] = ""; //表头自定义项16,double类型 + DomHead[0]["cdefine8"] = ""; //表头自定义项8,string类型 + DomHead[0]["cdefine9"] = ""; //表头自定义项9,string类型 + DomHead[0]["cvencode"] = ""; //委外商编码,string类型 + DomHead[0]["cdefine10"] = ""; //表头自定义项10,string类型 + DomHead[0]["cvouchtype"] = ""; //单据类型,string类型 + DomHead[0]["cwhcode"] = "2"; //仓库编码,string类型 + DomHead[0]["cdepcode"] = "24"; //部门编码,string类型 + DomHead[0]["cpersoncode"] = ""; //业务员编码,string类型 + DomHead[0]["vt_id"] = "65"; //模版号,int类型 + DomHead[0]["cdefine4"] = ""; //表头自定义项4,DateTime类型 + + //给BO表体参数domBody赋值,此BO参数的业务类型为材料出库单,属表体参数。BO参数均按引用传递 + //提示:给BO表体参数domBody赋值有两种方法 + + //方法一是直接传入MSXML2.DOMDocumentClass对象 + //broker.AssignNormalValue("domBody", new MSXML2.DOMDocumentClass()) + + //方法二是构造BusinessObject对象,具体方法如下: + BusinessObject domBody = broker.GetBoParam("domBody"); + //domBody.RowCount = 10; //设置BO对象行数 + //可以自由设置BO对象行数为大于零的整数,也可以不设置而自动增加行数 + //给BO对象的字段赋值,值可以是真实类型,也可以是无类型字符串 + //以下代码示例只设置第一行值。各字段定义详见API服务接口定义 + + /****************************** 以下是必输字段 ****************************/ + domBody[0]["autoid"] = 0; //主关键字段,int类型 + domBody[0]["cinvcode"] = "107001"; //材料编码,string类型 + + domBody[0]["editprop"] = "A"; //编辑属性:A表新增,M表修改,D表删除,string类型 + + /***************************** 以下是非必输字段 ****************************/ + domBody[0]["id"] = ""; //与主表关联项,int类型 + domBody[0]["cinvaddcode"] = ""; //材料代码,string类型 + domBody[0]["cinvname"] = ""; //材料名称,string类型 + domBody[0]["cinvstd"] = ""; //规格型号,string类型 + domBody[0]["cinvm_unit"] = ""; //主计量单位,string类型 + domBody[0]["cinva_unit"] = ""; //库存单位,string类型 + domBody[0]["creplaceitem"] = ""; //替换件,string类型 + domBody[0]["cposition"] = "002060203"; //货位编码,string类型 + domBody[0]["cinvdefine1"] = ""; //存货自定义项1,string类型 + domBody[0]["cinvdefine2"] = ""; //存货自定义项2,string类型 + domBody[0]["cinvdefine3"] = ""; //存货自定义项3,string类型 + domBody[0]["cfree1"] = ""; //存货自由项1,string类型 + domBody[0]["cbatchproperty1"] = ""; //批次属性1,double类型 + domBody[0]["cbatchproperty2"] = ""; //批次属性2,double类型 + domBody[0]["cfree2"] = ""; //存货自由项2,string类型 + domBody[0]["cbatch"] = ""; //批号,string类型 + domBody[0]["iinvexchrate"] = ""; //换算率,double类型 + domBody[0]["inum"] = ""; //件数,double类型 + domBody[0]["iquantity"] = "2"; //数量,double类型 + domBody[0]["iunitcost"] = ""; //单价,double类型 + domBody[0]["iprice"] = ""; //金额,double类型 + domBody[0]["ipunitcost"] = ""; //计划单价,double类型 + domBody[0]["ipprice"] = ""; //计划金额,double类型 + domBody[0]["dvdate"] = ""; //失效日期,DateTime类型 + domBody[0]["cobjcode"] = ""; //成本对象编码,string类型 + domBody[0]["cname"] = ""; //项目,string类型 + domBody[0]["isoutquantity"] = ""; //累计出库数量,double类型 + domBody[0]["isoutnum"] = ""; //累计出库件数,double类型 + domBody[0]["dsdate"] = ""; //结算日期,DateTime类型 + domBody[0]["ifquantity"] = ""; //实际数量,double类型 + domBody[0]["ifnum"] = ""; //实际件数,double类型 + domBody[0]["cvouchcode"] = ""; //对应入库单id,string类型 + domBody[0]["cbatchproperty3"] = ""; //批次属性3,double类型 + domBody[0]["cfree3"] = ""; //存货自由项3,string类型 + domBody[0]["cfree4"] = ""; //存货自由项4,string类型 + domBody[0]["cbatchproperty4"] = ""; //批次属性4,double类型 + domBody[0]["cbatchproperty5"] = ""; //批次属性5,double类型 + domBody[0]["cfree5"] = ""; //存货自由项5,string类型 + domBody[0]["cfree6"] = ""; //存货自由项6,string类型 + domBody[0]["cbatchproperty6"] = ""; //批次属性6,string类型 + domBody[0]["cbatchproperty7"] = ""; //批次属性7,string类型 + domBody[0]["cfree7"] = ""; //存货自由项7,string类型 + domBody[0]["cfree8"] = ""; //存货自由项8,string类型 + domBody[0]["cbatchproperty8"] = ""; //批次属性8,string类型 + domBody[0]["cbatchproperty9"] = ""; //批次属性9,string类型 + domBody[0]["cfree9"] = ""; //存货自由项9,string类型 + domBody[0]["cfree10"] = ""; //存货自由项10,string类型 + domBody[0]["cbatchproperty10"] = ""; //批次属性10,DateTime类型 + domBody[0]["cdefine36"] = ""; //表体自定义项15,DateTime类型 + domBody[0]["cdefine37"] = ""; //表体自定义项16,DateTime类型 + domBody[0]["cinvdefine13"] = ""; //存货自定义项13,string类型 + domBody[0]["cinvdefine14"] = ""; //存货自定义项14,string类型 + domBody[0]["cinvdefine15"] = ""; //存货自定义项15,string类型 + domBody[0]["cinvdefine16"] = ""; //存货自定义项16,string类型 + domBody[0]["inquantity"] = ""; //应发数量,double类型 + domBody[0]["innum"] = ""; //应发件数,double类型 + domBody[0]["dmadedate"] = ""; //生产日期,DateTime类型 + domBody[0]["impoids"] = 1000131351; //生产订单子表ID,int类型(这里是生产订单物料需求的ID) + domBody[0]["isodid"] = ""; //销售订单子表ID,string类型 + domBody[0]["iomomid"] = ""; //委外用料表ID,int类型 + domBody[0]["iomodid"] = ""; //委外订单子表ID,int类型 + domBody[0]["cbvencode"] = ""; //供应商编码,string类型 + domBody[0]["cinvouchcode"] = ""; //对应入库单号,string类型 + domBody[0]["imassdate"] = ""; //保质期,int类型 + domBody[0]["cassunit"] = ""; //库存单位码,string类型 + domBody[0]["cvenname"] = ""; //供应商,string类型 + domBody[0]["cposname"] = ""; //货位,string类型 + domBody[0]["corufts"] = ""; //对应单据时间戳,string类型 + domBody[0]["cmolotcode"] = ""; //生产批号,string类型 + domBody[0]["dmsdate"] = ""; //核销日期,DateTime类型 + domBody[0]["cmassunit"] = ""; //保质期单位,int类型 + domBody[0]["csocode"] = ""; //需求跟踪号,string类型 + domBody[0]["cmocode"] = "SCDD201200004"; //生产订单号,string类型 + domBody[0]["comcode"] = ""; //委外订单号,string类型 + domBody[0]["cvmivencode"] = ""; //代管商代码,string类型 + domBody[0]["cvmivenname"] = ""; //代管商,string类型 + domBody[0]["bvmiused"] = ""; //代管消耗标识,int类型 + domBody[0]["ivmisettlequantity"] = ""; //代管挂账确认单数量,double类型 + domBody[0]["ivmisettlenum"] = ""; //代管挂账确认单件数,double类型 + domBody[0]["productinids"] = ""; //productinids,int类型 + domBody[0]["crejectcode"] = ""; //在库不良品处理单号,string类型 + domBody[0]["cdemandmemo"] = ""; //需求分类代号说明,string类型 + domBody[0]["iordertype"] = ""; //销售订单类别,int类型 + domBody[0]["iorderdid"] = ""; //iorderdid,int类型 + domBody[0]["iordercode"] = ""; //销售订单号,string类型 + domBody[0]["iorderseq"] = ""; //销售订单行号,string类型 + domBody[0]["iexpiratdatecalcu"] = ""; //有效期推算方式,int类型 + domBody[0]["cexpirationdate"] = ""; //有效期至,string类型 + domBody[0]["dexpirationdate"] = ""; //有效期计算项,string类型 + domBody[0]["cciqbookcode"] = ""; //手册号,string类型 + domBody[0]["ibondedsumqty"] = ""; //累计保税处理抽取数量,string类型 + domBody[0]["copdesc"] = ""; //工序说明,string类型 + domBody[0]["cmworkcentercode"] = ""; //工作中心编码,string类型 + domBody[0]["cmworkcenter"] = ""; //工作中心,string类型 + domBody[0]["invcode"] = ""; //产品编码,string类型 + domBody[0]["invname"] = ""; //产品,string类型 + domBody[0]["cwhpersonname"] = ""; //库管员名称,string类型 + domBody[0]["cbaccounter"] = ""; //记账人,string类型 + domBody[0]["bcosting"] = ""; //是否核算,string类型 + domBody[0]["isotype"] = ""; //需求跟踪方式,int类型 + domBody[0]["isoseq"] = ""; //需求跟踪行号,string类型 + domBody[0]["imoseq"] = ""; //生产订单行号,string类型 + domBody[0]["iopseq"] = ""; //工序行号,string类型 + domBody[0]["isquantity"] = ""; //累计核销数量,double类型 + domBody[0]["ismaterialfee"] = ""; //累计核销金额,double类型 + domBody[0]["cdefine34"] = ""; //表体自定义项13,int类型 + domBody[0]["cdefine35"] = ""; //表体自定义项14,int类型 + domBody[0]["cwhpersoncode"] = ""; //库管员编码,string类型 + domBody[0]["cdefine22"] = ""; //表体自定义项1,string类型 + domBody[0]["cdefine28"] = ""; //表体自定义项7,string类型 + domBody[0]["cdefine29"] = ""; //表体自定义项8,string类型 + domBody[0]["cdefine30"] = ""; //表体自定义项9,string类型 + domBody[0]["cdefine31"] = ""; //表体自定义项10,string类型 + domBody[0]["cdefine32"] = ""; //表体自定义项11,string类型 + domBody[0]["cdefine33"] = ""; //表体自定义项12,string类型 + domBody[0]["cinvdefine4"] = ""; //存货自定义项4,string类型 + domBody[0]["cinvdefine5"] = ""; //存货自定义项5,string类型 + domBody[0]["cinvdefine6"] = ""; //存货自定义项6,string类型 + domBody[0]["cinvdefine7"] = ""; //存货自定义项7,string类型 + domBody[0]["cinvdefine8"] = ""; //存货自定义项8,string类型 + domBody[0]["cinvdefine9"] = ""; //存货自定义项9,string类型 + domBody[0]["cinvdefine10"] = ""; //存货自定义项10,string类型 + domBody[0]["cinvdefine11"] = ""; //存货自定义项11,string类型 + domBody[0]["cinvdefine12"] = ""; //存货自定义项12,string类型 + domBody[0]["cbarcode"] = ""; //条形码,string类型 + domBody[0]["cdefine23"] = ""; //表体自定义项2,string类型 + domBody[0]["cdefine24"] = ""; //表体自定义项3,string类型 + domBody[0]["itrids"] = ""; //特殊单据子表标识,double类型 + domBody[0]["cdefine25"] = ""; //表体自定义项4,string类型 + domBody[0]["cdefine26"] = ""; //表体自定义项5,double类型 + domBody[0]["cdefine27"] = ""; //表体自定义项6,double类型 + domBody[0]["citemcode"] = ""; //项目编码,string类型 + domBody[0]["citem_class"] = ""; //项目大类编码,string类型 + domBody[0]["citemcname"] = ""; //项目大类名称,string类型 + + //给普通参数domPosition赋值。此参数的数据类型为System.Object,此参数按引用传递,表示货位:传空 + broker.AssignNormalValue("domPosition", null); + + //该参数errMsg为OUT型参数,由于其数据类型为System.String,为一般值类型,因此不必传入一个参数变量。在API调用返回时,可以通过GetResult("errMsg")获取其值 + + //给普通参数cnnFrom赋值。此参数的数据类型为ADODB.Connection,此参数按引用传递,表示连接对象,如果由调用方控制事务,则需要设置此连接对象,否则传空 + broker.AssignNormalValue("cnnFrom", null); + + //该参数VouchId为INOUT型普通参数。此参数的数据类型为System.String,此参数按值传递。在API调用返回时,可以通过GetResult("VouchId")获取其值 + broker.AssignNormalValue("VouchId", ""); + + //该参数domMsg为OUT型参数,由于其数据类型为MSXML2.IXMLDOMDocument2,非一般值类型,因此必须传入一个参数变量。在API调用返回时,可以直接使用该参数 + MSXML2.IXMLDOMDocument2 domMsg = new DOMDocumentClass(); + broker.AssignNormalValue("domMsg", domMsg); + + //给普通参数bCheck赋值。此参数的数据类型为System.Boolean,此参数按值传递,表示是否控制可用量。 + broker.AssignNormalValue("bCheck", false); + + //给普通参数bBeforCheckStock赋值。此参数的数据类型为System.Boolean,此参数按值传递,表示检查可用量 + broker.AssignNormalValue("bBeforCheckStock", false); + + //给普通参数bIsRedVouch赋值。此参数的数据类型为System.Boolean,此参数按值传递,表示是否红字单据 + broker.AssignNormalValue("bIsRedVouch", false); + + //给普通参数sAddedState赋值。此参数的数据类型为System.String,此参数按值传递,表示传空字符串 + broker.AssignNormalValue("sAddedState", ""); + + //给普通参数bReMote赋值。此参数的数据类型为System.Boolean,此参数按值传递,表示是否远程:转入false + broker.AssignNormalValue("bReMote", false); + + + //第六步:调用API + if (!broker.Invoke()) + { + //错误处理 + Exception apiEx = broker.GetException(); + if (apiEx != null) + { + if (apiEx is MomSysException) + { + MomSysException sysEx = apiEx as MomSysException; + Console.WriteLine("系统异常:" + sysEx.Message); + //todo:异常处理 + } + else if (apiEx is MomBizException) + { + MomBizException bizEx = apiEx as MomBizException; + Console.WriteLine("API异常:" + bizEx.Message); + //todo:异常处理 + } + //异常原因 + String exReason = broker.GetExceptionString(); + if (exReason.Length != 0) + { + Console.WriteLine("异常原因:" + exReason); + } + } + //结束本次调用,释放API资源 + broker.Release(); + return; + } + + + + + //第七步:获取返回结果 + + //获取返回值 + //获取普通返回值。此返回值数据类型为System.Boolean,此参数按值传递,表示返回值:true:成功,false:失败 + System.Boolean result = Convert.ToBoolean(broker.GetReturnValue()); + + //获取out/inout参数值 + + //获取普通OUT参数errMsg。此返回值数据类型为System.String,在使用该参数之前,请判断是否为空 + System.String errMsgRet = broker.GetResult("errMsg") as string; + + //获取普通INOUT参数VouchId。此返回值数据类型为System.String,在使用该参数之前,请判断是否为空 + System.String VouchIdRet = broker.GetResult("VouchId") as string; + + //获取普通OUT参数domMsg。此返回值数据类型为MSXML2.IXMLDOMDocument2,在使用该参数之前,请判断是否为空 + MSXML2.IXMLDOMDocument2 domMsgRet = (MSXML2.IXMLDOMDocument2)broker.GetResult("domMsg"); + + //结束本次调用,释放API资源 + broker.Release(); + return; + } + } +} diff --git a/NX.ERP.U8/U8LoginContext.cs b/NX.ERP.U8/U8LoginContext.cs new file mode 100644 index 0000000..0b2f0ba --- /dev/null +++ b/NX.ERP.U8/U8LoginContext.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.Text; +using U8Login; + + +namespace NX.ERP.U8 +{ + public class U8LoginContext : IDisposable + { + + + private static U8LoginContext _u8LoginContext; + + public static U8LoginContext Instance + { + get + { + + if (_u8LoginContext == null) + { + _u8LoginContext = new U8LoginContext(); + } + return _u8LoginContext; + } + } + + + private UFSoft.U8.Framework.Login.UI.clsLogin uiLogin; + + private clsLogin _clslogin; + + public U8LoginContext() + { + //uiLogin = new UFSoft.U8.Framework.Login.UI.clsLogin(); + } + + public clsLogin ClsLogin + { + get + { + if (this._clslogin == null) + { + this.Login(); + } + return this._clslogin; + } + } + + public void Dispose() + { + if (uiLogin != null) + { + uiLogin.SubLogout(AccID); + uiLogin.ShutDown(); + uiLogin = null; + } + + } + public string UserId { get; set; } = "003"; + + public string PassWord { get; set; } = "123456"; + + public string Server { get; set; } = "192.168.0.250"; + + public string AccID { get; set; } = "u8@889"; + + public string Serial { get; set; } + + + + + + public string Constr4Net + { + get + { + return this.ClsLogin.UFDataConnstringForNet; + } + } + + + public string Constr + + { + get + { + return this.ClsLogin.UfDbName; + } + } + + private UFSoft.U8.Framework.Login.UI.clsLogin UiLogin + { + get + { + if (uiLogin == null) + { + uiLogin = new UFSoft.U8.Framework.Login.UI.clsLogin(); + } + return uiLogin; + } + } + + + + + + + + + public void Login(bool showlogin = false) + { + if (!UiLogin.login("DP", "wx998", "", "192.168.0.250", "2020-12-31", AccID, Serial, showlogin)) + { + throw new Exception(UiLogin.ErrDescript); + } + + if (UiLogin.SubLogin("ST") == null) + { + throw new Exception(UiLogin.ErrDescript); + } + this._clslogin = new clsLoginClass(); + if (!_clslogin.ConstructLogin(UiLogin.userToken)) + { + throw new Exception(_clslogin.ShareString); + } + _clslogin.set_TaskId(UiLogin.GetTaskID("ST")); + + + } + } +} diff --git a/NX.ERP.U8/packages.config b/NX.ERP.U8/packages.config new file mode 100644 index 0000000..4a227e1 --- /dev/null +++ b/NX.ERP.U8/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/NX.ERP.WebAPi/App_Start/BundleConfig.cs b/NX.ERP.WebAPi/App_Start/BundleConfig.cs new file mode 100644 index 0000000..6d90dcb --- /dev/null +++ b/NX.ERP.WebAPi/App_Start/BundleConfig.cs @@ -0,0 +1,27 @@ +using System.Web; +using System.Web.Optimization; + +namespace NX.ERP.WebAPi +{ + public class BundleConfig + { + // 有关捆绑的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkId=301862 + public static void RegisterBundles(BundleCollection bundles) + { + bundles.Add(new ScriptBundle("~/bundles/jquery").Include( + "~/Scripts/jquery-{version}.js")); + + // 使用要用于开发和学习的 Modernizr 的开发版本。然后,当你做好 + // 生产准备就绪,请使用 https://modernizr.com 上的生成工具仅选择所需的测试。 + bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( + "~/Scripts/modernizr-*")); + + bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( + "~/Scripts/bootstrap.js")); + + bundles.Add(new StyleBundle("~/Content/css").Include( + "~/Content/bootstrap.css", + "~/Content/site.css")); + } + } +} diff --git a/NX.ERP.WebAPi/App_Start/FilterConfig.cs b/NX.ERP.WebAPi/App_Start/FilterConfig.cs new file mode 100644 index 0000000..004b8e7 --- /dev/null +++ b/NX.ERP.WebAPi/App_Start/FilterConfig.cs @@ -0,0 +1,13 @@ +using System.Web; +using System.Web.Mvc; + +namespace NX.ERP.WebAPi +{ + public class FilterConfig + { + public static void RegisterGlobalFilters(GlobalFilterCollection filters) + { + filters.Add(new HandleErrorAttribute()); + } + } +} diff --git a/NX.ERP.WebAPi/App_Start/RouteConfig.cs b/NX.ERP.WebAPi/App_Start/RouteConfig.cs new file mode 100644 index 0000000..e46c0be --- /dev/null +++ b/NX.ERP.WebAPi/App_Start/RouteConfig.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using System.Web.Routing; + +namespace NX.ERP.WebAPi +{ + public class RouteConfig + { + public static void RegisterRoutes(RouteCollection routes) + { + routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); + + routes.MapRoute( + name: "Default", + url: "{controller}/{action}/{id}", + defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } + ); + } + } +} diff --git a/NX.ERP.WebAPi/App_Start/WebApiConfig.cs b/NX.ERP.WebAPi/App_Start/WebApiConfig.cs new file mode 100644 index 0000000..295e0c1 --- /dev/null +++ b/NX.ERP.WebAPi/App_Start/WebApiConfig.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Net.Http.Formatting; +using System.Net.Http.Headers; +using System.Web.Http; + +namespace NX.ERP.WebAPi +{ + public class JsonContentNegotiator : IContentNegotiator + { + private readonly JsonMediaTypeFormatter _jsonFormatter; + + public JsonContentNegotiator(JsonMediaTypeFormatter formatter) + { + _jsonFormatter = formatter; + } + + public ContentNegotiationResult Negotiate(Type type, HttpRequestMessage request, IEnumerable formatters) + { + var result = new ContentNegotiationResult(_jsonFormatter, new MediaTypeHeaderValue("application/json")); + return result; + } + } + public static class WebApiConfig + { + public static void Register(HttpConfiguration config) + { + // Web API 配置和服务 + + // Web API 路由 + config.MapHttpAttributeRoutes(); + var jsonFormatter = new JsonMediaTypeFormatter(); + + config.Services.Replace(typeof(IContentNegotiator), new JsonContentNegotiator(jsonFormatter)); + config.Routes.MapHttpRoute( + name: "DefaultApi", + routeTemplate: "api/{controller}/{action}/{id}", + defaults: new { id = RouteParameter.Optional } + ); + } + } +} diff --git a/NX.ERP.WebAPi/Controllers/CustomerController.cs b/NX.ERP.WebAPi/Controllers/CustomerController.cs new file mode 100644 index 0000000..55d27d1 --- /dev/null +++ b/NX.ERP.WebAPi/Controllers/CustomerController.cs @@ -0,0 +1,27 @@ +using NX.ERP.U8; +using NX.ERP.U8.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; + +namespace NX.ERP.WebAPi.Controllers +{ + + public class CustomerController : ApiController + { + // GET api/values + [HttpGet] + public IEnumerable List() + { + var customerDAL = new CustomerDAL(); + return customerDAL.GetList(); + + } + + // GET api/values/5 + + } +} diff --git a/NX.ERP.WebAPi/Controllers/HomeController.cs b/NX.ERP.WebAPi/Controllers/HomeController.cs new file mode 100644 index 0000000..4f91382 --- /dev/null +++ b/NX.ERP.WebAPi/Controllers/HomeController.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace NX.ERP.WebAPi.Controllers +{ + public class HomeController : Controller + { + public ActionResult Index() + { + ViewBag.Title = "Home Page"; + + return View(); + } + } +} diff --git a/NX.ERP.WebAPi/Controllers/MaterielController.cs b/NX.ERP.WebAPi/Controllers/MaterielController.cs new file mode 100644 index 0000000..116df17 --- /dev/null +++ b/NX.ERP.WebAPi/Controllers/MaterielController.cs @@ -0,0 +1,21 @@ +using NX.ERP.Model; +using NX.ERP.U8; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; + +namespace NX.ERP.WebAPi.Controllers +{ + public class MaterielController : ApiController + { + [HttpGet] + public IEnumerable List() + { + var materielDAL = new MaterielDAL(); + return materielDAL.GetList(); + + } + } +} \ No newline at end of file diff --git a/NX.ERP.WebAPi/Controllers/MaterielTypeController.cs b/NX.ERP.WebAPi/Controllers/MaterielTypeController.cs new file mode 100644 index 0000000..10c1a99 --- /dev/null +++ b/NX.ERP.WebAPi/Controllers/MaterielTypeController.cs @@ -0,0 +1,21 @@ +using NX.ERP.Model; +using NX.ERP.U8; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; + +namespace NX.ERP.WebAPi.Controllers +{ + public class MaterielTypeController:ApiController + { + [HttpGet] + public IEnumerable List() + { + var materielType = new MaterielTypeDAL(); + return materielType.GetList(); + + } + } +} \ No newline at end of file diff --git a/NX.ERP.WebAPi/Controllers/PositionController.cs b/NX.ERP.WebAPi/Controllers/PositionController.cs new file mode 100644 index 0000000..05a7103 --- /dev/null +++ b/NX.ERP.WebAPi/Controllers/PositionController.cs @@ -0,0 +1,20 @@ +using NX.ERP.U8.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; + +namespace NX.ERP.WebAPi.Controllers +{ + public class PositionController : ApiController + { + [HttpGet] + public IEnumerable List() + { + var binDAL = new BinDAL(); + return binDAL.GetList(); + + } + } +} \ No newline at end of file diff --git a/NX.ERP.WebAPi/Controllers/SupplierController.cs b/NX.ERP.WebAPi/Controllers/SupplierController.cs new file mode 100644 index 0000000..24a3d8a --- /dev/null +++ b/NX.ERP.WebAPi/Controllers/SupplierController.cs @@ -0,0 +1,21 @@ +using NX.ERP.Model; +using NX.ERP.U8; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; + +namespace NX.ERP.WebAPi.Controllers +{ + public class SupplierController : ApiController + { + [HttpGet] + public IEnumerable List() + { + var supplierDAL = new SupplierDAL(); + return supplierDAL.GetList(); + + } + } +} \ No newline at end of file diff --git a/NX.ERP.WebAPi/Controllers/UnitController.cs b/NX.ERP.WebAPi/Controllers/UnitController.cs new file mode 100644 index 0000000..eb036fe --- /dev/null +++ b/NX.ERP.WebAPi/Controllers/UnitController.cs @@ -0,0 +1,20 @@ +using NX.ERP.U8; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; + +namespace NX.ERP.WebAPi.Controllers +{ + public class UnitController: ApiController + { + [HttpGet] + public IEnumerable List() + { + var supplierDAL = new UnitDAL(); + return supplierDAL.GetList(); + + } + } +} \ No newline at end of file diff --git a/NX.ERP.WebAPi/Controllers/WarehouseController.cs b/NX.ERP.WebAPi/Controllers/WarehouseController.cs new file mode 100644 index 0000000..851c632 --- /dev/null +++ b/NX.ERP.WebAPi/Controllers/WarehouseController.cs @@ -0,0 +1,19 @@ +using NX.ERP.U8; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; + +namespace NX.ERP.WebAPi.Controllers +{ + public class WarehouseController:ApiController + { + [HttpGet] + public IEnumerable List() + { + var warehouseDAL = new WarehouseDAL(); + return warehouseDAL.GetList(); + } + } +} \ No newline at end of file diff --git a/NX.ERP.WebAPi/Global.asax b/NX.ERP.WebAPi/Global.asax new file mode 100644 index 0000000..643c589 --- /dev/null +++ b/NX.ERP.WebAPi/Global.asax @@ -0,0 +1 @@ +<%@ Application Codebehind="Global.asax.cs" Inherits="NX.ERP.WebAPi.WebApiApplication" Language="C#" %> diff --git a/NX.ERP.WebAPi/Global.asax.cs b/NX.ERP.WebAPi/Global.asax.cs new file mode 100644 index 0000000..3b73673 --- /dev/null +++ b/NX.ERP.WebAPi/Global.asax.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; +using System.Web.Mvc; +using System.Web.Optimization; +using System.Web.Routing; + +namespace NX.ERP.WebAPi +{ + public class WebApiApplication : System.Web.HttpApplication + { + protected void Application_Start() + { + + GlobalConfiguration.Configure(WebApiConfig.Register); + FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); + RouteConfig.RegisterRoutes(RouteTable.Routes); + + } + } +} diff --git a/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj b/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj new file mode 100644 index 0000000..5670bb6 --- /dev/null +++ b/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj @@ -0,0 +1,210 @@ + + + + + + Debug + AnyCPU + + + 2.0 + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + NX.ERP.WebAPi + NX.ERP.WebAPi + v4.5 + false + true + + + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + true + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + True + ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll + + + + + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll + + + + + True + ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll + + + ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll + + + ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll + + + True + ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll + + + ..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll + + + True + ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll + + + True + ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll + + + True + ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll + + + True + ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll + + + True + ..\packages\WebGrease.1.6.0\lib\WebGrease.dll + + + True + ..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll + + + + + ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + + + + + + + + + + + + + + + + + Global.asax + + + + + + + + + Web.config + + + Web.config + + + + + + + + + + + {5d012e0a-afed-474e-81a9-5820890b1b29} + NX.ERP.Model + + + {bd673da9-0606-4bcf-a016-fb5c4e7b5d59} + NX.ERP.U8 + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + + + + True + True + 61448 + / + http://localhost:61448/ + False + False + + + False + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + + \ No newline at end of file diff --git a/NX.ERP.WebAPi/Properties/AssemblyInfo.cs b/NX.ERP.WebAPi/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b762354 --- /dev/null +++ b/NX.ERP.WebAPi/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息是通过以下项进行控制的 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("WebApplication3")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WebApplication3")] +[assembly: AssemblyCopyright("版权所有(C) 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 将使此程序集中的类型 +// 对 COM 组件不可见。如果需要 +// 从 COM 访问此程序集中的某个类型,请针对该类型将 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID +[assembly: Guid("cfd6a673-76a8-438e-9698-f5fe204ec81b")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订版本 +// +// 你可以指定所有值,也可以让修订版本和内部版本号采用默认值, +// 方法是按如下所示使用 "*": +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/NX.ERP.WebAPi/Web.Debug.config b/NX.ERP.WebAPi/Web.Debug.config new file mode 100644 index 0000000..e984717 --- /dev/null +++ b/NX.ERP.WebAPi/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + diff --git a/NX.ERP.WebAPi/Web.Release.config b/NX.ERP.WebAPi/Web.Release.config new file mode 100644 index 0000000..be98f9a --- /dev/null +++ b/NX.ERP.WebAPi/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/NX.ERP.WebAPi/Web.config b/NX.ERP.WebAPi/Web.config new file mode 100644 index 0000000..08b9178 --- /dev/null +++ b/NX.ERP.WebAPi/Web.config @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NX.ERP.WebAPi/favicon.ico b/NX.ERP.WebAPi/favicon.ico new file mode 100644 index 0000000..a3a7999 Binary files /dev/null and b/NX.ERP.WebAPi/favicon.ico differ diff --git a/NX.ERP.WebAPi/packages.config b/NX.ERP.WebAPi/packages.config new file mode 100644 index 0000000..08b1318 --- /dev/null +++ b/NX.ERP.WebAPi/packages.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/U8App.sln b/U8App.sln index c41b1fe..7854191 100644 --- a/U8App.sln +++ b/U8App.sln @@ -3,18 +3,70 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30804.86 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "U8AppMain", "U8AppMain\U8AppMain.csproj", "{8A6603B0-444A-49C7-80C9-195638129068}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NX.ERP.WebAPi", "NX.ERP.WebAPi\NX.ERP.WebAPi.csproj", "{A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NX.ERP.Model", "NX.ERP.Model\NX.ERP.Model.csproj", "{5D012E0A-AFED-474E-81A9-5820890B1B29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NX.ERP.U8", "NX.ERP.U8\NX.ERP.U8.csproj", "{BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NX.ERP.U8.App", "NX.ERP.U8.App\NX.ERP.U8.App.csproj", "{8A6603B0-444A-49C7-80C9-195638129068}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Debug|x64.ActiveCfg = Debug|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Debug|x64.Build.0 = Debug|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Debug|x86.ActiveCfg = Debug|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Debug|x86.Build.0 = Debug|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Release|Any CPU.Build.0 = Release|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Release|x64.ActiveCfg = Release|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Release|x64.Build.0 = Release|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Release|x86.ActiveCfg = Release|Any CPU + {A958D236-BAD0-4A56-ADB1-CEA3A1EF452B}.Release|x86.Build.0 = Release|Any CPU + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Debug|x64.ActiveCfg = Debug|Any CPU + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Debug|x86.ActiveCfg = Debug|x86 + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Debug|x86.Build.0 = Debug|x86 + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Release|Any CPU.Build.0 = Release|Any CPU + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Release|x64.ActiveCfg = Release|Any CPU + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Release|x86.ActiveCfg = Release|x86 + {5D012E0A-AFED-474E-81A9-5820890B1B29}.Release|x86.Build.0 = Release|x86 + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Debug|x64.ActiveCfg = Debug|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Debug|x64.Build.0 = Debug|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Debug|x86.ActiveCfg = Debug|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Debug|x86.Build.0 = Debug|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Release|Any CPU.Build.0 = Release|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Release|x64.ActiveCfg = Release|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Release|x64.Build.0 = Release|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Release|x86.ActiveCfg = Release|Any CPU + {BD673DA9-0606-4BCF-A016-FB5C4E7B5D59}.Release|x86.Build.0 = Release|Any CPU {8A6603B0-444A-49C7-80C9-195638129068}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8A6603B0-444A-49C7-80C9-195638129068}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8A6603B0-444A-49C7-80C9-195638129068}.Debug|x64.ActiveCfg = Debug|Any CPU + {8A6603B0-444A-49C7-80C9-195638129068}.Debug|x64.Build.0 = Debug|Any CPU + {8A6603B0-444A-49C7-80C9-195638129068}.Debug|x86.ActiveCfg = Debug|Any CPU + {8A6603B0-444A-49C7-80C9-195638129068}.Debug|x86.Build.0 = Debug|Any CPU {8A6603B0-444A-49C7-80C9-195638129068}.Release|Any CPU.ActiveCfg = Release|Any CPU {8A6603B0-444A-49C7-80C9-195638129068}.Release|Any CPU.Build.0 = Release|Any CPU + {8A6603B0-444A-49C7-80C9-195638129068}.Release|x64.ActiveCfg = Release|Any CPU + {8A6603B0-444A-49C7-80C9-195638129068}.Release|x64.Build.0 = Release|Any CPU + {8A6603B0-444A-49C7-80C9-195638129068}.Release|x86.ActiveCfg = Release|Any CPU + {8A6603B0-444A-49C7-80C9-195638129068}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/U8AppMain/App.config b/U8AppMain/App.config deleted file mode 100644 index 6aec793..0000000 --- a/U8AppMain/App.config +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/U8AppMain/HttpHelper.cs b/U8AppMain/HttpHelper.cs deleted file mode 100644 index a64de3b..0000000 --- a/U8AppMain/HttpHelper.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Text; -using System.Threading.Tasks; - -namespace U8AppMain -{ - public static class HttpHelper - { - public static Task Post(string url, string strBody) - { - strBody = strBody ?? ""; - using (HttpClient client = new HttpClient()) - { - var httpContent = new StringContent(strBody, Encoding.UTF8); - httpContent.Headers.ContentType.MediaType = "application/xml"; - httpContent.Headers.ContentType.CharSet = "utf-8"; - HttpResponseMessage response = client.PostAsync(url, httpContent).Result; - if (httpContent != null) - httpContent.Dispose(); - return response.Content.ReadAsStringAsync(); - } - } - } -} diff --git a/U8AppMain/packages.config b/U8AppMain/packages.config deleted file mode 100644 index e8831e1..0000000 --- a/U8AppMain/packages.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/U8Interface/Class1.cs b/U8Interface/Class1.cs new file mode 100644 index 0000000..5ec472f --- /dev/null +++ b/U8Interface/Class1.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace U8Interface +{ + public class Class1 + { + } +} diff --git a/U8Interface/Properties/AssemblyInfo.cs b/U8Interface/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7e3ef2a --- /dev/null +++ b/U8Interface/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("U8Interface")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("U8Interface")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("2536060b-59aa-4102-9e4f-81195d9e58d0")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/U8Interface/U8Interface.csproj b/U8Interface/U8Interface.csproj new file mode 100644 index 0000000..5984918 --- /dev/null +++ b/U8Interface/U8Interface.csproj @@ -0,0 +1,50 @@ + + + + + Debug + AnyCPU + 2536060b-59aa-4102-9e4f-81195d9e58d0 + Library + Properties + U8Interface + U8Interface + v3.5 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + +