添加项目文件。
This commit is contained in:
25
U8App.sln
Normal file
25
U8App.sln
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
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}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{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}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{8A6603B0-444A-49C7-80C9-195638129068}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {8C57E044-32E1-444C-B548-E83838110953}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
6
U8AppMain/App.config
Normal file
6
U8AppMain/App.config
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
57
U8AppMain/Bom/Bom.cs
Normal file
57
U8AppMain/Bom/Bom.cs
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
|
namespace U8AppMain.Bom
|
||||||
|
{
|
||||||
|
public class BomEnity
|
||||||
|
{
|
||||||
|
public VersionEnity Version { get; set; } = new VersionEnity();
|
||||||
|
|
||||||
|
public ParentEnity Parent { get; set; } = new ParentEnity();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[XmlElement(Type = typeof(ComponentEnity))]
|
||||||
|
public List<ComponentEnity> Component
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._componentBodies.ConvertAll(m => { return m.Component; });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[XmlElement(Type = typeof(ComponentOptEnity))]
|
||||||
|
public List<ComponentOptEnity> ComponentOpt
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
|
||||||
|
return this.ComponentBodies.ConvertAll(m => { return m.ComponentOpt; });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[XmlElement(Type = typeof(ComponentRmkEnity))]
|
||||||
|
public List<ComponentRmkEnity> ComponentRmks
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.ComponentBodies.ConvertAll(m => { return m.componentRmk; });
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[XmlIgnore]
|
||||||
|
public List<ComponentBody> ComponentBodies { get => _componentBodies; set => _componentBodies = value; }
|
||||||
|
|
||||||
|
private List<ComponentBody> _componentBodies = new List<ComponentBody>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
21
U8AppMain/Bom/ComponentBody.cs
Normal file
21
U8AppMain/Bom/ComponentBody.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
|
namespace U8AppMain.Bom
|
||||||
|
{
|
||||||
|
|
||||||
|
public class ComponentBody
|
||||||
|
{
|
||||||
|
public ComponentEnity Component { get; set; } = new ComponentEnity();
|
||||||
|
|
||||||
|
|
||||||
|
public ComponentOptEnity ComponentOpt { get; set; } = new ComponentOptEnity();
|
||||||
|
|
||||||
|
|
||||||
|
public ComponentRmkEnity componentRmk { get; set; } = new ComponentRmkEnity();
|
||||||
|
}
|
||||||
|
}
|
||||||
53
U8AppMain/Bom/ComponentEnity.cs
Normal file
53
U8AppMain/Bom/ComponentEnity.cs
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Bom
|
||||||
|
{
|
||||||
|
|
||||||
|
public class ComponentEnity
|
||||||
|
{
|
||||||
|
public int OpComponentId { get; set; }
|
||||||
|
public int BomId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public int SortSeq { get; set; }
|
||||||
|
public string OpSeq { get; set; }
|
||||||
|
|
||||||
|
public string InvCode { get; set; }
|
||||||
|
|
||||||
|
public DateTime EffBegDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime EffEndDate { get; set; }
|
||||||
|
|
||||||
|
public int FVFlag { get; set; }
|
||||||
|
|
||||||
|
public decimal BaseQtyN { get; set; }
|
||||||
|
|
||||||
|
public decimal BaseQtyD { get; set; }
|
||||||
|
|
||||||
|
public decimal CompScrap { get; set; }
|
||||||
|
|
||||||
|
public bool ByproductFlag { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public int OptionsId { get; set; }
|
||||||
|
|
||||||
|
//<OpComponentId>11</OpComponentId>
|
||||||
|
// <BomId>4</BomId>
|
||||||
|
// <SortSeq>20</SortSeq>
|
||||||
|
// <OpSeq>0000</OpSeq>
|
||||||
|
// <InvCode>502006</InvCode>
|
||||||
|
// <EffBegDate>2000-01-07T00:00:00+08:00</EffBegDate>
|
||||||
|
// <EffEndDate>2099-12-31T00:00:00+08:00</EffEndDate>
|
||||||
|
// <FVFlag>1</FVFlag>
|
||||||
|
// <BaseQtyN>1.000000</BaseQtyN>
|
||||||
|
// <BaseQtyD>1.000000</BaseQtyD>
|
||||||
|
// <CompScrap>0.000</CompScrap>
|
||||||
|
// <ByproductFlag>false</ByproductFlag>
|
||||||
|
// <OptionsId>11</OptionsId>
|
||||||
|
}
|
||||||
|
}
|
||||||
22
U8AppMain/Bom/ComponentOptEnity.cs
Normal file
22
U8AppMain/Bom/ComponentOptEnity.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Bom
|
||||||
|
{
|
||||||
|
public class ComponentOptEnity
|
||||||
|
{
|
||||||
|
|
||||||
|
public int OptionsId { get; set; }
|
||||||
|
public int Offset { get; set; }
|
||||||
|
public bool AccuCostFlag { get; set; }
|
||||||
|
public string DrawDeptCode { get; set; }
|
||||||
|
public string Whcode { get; set; }
|
||||||
|
public bool OptionalFlag { get; set; }
|
||||||
|
public int MutexRule { get; set; }
|
||||||
|
public decimal PlanFactor { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
12
U8AppMain/Bom/ComponentRmkEnity.cs
Normal file
12
U8AppMain/Bom/ComponentRmkEnity.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Bom
|
||||||
|
{
|
||||||
|
public class ComponentRmkEnity
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
25
U8AppMain/Bom/ParentEnity.cs
Normal file
25
U8AppMain/Bom/ParentEnity.cs
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Bom
|
||||||
|
{
|
||||||
|
public class ParentEnity
|
||||||
|
{
|
||||||
|
|
||||||
|
public int BomId { get; set; }
|
||||||
|
public string InvCode { get; set; } = "";
|
||||||
|
|
||||||
|
public string InvName { get; set; } = "";
|
||||||
|
|
||||||
|
|
||||||
|
public decimal ParentScrap { get; set; }
|
||||||
|
|
||||||
|
//<BomId>4</BomId>
|
||||||
|
// <InvCode>1001002</InvCode>
|
||||||
|
// <InvName>环球普通PC</InvName>
|
||||||
|
// <ParentScrap>0.000</ParentScrap>
|
||||||
|
}
|
||||||
|
}
|
||||||
25
U8AppMain/Bom/Version.cs
Normal file
25
U8AppMain/Bom/Version.cs
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Bom
|
||||||
|
{
|
||||||
|
public class VersionEnity
|
||||||
|
{
|
||||||
|
public int BomId { get; set; } = 0;
|
||||||
|
public int BomType { get; set; }
|
||||||
|
public int Version { get; set; }
|
||||||
|
public String VersionDesc { get; set; }
|
||||||
|
public DateTime VersionEffDate { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
public int Status { get; set; }
|
||||||
|
|
||||||
|
//<BomType>1</BomType>
|
||||||
|
// <Version>70</Version>
|
||||||
|
// <VersionDesc>环球普通PC</VersionDesc>
|
||||||
|
// <VersionEffDate>2000-01-07T00:00:00+08:00</VersionEffDate>
|
||||||
|
// <Status>3</Status>
|
||||||
|
}
|
||||||
|
}
|
||||||
45
U8AppMain/Bom/ufinterface.cs
Normal file
45
U8AppMain/Bom/ufinterface.cs
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Xml;
|
||||||
|
namespace U8AppMain.Bom
|
||||||
|
{
|
||||||
|
public class ufinterface
|
||||||
|
{
|
||||||
|
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string Sender { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string receiver { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string roottag { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string docid { get; set; }
|
||||||
|
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string proc { get; set; }
|
||||||
|
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string codeexchanged { get; set; }
|
||||||
|
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string exportneedexch { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string paginate { get; set; }
|
||||||
|
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string display { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string family { get; set; }
|
||||||
|
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string timestamp { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public BomEnity Bom { get; set; } = new BomEnity();
|
||||||
|
}
|
||||||
|
}
|
||||||
86
U8AppMain/FrmMain.Designer.cs
generated
Normal file
86
U8AppMain/FrmMain.Designer.cs
generated
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
|
||||||
|
namespace U8AppMain
|
||||||
|
{
|
||||||
|
partial class FrmMain
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows 窗体设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.panel2 = new System.Windows.Forms.Panel();
|
||||||
|
this.BtnBomImport = new System.Windows.Forms.Button();
|
||||||
|
this.panel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
this.panel1.Controls.Add(this.BtnBomImport);
|
||||||
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panel1.Name = "panel1";
|
||||||
|
this.panel1.Size = new System.Drawing.Size(800, 42);
|
||||||
|
this.panel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// panel2
|
||||||
|
//
|
||||||
|
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panel2.Location = new System.Drawing.Point(0, 42);
|
||||||
|
this.panel2.Name = "panel2";
|
||||||
|
this.panel2.Size = new System.Drawing.Size(800, 408);
|
||||||
|
this.panel2.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// BtnBomImport
|
||||||
|
//
|
||||||
|
this.BtnBomImport.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.BtnBomImport.Name = "BtnBomImport";
|
||||||
|
this.BtnBomImport.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.BtnBomImport.TabIndex = 0;
|
||||||
|
this.BtnBomImport.Text = "Bom导入";
|
||||||
|
this.BtnBomImport.UseVisualStyleBackColor = true;
|
||||||
|
this.BtnBomImport.Click += new System.EventHandler(this.BtnBomImport_Click);
|
||||||
|
//
|
||||||
|
// Form1
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
this.Controls.Add(this.panel2);
|
||||||
|
this.Controls.Add(this.panel1);
|
||||||
|
this.Name = "Form1";
|
||||||
|
this.Text = "Form1";
|
||||||
|
this.panel1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Panel panel1;
|
||||||
|
private System.Windows.Forms.Button BtnBomImport;
|
||||||
|
private System.Windows.Forms.Panel panel2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
29
U8AppMain/FrmMain.cs
Normal file
29
U8AppMain/FrmMain.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Xml.Serialization;
|
||||||
|
namespace U8AppMain
|
||||||
|
{
|
||||||
|
public partial class FrmMain : Form
|
||||||
|
{
|
||||||
|
public FrmMain()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BtnBomImport_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var bom = new Bom.ufinterface();
|
||||||
|
bom.Bom.ComponentBodies.Add(new Bom.ComponentBody());
|
||||||
|
bom.Bom.ComponentBodies.Add(new Bom.ComponentBody());
|
||||||
|
|
||||||
|
MessageBox.Show(XmlHelper.XmlSerialize(bom, Encoding.UTF8));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
U8AppMain/FrmMain.resx
Normal file
120
U8AppMain/FrmMain.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
22
U8AppMain/Program.cs
Normal file
22
U8AppMain/Program.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace U8AppMain
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 应用程序的主入口点。
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new FrmMain());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
U8AppMain/Properties/AssemblyInfo.cs
Normal file
36
U8AppMain/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的一般信息由以下
|
||||||
|
// 控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("U8AppMain")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("U8AppMain")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||||
|
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||||
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("8a6603b0-444a-49c7-80c9-195638129068")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下列四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 生成号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
|
//通过使用 "*",如下所示:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
70
U8AppMain/Properties/Resources.Designer.cs
generated
Normal file
70
U8AppMain/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
// 运行时版本: 4.0.30319.42000
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
namespace U8AppMain.Properties
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 强类型资源类,用于查找本地化字符串等。
|
||||||
|
/// </summary>
|
||||||
|
// 此类是由 StronglyTypedResourceBuilder
|
||||||
|
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||||
|
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||||
|
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources
|
||||||
|
{
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if ((resourceMan == null))
|
||||||
|
{
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("U8AppMain.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||||
|
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
117
U8AppMain/Properties/Resources.resx
Normal file
117
U8AppMain/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
29
U8AppMain/Properties/Settings.Designer.cs
generated
Normal file
29
U8AppMain/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
namespace U8AppMain.Properties
|
||||||
|
{
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||||
|
{
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
U8AppMain/Properties/Settings.settings
Normal file
7
U8AppMain/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
14
U8AppMain/Purchase/BodyEnity.cs
Normal file
14
U8AppMain/Purchase/BodyEnity.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Purchase
|
||||||
|
{
|
||||||
|
public class BodyEnity
|
||||||
|
{
|
||||||
|
[System.Xml.Serialization.XmlElement(Type =typeof(entry),ElementName = "entry")]
|
||||||
|
public List<entry> entries { get; set; } = new List<entry>();
|
||||||
|
}
|
||||||
|
}
|
||||||
88
U8AppMain/Purchase/EntryEnity.cs
Normal file
88
U8AppMain/Purchase/EntryEnity.cs
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Purchase
|
||||||
|
{
|
||||||
|
public class entry
|
||||||
|
{
|
||||||
|
|
||||||
|
public string vendorcode { get; set; }
|
||||||
|
public string inventorycode { get; set; }
|
||||||
|
|
||||||
|
public int quantity { get; set; }
|
||||||
|
|
||||||
|
public decimal price { get; set; }
|
||||||
|
|
||||||
|
public decimal taxrate { get; set; }
|
||||||
|
|
||||||
|
public decimal taxprice { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public decimal money { get; set; }
|
||||||
|
|
||||||
|
public decimal tax { get; set; }
|
||||||
|
public decimal sum { get; set; }
|
||||||
|
|
||||||
|
public string requiredate { get; set; }
|
||||||
|
|
||||||
|
public string arrivedate { get; set; }
|
||||||
|
|
||||||
|
public string item_class { get; set; }
|
||||||
|
|
||||||
|
public string item_code { get; set; }
|
||||||
|
|
||||||
|
public decimal btaxcost { get; set; }
|
||||||
|
|
||||||
|
public decimal num { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string unitid { get; set; }
|
||||||
|
|
||||||
|
public string deptcodeexec { get; set; }
|
||||||
|
public string personcodeexec { get; set; }
|
||||||
|
|
||||||
|
public string currency_name { get; set; }
|
||||||
|
|
||||||
|
public decimal currency_rate { get; set; }
|
||||||
|
|
||||||
|
public string originalprice { get; set; }
|
||||||
|
public string originalmoney { get; set; }
|
||||||
|
|
||||||
|
public string originaltax { get; set; }
|
||||||
|
|
||||||
|
public string originalsum { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string ivouchrowno { get; set; }
|
||||||
|
// <vendorcode />
|
||||||
|
//<inventorycode>107001</inventorycode>
|
||||||
|
//<quantity>456</quantity>
|
||||||
|
//<price />
|
||||||
|
//<taxrate />
|
||||||
|
//<taxprice />
|
||||||
|
//<money />
|
||||||
|
//<tax />
|
||||||
|
//<sum />
|
||||||
|
//<requiredate>2020-12-17</requiredate>
|
||||||
|
//<arrivedate />
|
||||||
|
//<item_class />
|
||||||
|
//<item_code />
|
||||||
|
//<item_name />
|
||||||
|
//<btaxcost />
|
||||||
|
//<num />
|
||||||
|
//<unitid />
|
||||||
|
//<deptcodeexec />
|
||||||
|
//<personcodeexec />
|
||||||
|
//<currency_name>人民币</currency_name>
|
||||||
|
//<currency_rate>1</currency_rate>
|
||||||
|
//<originalprice />
|
||||||
|
//<originaltaxedprice />
|
||||||
|
//<originalmoney />
|
||||||
|
//<originaltax />
|
||||||
|
//<originalsum />
|
||||||
|
//<ivouchrowno />
|
||||||
|
}
|
||||||
|
}
|
||||||
67
U8AppMain/Purchase/HeaderEnity.cs
Normal file
67
U8AppMain/Purchase/HeaderEnity.cs
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Purchase
|
||||||
|
{
|
||||||
|
public class HeaderEnity
|
||||||
|
{
|
||||||
|
public string code { get; set; }
|
||||||
|
public string date { get; set; }
|
||||||
|
public string departmentcode { get; set; }
|
||||||
|
public string personcode { get; set; }
|
||||||
|
public string purchasetypecode { get; set; }
|
||||||
|
|
||||||
|
public string businesstype { get; set; }
|
||||||
|
|
||||||
|
public string maker { get; set; }
|
||||||
|
|
||||||
|
public string define1 { get; set; }
|
||||||
|
public string define2 { get; set; }
|
||||||
|
public string define3 { get; set; }
|
||||||
|
public string define4 { get; set; }
|
||||||
|
public string define5 { get; set; }
|
||||||
|
public string define6 { get; set; }
|
||||||
|
public string define7 { get; set; }
|
||||||
|
public string define8 { get; set; }
|
||||||
|
public string define9 { get; set; }
|
||||||
|
public string define10 { get; set; }
|
||||||
|
public string define11{ get; set; }
|
||||||
|
|
||||||
|
public string define12 { get; set; }
|
||||||
|
public string define13 { get; set; }
|
||||||
|
public string define14 { get; set; }
|
||||||
|
public string define15 { get; set; }
|
||||||
|
public string define16 { get; set; }
|
||||||
|
public string memory { get; set; }
|
||||||
|
|
||||||
|
// <code>CGQGD2132131</code>
|
||||||
|
//<date>2020-12-17</date>
|
||||||
|
//<departmentcode>51</departmentcode>
|
||||||
|
//<personcode>0031</personcode>
|
||||||
|
//<purchasetypecode>01</purchasetypecode>
|
||||||
|
//<businesstype>普通采购</businesstype>
|
||||||
|
//<maker>苏青红</maker>
|
||||||
|
//<define1 />
|
||||||
|
//<define2 />
|
||||||
|
//<define3 />
|
||||||
|
//<define4 />
|
||||||
|
//<define5 />
|
||||||
|
//<define6 />
|
||||||
|
//<define7 />
|
||||||
|
//<define8 />
|
||||||
|
//<define9 />
|
||||||
|
//<define10 />
|
||||||
|
//<define11 />
|
||||||
|
//<define12 />
|
||||||
|
//<define13 />
|
||||||
|
//<define14 />
|
||||||
|
//<define15 />
|
||||||
|
//<define16 />
|
||||||
|
//<memory />
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
17
U8AppMain/Purchase/PurchaseEnity.cs
Normal file
17
U8AppMain/Purchase/PurchaseEnity.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Purchase
|
||||||
|
{
|
||||||
|
public class PurchaseEnity
|
||||||
|
{
|
||||||
|
public HeaderEnity header { get; set; } = new HeaderEnity();
|
||||||
|
|
||||||
|
|
||||||
|
//public BodyEnity body { get; set; } = new BodyEnity();
|
||||||
|
public List<entry> body { get; set; } = new List<entry>();
|
||||||
|
}
|
||||||
|
}
|
||||||
51
U8AppMain/Purchase/ufinterface.cs
Normal file
51
U8AppMain/Purchase/ufinterface.cs
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace U8AppMain.Purchase
|
||||||
|
{
|
||||||
|
public class ufinterface
|
||||||
|
{
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string roottag { get; set; }
|
||||||
|
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string billtype { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string docid { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string receiver { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string sender { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string proc { get; set; }
|
||||||
|
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string codeexchanged { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string exportneedexch { get; set; }
|
||||||
|
[System.Xml.Serialization.XmlAttribute]
|
||||||
|
public string version { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//roottag="purchaseapp"
|
||||||
|
// billtype=""
|
||||||
|
// docid="123"
|
||||||
|
// receiver="u8"
|
||||||
|
// sender="003"
|
||||||
|
// proc="add"
|
||||||
|
// codeexchanged="N"
|
||||||
|
// exportneedexch="N"
|
||||||
|
// version="2.0"
|
||||||
|
|
||||||
|
|
||||||
|
public PurchaseEnity purchaseapp { get; set; } = new PurchaseEnity();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
115
U8AppMain/U8AppMain.csproj
Normal file
115
U8AppMain/U8AppMain.csproj
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{8A6603B0-444A-49C7-80C9-195638129068}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>U8AppMain</RootNamespace>
|
||||||
|
<AssemblyName>U8AppMain</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="ComponentFactory.Krypton.Design, Version=4.5.0.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Krypton.Components.Suite.4.5.9\lib\net20\ComponentFactory.Krypton.Design.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="ComponentFactory.Krypton.Docking, Version=4.5.0.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Krypton.Components.Suite.4.5.9\lib\net20\ComponentFactory.Krypton.Docking.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="ComponentFactory.Krypton.Navigator, Version=4.5.0.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Krypton.Components.Suite.4.5.9\lib\net20\ComponentFactory.Krypton.Navigator.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="ComponentFactory.Krypton.Ribbon, Version=4.5.0.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Krypton.Components.Suite.4.5.9\lib\net20\ComponentFactory.Krypton.Ribbon.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="ComponentFactory.Krypton.Toolkit, Version=4.5.0.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Krypton.Components.Suite.4.5.9\lib\net20\ComponentFactory.Krypton.Toolkit.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="ComponentFactory.Krypton.Workspace, Version=4.5.0.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Krypton.Components.Suite.4.5.9\lib\net20\ComponentFactory.Krypton.Workspace.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Bom\Bom.cs" />
|
||||||
|
<Compile Include="Bom\ComponentBody.cs" />
|
||||||
|
<Compile Include="Bom\ComponentEnity.cs" />
|
||||||
|
<Compile Include="Bom\ComponentOptEnity.cs" />
|
||||||
|
<Compile Include="Bom\ComponentRmkEnity.cs" />
|
||||||
|
<Compile Include="Bom\ParentEnity.cs" />
|
||||||
|
<Compile Include="Bom\ufinterface.cs" />
|
||||||
|
<Compile Include="Bom\Version.cs" />
|
||||||
|
<Compile Include="FrmMain.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="FrmMain.Designer.cs">
|
||||||
|
<DependentUpon>FrmMain.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Purchase\BodyEnity.cs" />
|
||||||
|
<Compile Include="Purchase\EntryEnity.cs" />
|
||||||
|
<Compile Include="Purchase\HeaderEnity.cs" />
|
||||||
|
<Compile Include="Purchase\PurchaseEnity.cs" />
|
||||||
|
<Compile Include="Purchase\ufinterface.cs" />
|
||||||
|
<Compile Include="XmlHelper.cs" />
|
||||||
|
<EmbeddedResource Include="FrmMain.resx">
|
||||||
|
<DependentUpon>FrmMain.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
59
U8AppMain/XmlHelper.cs
Normal file
59
U8AppMain/XmlHelper.cs
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
|
namespace U8AppMain
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// XML转化对象
|
||||||
|
/// </summary>
|
||||||
|
public static class XmlHelper
|
||||||
|
{
|
||||||
|
private static void XmlSerializeInternal(Stream stream, object o, Encoding encoding)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
|
||||||
|
ns.Add("", "");
|
||||||
|
XmlSerializer serializer = new XmlSerializer(o.GetType());
|
||||||
|
XmlWriterSettings settings = new XmlWriterSettings();
|
||||||
|
settings.Indent = true;
|
||||||
|
settings.NewLineChars = "\r\n";
|
||||||
|
settings.Encoding = encoding;
|
||||||
|
settings.IndentChars = " ";
|
||||||
|
settings.NamespaceHandling = NamespaceHandling.OmitDuplicates;
|
||||||
|
using (XmlWriter writer = XmlWriter.Create(stream, settings))
|
||||||
|
{
|
||||||
|
serializer.Serialize(writer, o, ns);
|
||||||
|
writer.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将一个对象序列化为XML字符串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="o">要序列化的对象</param>
|
||||||
|
/// <param name="encoding">编码方式</param>
|
||||||
|
/// <returns>序列化产生的XML字符串</returns>
|
||||||
|
public static string XmlSerialize(object o, Encoding encoding)
|
||||||
|
{
|
||||||
|
using (MemoryStream stream = new MemoryStream())
|
||||||
|
{
|
||||||
|
XmlSerializeInternal(stream, o, encoding);
|
||||||
|
|
||||||
|
stream.Position = 0;
|
||||||
|
using (StreamReader reader = new StreamReader(stream, encoding))
|
||||||
|
{
|
||||||
|
return reader.ReadToEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
4
U8AppMain/packages.config
Normal file
4
U8AppMain/packages.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Krypton.Components.Suite" version="4.5.9" targetFramework="net45" />
|
||||||
|
</packages>
|
||||||
Reference in New Issue
Block a user