SVN r995
SVN-Revision: r995
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.35130.168
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GetApiData", "GetApiData\GetApiData.csproj", "{ACB19EF7-F810-43F0-8D4D-7EE615F12AF1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{ACB19EF7-F810-43F0-8D4D-7EE615F12AF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ACB19EF7-F810-43F0-8D4D-7EE615F12AF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ACB19EF7-F810-43F0-8D4D-7EE615F12AF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ACB19EF7-F810-43F0-8D4D-7EE615F12AF1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {27FF5848-FA21-4463-ACDC-36AC245C1EAF}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
+341
@@ -0,0 +1,341 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GetApiData
|
||||
{
|
||||
partial class FrmMain
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private IContainer components = null;
|
||||
|
||||
private TextBox textServerName;
|
||||
private TextBox textBaseName;
|
||||
private Label labelServerName;
|
||||
private Label labelBaseName;
|
||||
private Button btnCheck;
|
||||
private Button btnClose;
|
||||
private Panel panel1;
|
||||
private Panel panel2;
|
||||
private ProgressBar progressBar;
|
||||
private TextBox resultText;
|
||||
private CheckBox kingdoToRyCheck;
|
||||
private CheckBox RyToKingdoCheck;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null)) components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows 窗体设计器生成的代码
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textServerName = new System.Windows.Forms.TextBox();
|
||||
this.textBaseName = new System.Windows.Forms.TextBox();
|
||||
this.labelServerName = new System.Windows.Forms.Label();
|
||||
this.labelBaseName = new System.Windows.Forms.Label();
|
||||
this.btnCheck = new System.Windows.Forms.Button();
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.progressBar = new System.Windows.Forms.ProgressBar();
|
||||
this.resultText = new System.Windows.Forms.TextBox();
|
||||
this.kingdoToRyCheck = new System.Windows.Forms.CheckBox();
|
||||
this.RyToKingdoCheck = new System.Windows.Forms.CheckBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.k3appId = new System.Windows.Forms.TextBox();
|
||||
this.k3ServerName = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.k3appSecret = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.k3dbId = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.k3userName = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.k3number = new System.Windows.Forms.TextBox();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textServerName
|
||||
//
|
||||
this.textServerName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textServerName.Location = new System.Drawing.Point(92, 9);
|
||||
this.textServerName.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.textServerName.Name = "textServerName";
|
||||
this.textServerName.Size = new System.Drawing.Size(575, 21);
|
||||
this.textServerName.TabIndex = 0;
|
||||
this.textServerName.Text = "183.223.99.133,14331";
|
||||
//
|
||||
// textBaseName
|
||||
//
|
||||
this.textBaseName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBaseName.Location = new System.Drawing.Point(92, 34);
|
||||
this.textBaseName.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.textBaseName.Name = "textBaseName";
|
||||
this.textBaseName.Size = new System.Drawing.Size(575, 21);
|
||||
this.textBaseName.TabIndex = 1;
|
||||
this.textBaseName.Text = "lserp_cs";
|
||||
//
|
||||
// labelServerName
|
||||
//
|
||||
this.labelServerName.AutoSize = true;
|
||||
this.labelServerName.Location = new System.Drawing.Point(9, 12);
|
||||
this.labelServerName.Name = "labelServerName";
|
||||
this.labelServerName.Size = new System.Drawing.Size(77, 12);
|
||||
this.labelServerName.TabIndex = 2;
|
||||
this.labelServerName.Text = "服务器地址:";
|
||||
//
|
||||
// labelBaseName
|
||||
//
|
||||
this.labelBaseName.AutoSize = true;
|
||||
this.labelBaseName.Location = new System.Drawing.Point(9, 36);
|
||||
this.labelBaseName.Name = "labelBaseName";
|
||||
this.labelBaseName.Size = new System.Drawing.Size(77, 12);
|
||||
this.labelBaseName.TabIndex = 3;
|
||||
this.labelBaseName.Text = "数据库名称:";
|
||||
//
|
||||
// btnCheck
|
||||
//
|
||||
this.btnCheck.Location = new System.Drawing.Point(533, 212);
|
||||
this.btnCheck.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnCheck.Name = "btnCheck";
|
||||
this.btnCheck.Size = new System.Drawing.Size(64, 22);
|
||||
this.btnCheck.TabIndex = 4;
|
||||
this.btnCheck.Text = "开始同步";
|
||||
this.btnCheck.UseVisualStyleBackColor = true;
|
||||
this.btnCheck.Click += new System.EventHandler(this.OnbtnCheck_Click);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Location = new System.Drawing.Point(603, 212);
|
||||
this.btnClose.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(64, 22);
|
||||
this.btnClose.TabIndex = 5;
|
||||
this.btnClose.Text = "关闭";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.OnbtnClose_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.panel2);
|
||||
this.panel1.Controls.Add(this.resultText);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 241);
|
||||
this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(677, 287);
|
||||
this.panel1.TabIndex = 6;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.progressBar);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 267);
|
||||
this.panel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(677, 20);
|
||||
this.panel2.TabIndex = 1;
|
||||
//
|
||||
// progressBar
|
||||
//
|
||||
this.progressBar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressBar.Location = new System.Drawing.Point(0, 0);
|
||||
this.progressBar.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.progressBar.Name = "progressBar";
|
||||
this.progressBar.Size = new System.Drawing.Size(677, 20);
|
||||
this.progressBar.TabIndex = 2;
|
||||
//
|
||||
// resultText
|
||||
//
|
||||
this.resultText.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resultText.Location = new System.Drawing.Point(0, 0);
|
||||
this.resultText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.resultText.Multiline = true;
|
||||
this.resultText.Name = "resultText";
|
||||
this.resultText.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.resultText.Size = new System.Drawing.Size(677, 287);
|
||||
this.resultText.TabIndex = 0;
|
||||
//
|
||||
// kingdoToRyCheck
|
||||
//
|
||||
this.kingdoToRyCheck.AutoSize = true;
|
||||
this.kingdoToRyCheck.Location = new System.Drawing.Point(11, 218);
|
||||
this.kingdoToRyCheck.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.kingdoToRyCheck.Name = "kingdoToRyCheck";
|
||||
this.kingdoToRyCheck.Size = new System.Drawing.Size(84, 16);
|
||||
this.kingdoToRyCheck.TabIndex = 7;
|
||||
this.kingdoToRyCheck.Text = "金蝶到蕊源";
|
||||
this.kingdoToRyCheck.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// RyToKingdoCheck
|
||||
//
|
||||
this.RyToKingdoCheck.AutoSize = true;
|
||||
this.RyToKingdoCheck.Location = new System.Drawing.Point(107, 218);
|
||||
this.RyToKingdoCheck.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.RyToKingdoCheck.Name = "RyToKingdoCheck";
|
||||
this.RyToKingdoCheck.Size = new System.Drawing.Size(84, 16);
|
||||
this.RyToKingdoCheck.TabIndex = 8;
|
||||
this.RyToKingdoCheck.Text = "蕊源到金蝶";
|
||||
this.RyToKingdoCheck.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(9, 86);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(47, 12);
|
||||
this.label1.TabIndex = 12;
|
||||
this.label1.Text = "appId:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(9, 62);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(65, 12);
|
||||
this.label2.TabIndex = 11;
|
||||
this.label2.Text = "金蝶地址:";
|
||||
//
|
||||
// k3appId
|
||||
//
|
||||
this.k3appId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.k3appId.Location = new System.Drawing.Point(92, 84);
|
||||
this.k3appId.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.k3appId.Name = "k3appId";
|
||||
this.k3appId.Size = new System.Drawing.Size(575, 21);
|
||||
this.k3appId.TabIndex = 10;
|
||||
this.k3appId.Text = "214972_7c3q2cuP4npZ2a1EQ/TtSZ9G4L2W7smL";
|
||||
//
|
||||
// k3ServerName
|
||||
//
|
||||
this.k3ServerName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.k3ServerName.Location = new System.Drawing.Point(92, 59);
|
||||
this.k3ServerName.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.k3ServerName.Name = "k3ServerName";
|
||||
this.k3ServerName.Size = new System.Drawing.Size(575, 21);
|
||||
this.k3ServerName.TabIndex = 9;
|
||||
this.k3ServerName.Text = "https://rychip.ik3cloud.com/k3cloud/";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(9, 111);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(71, 12);
|
||||
this.label3.TabIndex = 14;
|
||||
this.label3.Text = "appSecret:";
|
||||
//
|
||||
// k3appSecret
|
||||
//
|
||||
this.k3appSecret.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.k3appSecret.Location = new System.Drawing.Point(92, 109);
|
||||
this.k3appSecret.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.k3appSecret.Name = "k3appSecret";
|
||||
this.k3appSecret.PasswordChar = '*';
|
||||
this.k3appSecret.Size = new System.Drawing.Size(575, 21);
|
||||
this.k3appSecret.TabIndex = 13;
|
||||
this.k3appSecret.Text = "e36cf74480c24f23b33eddb76760b434";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(9, 136);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(41, 12);
|
||||
this.label4.TabIndex = 16;
|
||||
this.label4.Text = "dbId:";
|
||||
//
|
||||
// k3dbId
|
||||
//
|
||||
this.k3dbId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.k3dbId.Location = new System.Drawing.Point(92, 134);
|
||||
this.k3dbId.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.k3dbId.Name = "k3dbId";
|
||||
this.k3dbId.Size = new System.Drawing.Size(575, 21);
|
||||
this.k3dbId.TabIndex = 15;
|
||||
this.k3dbId.Text = "20180807124126";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(9, 161);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(65, 12);
|
||||
this.label5.TabIndex = 18;
|
||||
this.label5.Text = "userName:";
|
||||
//
|
||||
// k3userName
|
||||
//
|
||||
this.k3userName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.k3userName.Location = new System.Drawing.Point(92, 159);
|
||||
this.k3userName.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.k3userName.Name = "k3userName";
|
||||
this.k3userName.Size = new System.Drawing.Size(575, 21);
|
||||
this.k3userName.TabIndex = 17;
|
||||
this.k3userName.Text = "administrator";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(9, 186);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(65, 12);
|
||||
this.label6.TabIndex = 20;
|
||||
this.label6.Text = "组织机构:";
|
||||
//
|
||||
// k3number
|
||||
//
|
||||
this.k3number.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.k3number.Location = new System.Drawing.Point(92, 184);
|
||||
this.k3number.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.k3number.Name = "k3number";
|
||||
this.k3number.Size = new System.Drawing.Size(575, 21);
|
||||
this.k3number.TabIndex = 19;
|
||||
this.k3number.Text = "101";
|
||||
//
|
||||
// FrmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(677, 528);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.k3number);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.k3userName);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.k3dbId);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.k3appSecret);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.k3appId);
|
||||
this.Controls.Add(this.k3ServerName);
|
||||
this.Controls.Add(this.RyToKingdoCheck);
|
||||
this.Controls.Add(this.kingdoToRyCheck);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.btnClose);
|
||||
this.Controls.Add(this.btnCheck);
|
||||
this.Controls.Add(this.labelBaseName);
|
||||
this.Controls.Add(this.labelServerName);
|
||||
this.Controls.Add(this.textBaseName);
|
||||
this.Controls.Add(this.textServerName);
|
||||
|
||||
@@ -0,0 +1,588 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using GetApiData.KingdeeModel; // 你项目里的模型命名空间(保持不变)
|
||||
using Kingdee.BOS.WebApi.Client; // K3 Cloud API 客户端
|
||||
using Lskj.Core; // 你项目里的 DBConfig / SqlHelper 等
|
||||
using Lskj.Util; // IniHelper 等
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace GetApiData
|
||||
{
|
||||
public partial class FrmMain : Form
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private int _stepCount = 0;
|
||||
|
||||
// 金蝶 → 本地:字段映射(K3 原字段 -> 本地列别名)
|
||||
private readonly string FieldKeys_MATERIAL = "FNumber,FName,FSpecification,F_PAEZ_Base,FBaseUnitId.FName,FModifyDate,FModifierId.FName";
|
||||
private readonly string AsFieldKeys_MATERIAL = "ProductId,appellation,spec,model,Productunitname,Operatedate,OperatorName";
|
||||
|
||||
private readonly string FieldKeys_BOM = "FMATERIALID.FNumber,FITEMNAME,FITEMMODEL,FNumber,Fid,FModifyDate";
|
||||
private readonly string AsFieldKeys_BOM = "ProductId,mappellation,mspec,TechnicsName,Billdocument_Id,Operatedate";
|
||||
|
||||
private readonly string FieldKeys_BOMList = "FMATERIALIDCHILD.FNumber,FNUMERATOR,FDENOMINATOR,Fid";
|
||||
private readonly string AsFieldKeys_BOMList = "ProductId,Famount,Amount,Billdocument_Id";
|
||||
|
||||
private readonly string FieldKeys_PRD_MO_Main = "Fid,FBILLNO,FBillType.FNAME,FDate";
|
||||
private readonly string AsFieldKeys_PRD_MO_Main = "mps_mpt_jdid,mps_mpt_billdocument_id,mps_mpt_inoutspecies,mps_mpt_operatedate";
|
||||
|
||||
private readonly string FieldKeys_PRD_MO_List = "FTreeEntity_FEntryId,FBILLNO,FMaterialId.FNumber,FQty,FLot.FNumber";
|
||||
private readonly string AsFieldKeys_PRD_MO_List = "mps_lpt_jdid,mps_lpt_billdocument_id,mps_lpt_productid,mps_lpt_amount,mps_lpt_waferbatch_id";
|
||||
|
||||
private K3CloudApiClient apiClient = new K3CloudApiClient("https://rychip.ik3cloud.com/k3cloud/");
|
||||
private string zzjgNumber = "";
|
||||
|
||||
#endregion
|
||||
|
||||
public FrmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Load += OnFrmMain_Load;
|
||||
}
|
||||
|
||||
#region Form events
|
||||
|
||||
private void OnFrmMain_Load(object sender, EventArgs e)
|
||||
{
|
||||
// 从 ini 读默认连接参数
|
||||
textServerName.Text = IniHelper.Read("startColund.ini", "ServiceKey");
|
||||
textBaseName.Text = IniHelper.Read("startColund.ini", "ServiceData");
|
||||
k3ServerName.Text = IniHelper.Read("startColund.ini", "K3Service");
|
||||
k3appId.Text = IniHelper.Read("startColund.ini", "K3AppId");
|
||||
k3appSecret.Text = IniHelper.Read("startColund.ini", "K3AppSecret");
|
||||
k3dbId.Text = IniHelper.Read("startColund.ini", "K3DbId");
|
||||
k3userName.Text = IniHelper.Read("startColund.ini", "K3UserName");
|
||||
k3number.Text = IniHelper.Read("startColund.ini", "K3Number");
|
||||
}
|
||||
|
||||
private void OnbtnCheck_Click(object sender, EventArgs e)
|
||||
{
|
||||
zzjgNumber = "";
|
||||
resultText.Clear();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(textServerName.Text) || string.IsNullOrWhiteSpace(textBaseName.Text))
|
||||
{
|
||||
resultText.AppendText("数据库地址或数据库名不能为空!\r\n");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(k3ServerName.Text))
|
||||
{
|
||||
resultText.AppendText("金蝶地址不能为空!\r\n");
|
||||
return;
|
||||
}
|
||||
apiClient = new K3CloudApiClient(k3ServerName.Text);
|
||||
if (string.IsNullOrWhiteSpace(k3appId.Text))
|
||||
{
|
||||
resultText.AppendText("金蝶appId不能为空!\r\n");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(k3appSecret.Text))
|
||||
{
|
||||
resultText.AppendText("金蝶appSecret不能为空!\r\n");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(k3dbId.Text))
|
||||
{
|
||||
resultText.AppendText("金蝶dbId不能为空!\r\n");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(k3userName.Text))
|
||||
{
|
||||
resultText.AppendText("金蝶userName不能为空!\r\n");
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(k3number.Text))
|
||||
{
|
||||
resultText.AppendText("金蝶组织机构编码不能为空!\r\n");
|
||||
return;
|
||||
}
|
||||
DBConfig.Instance.ServerName = textServerName.Text.Trim();
|
||||
DBConfig.Instance.DataBase = textBaseName.Text.Trim();
|
||||
|
||||
if (!(LoginByAppSecret() && DBConfig.Instance.CreateConnection()))
|
||||
{
|
||||
resultText.AppendText("数据库连接失败!请检查数据库设置\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
IniHelper.Write("startColund.ini", "ServiceKey", textServerName.Text);
|
||||
IniHelper.Write("startColund.ini", "ServiceData", textBaseName.Text);
|
||||
IniHelper.Write("startColund.ini", "K3Service", k3ServerName.Text);
|
||||
IniHelper.Write("startColund.ini", "K3AppId", k3appId.Text);
|
||||
IniHelper.Write("startColund.ini", "K3AppSecret", k3appSecret.Text);
|
||||
IniHelper.Write("startColund.ini", "K3DbId", k3dbId.Text);
|
||||
IniHelper.Write("startColund.ini", "K3UserName", k3userName.Text);
|
||||
IniHelper.Write("startColund.ini", "K3Number", k3number.Text);
|
||||
|
||||
resultText.AppendText("数据库连接成功,开始同步...\r\n");
|
||||
|
||||
#region 获取组织机构内码
|
||||
var payload = new
|
||||
{
|
||||
Number = k3number.Text,
|
||||
};
|
||||
string data = JsonConvert.SerializeObject(payload);
|
||||
var jsonList = apiClient.View("ORG_Organizations", data);
|
||||
JObject zzjgJObject = (JObject)JsonConvert.DeserializeObject(jsonList);
|
||||
if ((zzjgJObject["Result"]["ResponseStatus"]["IsSuccess"] + "").Equals("True"))
|
||||
{
|
||||
string name = zzjgJObject["Result"]["Result"]["Name"][0]["Value"] + "";
|
||||
zzjgNumber = zzjgJObject["Result"]["Result"]["Id"] + "";
|
||||
resultText.AppendText($"正在同步组织机构名称:{ name},内码:{zzjgNumber}\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
resultText.AppendText($"不存在编码为{ k3number.Text}的组织机构\r\n");
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
bool kd2ry = kingdoToRyCheck.Checked;
|
||||
bool ry2kd = RyToKingdoCheck.Checked;
|
||||
|
||||
if (kd2ry && !ry2kd)
|
||||
{
|
||||
ResetProgress(10);
|
||||
Sync_Kingdee_To_Local();
|
||||
}
|
||||
else if (!kd2ry && ry2kd)
|
||||
{
|
||||
string mainCols = "wms_mjoins_billdocument_id,wms_mjoins_operatedate,wms_mjoins_mstr1,wms_mjoins_bak,wms_mjoins_jdid";
|
||||
DataTable mainDb = SqlHelper.ExecuteDataTable($"SELECT {mainCols} FROM Wms_BillJoinSMainTab");
|
||||
ResetProgress(Math.Max(1, mainDb.Rows.Count));
|
||||
Sync_Ry_To_Kingdee();
|
||||
}
|
||||
else if (!kd2ry && !ry2kd)
|
||||
{
|
||||
resultText.AppendText("请勾选操作类型\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
string mainCols = "wms_mjoins_billdocument_id,wms_mjoins_operatedate,wms_mjoins_mstr1,wms_mjoins_bak,wms_mjoins_jdid";
|
||||
DataTable mainDb = SqlHelper.ExecuteDataTable($"SELECT {mainCols} FROM Wms_BillJoinSMainTab");
|
||||
ResetProgress(10 + Math.Max(1, mainDb.Rows.Count));
|
||||
Sync_Kingdee_To_Local();
|
||||
Sync_Ry_To_Kingdee();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnbtnClose_Click(object sender, EventArgs e) => this.Close();
|
||||
|
||||
#endregion
|
||||
|
||||
#region K3 Login
|
||||
|
||||
private bool LoginByAppSecret()
|
||||
{
|
||||
// 注意:以下 appId/appSecret 是硬编码在客户端
|
||||
string json = apiClient.LoginByAppSecret(k3dbId.Text, k3userName.Text, k3appId.Text, k3appSecret.Text, 2052);
|
||||
JObject jo = JObject.Parse(json);
|
||||
return jo.TryGetValue("LoginResultType", out var v) && v?.Value<int>() == 1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Progress helpers
|
||||
|
||||
private void ResetProgress(int maximum)
|
||||
{
|
||||
_stepCount = 0;
|
||||
progressBar.Value = 0;
|
||||
progressBar.Style = ProgressBarStyle.Blocks;
|
||||
progressBar.Minimum = 0;
|
||||
progressBar.Step = 1;
|
||||
progressBar.MarqueeAnimationSpeed = 100;
|
||||
progressBar.Maximum = Math.Max(1, maximum);
|
||||
SetProgressText(0);
|
||||
}
|
||||
|
||||
private void StepProgress()
|
||||
{
|
||||
_stepCount++;
|
||||
if (progressBar.Value < progressBar.Maximum)
|
||||
progressBar.PerformStep();
|
||||
|
||||
double percent = progressBar.Maximum > 0 ? (progressBar.Value * 100.0 / progressBar.Maximum) : 0.0;
|
||||
SetProgressText(percent);
|
||||
progressBar.Refresh();
|
||||
}
|
||||
|
||||
private void SetProgressText(double percent)
|
||||
{
|
||||
progressBar.Text = $"{percent:0.##}%"; // ProgressBar 本身不显示文本,仅保留
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Kingdee API helpers
|
||||
|
||||
private static DataTable ToDataTable(List<List<object>> jsonList, DataTable dataBaseShape, string asFieldKeys)
|
||||
{
|
||||
var dt = new DataTable();
|
||||
var cols = asFieldKeys.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
for (int i = 0; i < cols.Length; i++)
|
||||
{
|
||||
var colName = cols[i];
|
||||
var type = (dataBaseShape != null && i < dataBaseShape.Columns.Count) ? dataBaseShape.Columns[i].DataType : typeof(string);
|
||||
dt.Columns.Add(colName, type);
|
||||
}
|
||||
|
||||
if (jsonList != null && jsonList.Count > 0)
|
||||
{
|
||||
foreach (var row in jsonList)
|
||||
{
|
||||
var dr = dt.NewRow();
|
||||
for (int j = 0; j < Math.Min(row.Count, dt.Columns.Count); j++)
|
||||
dr[j] = row[j] ?? "";
|
||||
dt.Rows.Add(dr);
|
||||
}
|
||||
}
|
||||
|
||||
return dt;
|
||||
}
|
||||
|
||||
private DataTable GetApiSource(string formId, DataTable localShape, string fieldKeys, string asFieldKeys, string filterStr = "")
|
||||
{
|
||||
string filter = BuildOrgFilter(formId, filterStr, zzjgNumber);
|
||||
var payload = new
|
||||
{
|
||||
FormId = formId,
|
||||
FieldKeys = fieldKeys,
|
||||
FilterString = filter,
|
||||
OrderString = "",
|
||||
TopRowCount = 0,
|
||||
StartRow = 0,
|
||||
Limit = 0
|
||||
};
|
||||
|
||||
string data = JsonConvert.SerializeObject(payload);
|
||||
var jsonList = apiClient.ExecuteBillQuery(data);
|
||||
var result = ToDataTable(jsonList, localShape, asFieldKeys);
|
||||
StepProgress();
|
||||
return result;
|
||||
}
|
||||
|
||||
private DataTable GetApiSource(string formId, string fieldKeys, string filterStr = "")
|
||||
{
|
||||
string filter = BuildOrgFilter(formId, filterStr, zzjgNumber);
|
||||
var payload = new
|
||||
{
|
||||
FormId = formId,
|
||||
FieldKeys = fieldKeys,
|
||||
FilterString = filter,
|
||||
OrderString = "",
|
||||
TopRowCount = 0,
|
||||
StartRow = 0,
|
||||
Limit = 0
|
||||
};
|
||||
|
||||
string data = JsonConvert.SerializeObject(payload);
|
||||
var list = apiClient.ExecuteBillQuery(data)?.ToList() ?? new List<List<object>>();
|
||||
var cols = fieldKeys.Split(',').ToList();
|
||||
|
||||
var dt = new DataTable();
|
||||
foreach (var c in cols) dt.Columns.Add(c);
|
||||
|
||||
foreach (var row in list)
|
||||
{
|
||||
var dr = dt.NewRow();
|
||||
for (int i = 0; i < cols.Count && i < row.Count; i++)
|
||||
dr[cols[i]] = row[i];
|
||||
dt.Rows.Add(dr);
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
|
||||
private static string BuildOrgFilter(string formId, string filterStr, string zzjgNumber)
|
||||
{
|
||||
bool isPrd = (formId == "PRD_MO" || formId == "PRD_MORPT");
|
||||
string orgField = isPrd ? "FPrdOrgId" : "FUseOrgId";
|
||||
string baseFilter = $"{orgField}='{zzjgNumber}'";
|
||||
if (string.IsNullOrWhiteSpace(filterStr)) return baseFilter;
|
||||
return $"{baseFilter} and {filterStr}";
|
||||
}
|
||||
|
||||
private static DataTable GetDataBase(string tableName)
|
||||
{
|
||||
string sql = $"SELECT top 1 * FROM {tableName}";
|
||||
return SqlHelper.ExecuteDataTable(sql);
|
||||
}
|
||||
|
||||
private static DataTable GetDataBase(string tableName, string asFieldKeys)
|
||||
{
|
||||
string sql = $"SELECT {asFieldKeys} FROM {tableName}";
|
||||
return SqlHelper.ExecuteDataTable(sql);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Diff & Upsert
|
||||
|
||||
private static string BuildWhere(string primaryKey, DataRow row)
|
||||
{
|
||||
var keys = primaryKey.Split(',').Select(k => k.Trim());
|
||||
return string.Join(" AND ", keys.Select(k =>
|
||||
{
|
||||
string v = row[k] == null ? "" : $"{row[k]}".Replace("'", "''");
|
||||
return $"{k}='{v}'";
|
||||
}));
|
||||
}
|
||||
|
||||
private DataTable GetExcept(DataTable firstTable, DataTable secondTable, string primaryKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataTable dataTable = firstTable.Clone();
|
||||
foreach (DataRow row in firstTable.Rows)
|
||||
{
|
||||
DataRow dataRow2 = dataTable.NewRow();
|
||||
foreach (DataColumn column in firstTable.Columns)
|
||||
{
|
||||
dataRow2[column.ColumnName] = row[column.ColumnName];
|
||||
}
|
||||
DataRow[] array;
|
||||
if (primaryKey.Split(',').Length > 1)
|
||||
{
|
||||
string text = string.Empty;
|
||||
for (int num = 0; num < primaryKey.Split(',').Length; num++)
|
||||
{
|
||||
text = text + string.Format("{0}='{1}'", primaryKey.Split(',')[num] ?? "", string.Concat(row[primaryKey.Split(',')[num]])) + " And ";
|
||||
}
|
||||
array = secondTable.Select(text.TrimEnd(' ', 'd', 'n', 'A'));
|
||||
}
|
||||
else
|
||||
{
|
||||
array = secondTable.Select(string.Format("{0}='{1}'", primaryKey ?? "", string.Concat(row[primaryKey])));
|
||||
}
|
||||
if (array.Length > 0)
|
||||
{
|
||||
for (int num = 0; num < array[0].ItemArray.Length; num++)
|
||||
{
|
||||
if (array[0][num].GetType() == typeof(DateTime))
|
||||
{
|
||||
if (string.IsNullOrEmpty(string.Concat(array[0][num])))
|
||||
{
|
||||
array[0][num] = DateTime.Now;
|
||||
}
|
||||
if (string.IsNullOrEmpty(string.Concat(row[num])))
|
||||
{
|
||||
row[num] = DateTime.Now;
|
||||
}
|
||||
if (Convert.ToDateTime(string.Concat(array[0][num])).ToString("yyyy-MM-dd HH:mm:ss") != Convert.ToDateTime(string.Concat(row[num])).ToString("yyyy-MM-dd HH:mm:ss"))
|
||||
{
|
||||
dataTable.Rows.Add(dataRow2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (array[0][num].GetType() == typeof(decimal))
|
||||
{
|
||||
if (!Convert.ToDecimal(string.Concat(array[0][num])).Equals(Convert.ToDecimal(string.Concat(row[num]))))
|
||||
{
|
||||
dataTable.Rows.Add(dataRow2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (string.Concat(array[0][num]) != string.Concat(row[num]))
|
||||
{
|
||||
dataTable.Rows.Add(dataRow2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dataTable.Rows.Add(dataRow2);
|
||||
}
|
||||
}
|
||||
return dataTable;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private bool GetExceptAndUpdate(DataTable apiSource, DataTable dataBase, string tableName, string primaryKey, string identityKeys, string asfieldKeys)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataTable dataBase2 = GetDataBase(tableName);
|
||||
DataTable dataTable = SqlHelper.ExecuteDataTable($"select COLUMN_NAME,IS_NULLABLE from information_schema.columns where table_name = '{tableName}'");
|
||||
DataTable dataTable2 = new DataTable();
|
||||
dataTable2 = GetExcept(dataBase, apiSource, primaryKey);
|
||||
DataTable dataTable3 = new DataTable();
|
||||
dataTable3 = GetExcept(apiSource, dataBase, primaryKey);
|
||||
string text = string.Empty;
|
||||
foreach (DataRow row in dataTable3.Rows)
|
||||
{
|
||||
string text2 = string.Empty;
|
||||
DataRow[] array;
|
||||
if (primaryKey.Split(',').Length > 1)
|
||||
{
|
||||
for (int num = 0; num < primaryKey.Split(',').Length; num++)
|
||||
{
|
||||
text2 = text2 + string.Format("{0}='{1}'", primaryKey.Split(',')[num] ?? "", string.Concat(row[primaryKey.Split(',')[num]])) + " And ";
|
||||
}
|
||||
text2 = text2.TrimEnd(' ', 'd', 'n', 'A');
|
||||
array = dataBase.Select(text2);
|
||||
}
|
||||
else
|
||||
{
|
||||
text2 = string.Format("{0}='{1}'", primaryKey ?? "", string.Concat(row[primaryKey]));
|
||||
array = dataBase.Select(text2);
|
||||
}
|
||||
if (array.Length != 0)
|
||||
{
|
||||
foreach (DataColumn column in row.Table.Columns)
|
||||
{
|
||||
if (!string.Concat(row[column.ColumnName]).Equals(string.Concat(array[0][column.ColumnName])))
|
||||
{
|
||||
string format = "update {0} set {1} = N'{2}' where {3};\r\n";
|
||||
text += string.Format(format, tableName, column.ColumnName, string.Concat(row[column.ColumnName]).Replace("'", "''"), text2);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
string format2 = "insert into {0} ({1}) values ({2});\r\n";
|
||||
string text3 = string.Empty;
|
||||
string text4 = string.Empty;
|
||||
foreach (DataColumn column2 in dataBase2.Columns)
|
||||
{
|
||||
if (asfieldKeys.Split(',').Contains(column2.ColumnName))
|
||||
{
|
||||
text4 += string.Format("'{0}',", string.Concat(row[column2.ColumnName]).Replace("'", "''"));
|
||||
text3 += string.Format(column2.ColumnName + ",");
|
||||
}
|
||||
else if (string.Concat(dataTable.Select(string.Format("COLUMN_NAME='{0}'", column2.ColumnName ?? "")).First()["IS_NULLABLE"]) == "NO" && !(column2.ColumnName == identityKeys))
|
||||
{
|
||||
if (column2.DataType == typeof(decimal) || column2.DataType == typeof(double) || column2.DataType == typeof(short) || column2.DataType == typeof(int) || column2.DataType == typeof(long))
|
||||
{
|
||||
text4 += "0,";
|
||||
text3 += string.Format(column2.ColumnName + ",");
|
||||
}
|
||||
else if (column2.DataType == typeof(DateTime))
|
||||
{
|
||||
text4 += $"'{DateTime.Now}',";
|
||||
text3 += string.Format(column2.ColumnName + ",");
|
||||
}
|
||||
else
|
||||
{
|
||||
text4 += $"'',";
|
||||
text3 += string.Format(column2.ColumnName + ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
text += string.Format(format2, tableName, text3.TrimEnd(','), text4.TrimEnd(','));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(text);
|
||||
}
|
||||
StepProgress();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
resultText.AppendText(ex.Message + "\r\n");
|
||||
StepProgress();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Sync flows
|
||||
|
||||
private void Sync_Kingdee_To_Local()
|
||||
{
|
||||
try
|
||||
{
|
||||
DataTable dbProduct = GetDataBase("p_producttab", AsFieldKeys_MATERIAL);
|
||||
DataTable apiMaterial = GetApiSource("BD_MATERIAL", dbProduct, FieldKeys_MATERIAL, AsFieldKeys_MATERIAL);
|
||||
|
||||
DataTable dbBom = GetDataBase("bom_billtab", AsFieldKeys_BOM);
|
||||
DataTable apiBom = GetApiSource("ENG_BOM", dbBom, FieldKeys_BOM, AsFieldKeys_BOM);
|
||||
|
||||
DataTable dbBomList = GetDataBase("bom_billlisttab", AsFieldKeys_BOMList);
|
||||
DataTable apiBomList = GetApiSource("ENG_BOM", dbBomList, FieldKeys_BOMList, AsFieldKeys_BOMList);
|
||||
|
||||
DataTable dbMoMain = GetDataBase("mps_planTaskMainTab", AsFieldKeys_PRD_MO_Main);
|
||||
DataTable apiMoMain = GetApiSource("PRD_MO", dbMoMain, FieldKeys_PRD_MO_Main, AsFieldKeys_PRD_MO_Main, "FDate>'2021-10-26'");
|
||||
|
||||
DataTable dbMoList = GetDataBase("mps_planTaskListTab", AsFieldKeys_PRD_MO_List);
|
||||
DataTable apiMoList = GetApiSource("PRD_MO", dbMoList, FieldKeys_PRD_MO_List, AsFieldKeys_PRD_MO_List, "FDate>'2021-10-26'");
|
||||
|
||||
if (GetExceptAndUpdate(apiMaterial, dbProduct, "p_producttab", "ProductId", "id", AsFieldKeys_MATERIAL))
|
||||
resultText.AppendText("金蝶 Material 物料清单 => p_producttab 同步完成\r\n");
|
||||
else
|
||||
resultText.AppendText("金蝶 Material 物料清单 => p_producttab 同步失败\r\n");
|
||||
|
||||
if (GetExceptAndUpdate(apiBom, dbBom, "bom_billtab", "Billdocument_Id", "id", AsFieldKeys_BOM))
|
||||
resultText.AppendText("金蝶 BOM 主表 => bom_billtab 同步完成\r\n");
|
||||
else
|
||||
resultText.AppendText("金蝶 BOM 主表 => bom_billtab 同步失败\r\n");
|
||||
|
||||
if (GetExceptAndUpdate(apiBomList, dbBomList, "bom_billlisttab", "ProductId,Billdocument_Id", "id", AsFieldKeys_BOMList))
|
||||
resultText.AppendText("金蝶 BOM 明细表 => bom_billlisttab 同步完成\r\n");
|
||||
else
|
||||
resultText.AppendText("金蝶 BOM 明细表 => bom_billlisttab 同步失败\r\n");
|
||||
|
||||
if (GetExceptAndUpdate(apiMoMain, dbMoMain, "mps_planTaskMainTab", "mps_mpt_billdocument_id", "mps_mpt_id", AsFieldKeys_PRD_MO_Main))
|
||||
resultText.AppendText("金蝶 PRD_MO 生产订单主表 => mps_planTaskMainTab 同步完成\r\n");
|
||||
else
|
||||
resultText.AppendText("金蝶 PRD_MO 生产订单主表 => mps_planTaskMainTab 同步失败\r\n");
|
||||
|
||||
if (GetExceptAndUpdate(apiMoList, dbMoList, "mps_planTaskListTab", "mps_lpt_billdocument_id", "mps_lpt_id", AsFieldKeys_PRD_MO_List))
|
||||
resultText.AppendText("金蝶 PRD_MO 生产订单明细表 => mps_planTaskListTab 同步完成\r\n");
|
||||
else
|
||||
resultText.AppendText("金蝶 PRD_MO 生产订单明细表 => mps_planTaskListTab 同步失败\r\n");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
resultText.AppendText(ex.Message + "\r\n");
|
||||
}
|
||||
finally
|
||||
{
|
||||
resultText.AppendText("同步结束!\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
private void Sync_Ry_To_Kingdee()
|
||||
{
|
||||
try
|
||||
{
|
||||
string mainCols = "wms_mjoins_billdocument_id,wms_mjoins_operatedate,wms_mjoins_mstr1,wms_mjoins_bak,wms_mjoins_jdid";
|
||||
string listCols = "wms_ljoins_productid,wms_ljoins_rwlno,wms_ljoins_id,wms_ljoins_lstr2,wms_ljoins_lstr1,wms_ljoins_amount,wms_ljoins_famount,wms_ljoins_lstr3,wms_ljoins_batch_id,wms_ljoins_lstr4,wms_ljoins_billdocument_id,wms_ljoins_jdid";
|
||||
|
||||
DataTable mainDb = SqlHelper.ExecuteDataTable($"SELECT {mainCols} FROM Wms_BillJoinSMainTab");
|
||||
DataTable listDb = SqlHelper.ExecuteDataTable($"SELECT {listCols} FROM wms_billjoinslistTab");
|
||||
|
||||
DataTable morptApi = GetApiSource("PRD_MORPT", mainDb, "FBillNo,FDate,FWorkshipId.FNumber,FDescription", mainCols);
|
||||
DataTable moIdNo = GetApiSource("PRD_MO", "Fid,FBillNo");
|
||||
|
||||
foreach (DataRow mainRow in mainDb.Rows)
|
||||
{
|
||||
try
|
||||
{
|
||||
string billNo = $"{mainRow["wms_mjoins_billdocument_id"]}";
|
||||
string jdid = $"{mainRow["wms_mjoins_jdid"]}".Trim();
|
||||
|
||||
bool exists = morptApi.Select($"wms_mjoins_billdocument_id='{billNo.Replace("'", "''")}'").Any();
|
||||
if (exists || string.IsNullOrEmpty(jdid) || jdid == "0") continue;
|
||||
|
||||
var details = listDb.Select($"wms_ljoins_billdocument_id='{billNo.Replace("'", "''")}'").ToList();
|
||||
if (details.Count == 0) continue;
|
||||
|
||||
decimal amount = details.Sum(d => SafeToDecimal(d, "wms_ljoins_amount"));
|
||||
decimal famount = details.Sum(d => SafeToDecimal(d, "wms_ljoins_famount"));
|
||||
|
||||
string jsonDraft = apiClient.Draft("PRD_MORPT",
|
||||
|
||||
@@ -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>
|
||||
@@ -0,0 +1,283 @@
|
||||
<?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>{ACB19EF7-F810-43F0-8D4D-7EE615F12AF1}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>GetApiData</RootNamespace>
|
||||
<AssemblyName>GetApiData</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</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="DevExpress.BonusSkins.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.BonusSkins.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Charts.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Charts.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.CodeParser.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.CodeParser.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Data.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.DataAccess.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.DataAccess.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.DataAccess.v15.2.UI, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.DataAccess.v15.2.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Office.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Office.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Pdf.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Pdf.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Pdf.v15.2.Drawing, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Pdf.v15.2.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.PivotGrid.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.PivotGrid.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Printing.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.RichEdit.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.RichEdit.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Sparkline.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Sparkline.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Spreadsheet.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Spreadsheet.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Utils.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v15.2.UI, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Utils.v15.2.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Xpo.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.Xpo.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraBars.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraBars.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraCharts.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraCharts.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraCharts.v15.2.Extensions, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraCharts.v15.2.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraCharts.v15.2.UI, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraCharts.v15.2.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraCharts.v15.2.Wizard, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraCharts.v15.2.Wizard.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraEditors.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraGauges.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraGauges.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraGrid.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraLayout.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraLayout.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraNavBar.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraNavBar.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraPivotGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraPivotGrid.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraPrinting.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraPrinting.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraReports.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraReports.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraReports.v15.2.Extensions, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraReports.v15.2.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraRichEdit.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraRichEdit.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraScheduler.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraScheduler.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraScheduler.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraScheduler.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraSpreadsheet.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraSpreadsheet.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraTreeList.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraTreeList.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraVerticalGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\DevExpress.XtraVerticalGrid.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="itextsharp">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\itextsharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.WebApi.Client">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Kingdee.BOS.WebApi.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.WebApi.DataEntities">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Kingdee.BOS.WebApi.DataEntities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lskj.AutoUpdate">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Lskj.AutoUpdate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lskj.Business">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Lskj.Business.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lskj.Control">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Lskj.Control.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lskj.Core">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Lskj.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lskj.Data">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Lskj.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lskj.Model">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Lskj.Model.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lskj.Push">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Lskj.Push.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lskj.Util">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Lskj.Util.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\NPOI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="O2S.Components.PDFView4NET">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\O2S.Components.PDFView4NET.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.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Xilium.CefGlue">
|
||||
<HintPath>D:\下载\xwechat_files\wxid_9htys9sllfcy22_4c66\msg\file\2025-09\蕊源同步工具(1)\Xilium.CefGlue.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FrmMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmMain.Designer.cs">
|
||||
<DependentUpon>FrmMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="KingdeeModel\FBomId.cs" />
|
||||
<Compile Include="KingdeeModel\FEntityItem.cs" />
|
||||
<Compile Include="KingdeeModel\FLot.cs" />
|
||||
<Compile Include="KingdeeModel\FMaterialId.cs" />
|
||||
<Compile Include="KingdeeModel\FReportType.cs" />
|
||||
<Compile Include="KingdeeModel\FWorkshipId.cs" />
|
||||
<Compile Include="KingdeeModel\PRD_MORPTFEntity_LinkItem.cs" />
|
||||
<Compile Include="KingdeeModel\PRD_MORPTModel.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.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="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>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace GetApiData.KingdeeModel
|
||||
{
|
||||
|
||||
public class FEntityItem
|
||||
{
|
||||
public string FEntryID { get; set; }
|
||||
|
||||
public string FSrcEntryId { get; set; }
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,53 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace GetApiData.KingdeeModel
|
||||
{
|
||||
|
||||
internal class PRD_MORPTModel
|
||||
{
|
||||
public static string CreateData(DataRow billMainRow, DataRow billDetailRow, string quaQty, string finishQty, DataTable MoTable)
|
||||
{
|
||||
string fBillNo = ((billMainRow.Table.Columns.Contains("wms_mjoins_billdocument_id") && !string.IsNullOrEmpty(string.Concat(billMainRow["wms_mjoins_billdocument_id"]))) ? string.Concat(billMainRow["wms_mjoins_billdocument_id"]) : "");
|
||||
string text = ((billMainRow.Table.Columns.Contains("wms_mjoins_inoutspecies") && !string.IsNullOrEmpty(string.Concat(billMainRow["wms_mjoins_inoutspecies"]))) ? string.Concat(billMainRow["wms_mjoins_inoutspecies"]) : "");
|
||||
string fDate = ((billMainRow.Table.Columns.Contains("wms_mjoins_operatedate") && !string.IsNullOrEmpty(string.Concat(billMainRow["wms_mjoins_operatedate"]))) ? string.Concat(billMainRow["wms_mjoins_operatedate"]) : "");
|
||||
string fNumber = ((billMainRow.Table.Columns.Contains("wms_mjoins_mstr1") && !string.IsNullOrEmpty(string.Concat(billMainRow["wms_mjoins_mstr1"]))) ? string.Concat(billMainRow["wms_mjoins_mstr1"]) : "");
|
||||
string fDescription = ((billMainRow.Table.Columns.Contains("wms_mjoins_bak") && !string.IsNullOrEmpty(string.Concat(billMainRow["wms_mjoins_bak"]))) ? string.Concat(billMainRow["wms_mjoins_bak"]) : "");
|
||||
List<FEntityItem> list = new List<FEntityItem>();
|
||||
FEntityItem fEntityItem = new FEntityItem();
|
||||
string text2 = ((MoTable.Select(string.Format("{0}='{1}'", "Fid", string.Concat(billMainRow["wms_mjoins_jdid"]))).Count() > 0) ? string.Concat(MoTable.Select(string.Format("{0}='{1}'", "Fid", string.Concat(billMainRow["wms_mjoins_jdid"]))).First()["FBillNo"]) : "");
|
||||
string text3 = ((billMainRow.Table.Columns.Contains("wms_mjoins_jdid") && !string.IsNullOrEmpty(string.Concat(billMainRow["wms_mjoins_jdid"]))) ? string.Concat(billMainRow["wms_mjoins_jdid"]) : "");
|
||||
string text4 = ((billDetailRow.Table.Columns.Contains("wms_ljoins_jdid") && !string.IsNullOrEmpty(string.Concat(billDetailRow["wms_ljoins_jdid"]))) ? string.Concat(billDetailRow["wms_ljoins_jdid"]) : "");
|
||||
string fNumber2 = ((billDetailRow.Table.Columns.Contains("wms_ljoins_productid") && !string.IsNullOrEmpty(string.Concat(billDetailRow["wms_ljoins_productid"]))) ? string.Concat(billDetailRow["wms_ljoins_productid"]) : "");
|
||||
string fNumber3 = ((billDetailRow.Table.Columns.Contains("wms_ljoins_lstr3") && !string.IsNullOrEmpty(string.Concat(billDetailRow["wms_ljoins_lstr3"]))) ? string.Concat(billDetailRow["wms_ljoins_lstr3"]) : "");
|
||||
string fNumber4 = ((billDetailRow.Table.Columns.Contains("wms_ljoins_batch_id") && !string.IsNullOrEmpty(string.Concat(billDetailRow["wms_ljoins_batch_id"]))) ? string.Concat(billDetailRow["wms_ljoins_batch_id"]) : "");
|
||||
string fNumber5 = ((billDetailRow.Table.Columns.Contains("wms_ljoins_lstr4") && !string.IsNullOrEmpty(string.Concat(billDetailRow["wms_ljoins_lstr4"]))) ? string.Concat(billDetailRow["wms_ljoins_lstr4"]) : "");
|
||||
string text5 = ((billDetailRow.Table.Columns.Contains("wms_ljoins_billdocument_id") && !string.IsNullOrEmpty(string.Concat(billDetailRow["wms_ljoins_billdocument_id"]))) ? string.Concat(billDetailRow["wms_ljoins_billdocument_id"]) : "");
|
||||
fEntityItem.FIsNew = "false";
|
||||
fEntityItem.FWorkshipId.FNumber = fNumber3;
|
||||
fEntityItem.FMoBillNo = text2;
|
||||
fEntityItem.FSrcInterId = text3;
|
||||
fEntityItem.FMoId = text3;
|
||||
fEntityItem.FMoEntryId = text4;
|
||||
fEntityItem.FSrcEntryId = text4;
|
||||
fEntityItem.FMaterialId.FNumber = fNumber2;
|
||||
fEntityItem.FProductType = "1";
|
||||
fEntityItem.FReportType.FNumber = "CTG001";
|
||||
fEntityItem.FSrcBillNo = text2;
|
||||
fEntityItem.FSrcBillType = "PRD_MO";
|
||||
fEntityItem.FLot.FNumber = fNumber4;
|
||||
fEntityItem.FWorkshipId.FNumber = fNumber3;
|
||||
fEntityItem.FQuaQty = quaQty;
|
||||
fEntityItem.FFinishQty = finishQty;
|
||||
fEntityItem.FBomId.FNumber = fNumber5;
|
||||
fEntityItem.FMOMAINENTRYID = text4;
|
||||
List<PRD_MORPTFEntity_LinkItem> list2 = new List<PRD_MORPTFEntity_LinkItem>();
|
||||
PRD_MORPTFEntity_LinkItem pRD_MORPTFEntity_LinkItem = new PRD_MORPTFEntity_LinkItem();
|
||||
string fEntity_Link_FRuleId = "PRD_MO2MORPT";
|
||||
string fEntity_Link_FSTableName = "T_PRD_MOENTRY";
|
||||
string fEntity_Link_FSBillId = ((billMainRow.Table.Columns.Contains("wms_mjoins_jdid") && !string.IsNullOrEmpty(string.Concat(billMainRow["wms_mjoins_jdid"]))) ? string.Concat(billMainRow["wms_mjoins_jdid"]) : "");
|
||||
string fEntity_Link_FSId = ((billDetailRow.Table.Columns.C
|
||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("GetApiData")]
|
||||
[assembly: Ass
|
||||
@@ -0,0 +1,40 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace GetApiData.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 Resou
|
||||
@@ -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>
|
||||
@@ -0,0 +1 @@
|
||||
//------------------------------------------------------------------
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user