基线 SVN r240

SVN-Revision: r240
This commit is contained in:
cyf
2025-02-06 06:46:06 +00:00
commit ab56a9bcf7
5317 changed files with 902274 additions and 0 deletions
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{092F2331-347F-45BC-9FD6-79026A924853}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DXApplication3</RootNamespace>
<AssemblyName>DXApplication3</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</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>
<Prefer32Bit>false</Prefer32Bit>
</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>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Data_Prd_PPBom">
<HintPath>..\Data_Prd_PPBom\bin\Debug\Data_Prd_PPBom.dll</HintPath>
</Reference>
<Reference Include="DevExpress.BonusSkins.v15.2" />
<Reference Include="DevExpress.Data.v15.2" />
<Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Utils.v15.2" />
<Reference Include="DevExpress.Sparkline.v15.2.Core" />
<Reference Include="DevExpress.XtraEditors.v15.2" />
<Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraLayout.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraPrinting.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="Kingdee.BOS.WebApi.Client, Version=7.5.1450.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\asus\Desktop\金蝶云星空_新版WebAPI资料包\金蝶云星空_新版WebAPI资料包_java_net_python_20201203\新手入门指南:Net_快速搭建开发_测试环境(测试工程_SDK)\SDK20201203\Kingdee.BOS.WebApi.Client.dll</HintPath>
</Reference>
<Reference Include="Kingdee.BOS.WebApi.DataEntities, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\asus\Desktop\金蝶云星空_新版WebAPI资料包\金蝶云星空_新版WebAPI资料包_java_net_python_20201203\新手入门指南:Net_快速搭建开发_测试环境(测试工程_SDK)\SDK20201203\Kingdee.BOS.WebApi.DataEntities.dll</HintPath>
</Reference>
<Reference Include="Lskj.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Debug\Lib\Lskj.Core.dll</HintPath>
</Reference>
<Reference Include="Lskj.Util, Version=1.0.0.1, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Debug\Lib\Lskj.Util.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\asus\Desktop\金蝶云星空_新版WebAPI资料包\金蝶云星空_新版WebAPI资料包_java_net_python_20201203\新手入门指南:Net_快速搭建开发_测试环境(测试工程_SDK)\SDK20201203\Newtonsoft.Json.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" />
</ItemGroup>
<ItemGroup>
<Compile Include="Data_Prd_Mo.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<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>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="ClassDiagram1.cd" />
<None Include="ClassDiagram2.cd" />
<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>
<COMReference Include="AxSHDocVw">
<Guid>{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>1</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>aximp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
<COMReference Include="SHDocVw">
<Guid>{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>1</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -0,0 +1,115 @@
namespace DXApplication3
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.gridControl1 = new DevExpress.XtraGrid.GridControl();
this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.panel1 = new System.Windows.Forms.Panel();
this.gridControl2 = new DevExpress.XtraGrid.GridControl();
this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView();
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridControl2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit();
this.SuspendLayout();
//
// gridControl1
//
this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl1.Location = new System.Drawing.Point(0, 0);
this.gridControl1.MainView = this.gridView1;
this.gridControl1.Name = "gridControl1";
this.gridControl1.Size = new System.Drawing.Size(1287, 589);
this.gridControl1.TabIndex = 0;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
//
// gridView1
//
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
//
// panel1
//
this.panel1.Controls.Add(this.gridControl2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(0, 309);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1287, 280);
this.panel1.TabIndex = 1;
//
// gridControl2
//
this.gridControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl2.Location = new System.Drawing.Point(0, 0);
this.gridControl2.MainView = this.gridView2;
this.gridControl2.Name = "gridControl2";
this.gridControl2.Size = new System.Drawing.Size(1287, 280);
this.gridControl2.TabIndex = 0;
this.gridControl2.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView2});
//
// gridView2
//
this.gridView2.GridControl = this.gridControl2;
this.gridView2.Name = "gridView2";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1287, 589);
this.Controls.Add(this.panel1);
this.Controls.Add(this.gridControl1);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridControl2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraGrid.GridControl gridControl1;
private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
private System.Windows.Forms.Panel panel1;
private DevExpress.XtraGrid.GridControl gridControl2;
private DevExpress.XtraGrid.Views.Grid.GridView gridView2;
}
}
@@ -0,0 +1,717 @@
using Kingdee.BOS.WebApi.Client;
using Kingdee.BOS.WebApi.DataEntities;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using Lskj.Util;
using Lskj.Core;
using Data_Prd_PPBom;
using Data_Prd_PickMtrl;
using Data_Prd_Instock;
namespace DXApplication3
{
public partial class Form1 : DevExpress.XtraEditors.XtraForm
{
public Form1()
{
InitializeComponent();
DBConfig.Instance.ServerName = "183.223.99.133,14331";
DBConfig.Instance.DataBase = "lserp";
if (LoginByAppSecret() && DBConfig.Instance.CreateConnection())
{
CreatePrd_MoAndInstock();
//DataTable dataBase = GetDataBase("mps_planTaskListTab",AsFieldKeys);
//DataTable ApiSource = GetApiSource("PRD_MO", dataBase, FieldKeys);
//insertToDataBase(ApiSource, dataBase, "mps_planTaskListTab", "mps_lpt_billdocument_id","mps_lpt_id",AsFieldKeys);
//GetExcept(ApiSource, dataBase, "mps_planTaskListTab", "mps_lpt_billdocument_id", "mps_lpt_id", AsFieldKeys);
//gridControl1.DataSource = ApiSource;
//insertToDataBase(ApiSource,dataBase);
//gridControl1.DataSource = ApiSource;
//UpDateFields("PRD_INSTOCK");
//SubmitFields("BD_MATERIAL");
//AuditFields("PRD_MO", "101574");
//UnAuditFields("PRD_MO","101570");
//DeleteFields("PRD_MO", "101568");
//ViewFields("BD_MATERIAL", "109376");
}
else
{
MessageBox.Show(LoginByAppSecret() ? "数据库连接失败!" : "Api连接失败!");
}
}
private string FieldKeys = "fid,FBillNo,FID,FBillType.fname,FMaterialId,FSpecification,FQty,FProductType,FMemoItem";
private string AsFieldKeys = "mps_lpt_id,mps_lpt_billdocument_id,mps_lpt_productid,mps_lpt_tagid,mps_lpt_khbilldocument_id,mps_lpt_waferbatch_id,mps_lpt_sumamount,mps_lpt_productiontype,mps_lpt_bak";
private K3CloudApiClient apiClient = new K3CloudApiClient("https://rychip.ik3cloud.com/k3cloud/");//serverUrl需要以“/”结尾
public bool LoginByAppSecret()
{
string appId = "214972_7c3q2cuP4npZ2a1EQ/TtSZ9G4L2W7smL";
string appSecret = "e36cf74480c24f23b33eddb76760b434";
//dbId:账套ID
//userName:第三方系统登录授权的用户
//appId:第三方系统登录授权的应用ID
//appSecret:第三方系统登录授权的应用密钥
//lcid:账套语系,默认2052,(中文为2052,中文繁体为3076,英文为1033)
string loginResult = apiClient.LoginByAppSecret("20180807124126", "administrator", appId, appSecret, 2052);
JObject loginResultObj = JObject.Parse(loginResult);
JToken loginResultType;
loginResultObj.TryGetValue("LoginResultType", out loginResultType);
// 登陆成功,开始保存数据
//loginResultType.Value<Int32>():
// 0 密码错误
// 1 登录成功
// -1 登录失败
if (loginResultType != null && loginResultType.Value<Int32>() == 1)
{
return true;
}
else
{
return false;
}
}
private DataTable ToDataTable(List<List<Object>> jsonList,DataTable dataBase, string fieldKeys)
{
DataTable dt = new DataTable();
string[] sArray = fieldKeys.Split(new string[]{","},StringSplitOptions.None);
for (int i = 0; i < sArray.Length; i++)
{
if (jsonList[0][i] != null)
{
dt.Columns.Add(sArray[i], dataBase.Columns[i].DataType);
}
else
dt.Columns.Add(sArray[i]);
}
for (int i = 0; i < jsonList.Count; i++)
{
DataRow dr = dt.NewRow();
for (int j = 0; j < jsonList[i].Count; j++)
{
dr[j] = jsonList[i][j]==null? "":jsonList[i][j];
}
dt.Rows.Add(dr);
}
return dt;
}
private DataTable GetApiSource(string formId,DataTable getDataBaseType,string fieldKeys)
{
var dataObj = new
{
FormId = formId,//物料清单唯一标识FormId = "ENG_BOM"
FieldKeys = fieldKeys,//需查询的字段key集合,字符串类型,格式:"key1,key2,..."(必录) 注(查询单据体内码,需加单据体Key和下划线,如:FEntryKey_FEntryId
//FilterString = "FDocumentStatus='C'",//获取已经审核BOM
OrderString = "",//排序
TopRowCount = 0,
StartRow = 0,
Limit = 0
};
var data = JsonConvert.SerializeObject(dataObj);
var result = apiClient.ExecuteBillQuery(data);
DataTable dataTable = ToDataTable(result, getDataBaseType, AsFieldKeys);
return dataTable;
}
/// <summary>
/// 暂存单据
/// </summary>
private void DraftFields(string formId)
{
/*var Content = new
{
model =new
{
FPrdOrgId = new
{
FNumber = "101",
},
FDescription ="测试操作用生产订单",
FBillType=new
{
FNumber = "SCRKD01_SYS",
},
}
};*/
var Content = new
{
Model = new
{
SubHeadEntity5 = new
{
FIsCoby = true,
FIsMainPrd = true,
},
FBillType = new
{
FNumber = "SCRKD01_SYS",
},
IsDeleteEntry = "false",
FStockOrgId = new
{
FNumber = "101",
},
FPrdOrgId = new
{
FNumber = "101",
},
FEntity = new[]
{
new
{
FIsNew = false,
FProductType ="1",
FInStockType ="1",
FSrcEntryId ="105199",
FMaterialId =new
{
FNumber="7.03.01329",
},
FMoBillNo = "MO001457",
FMoId="101574",
FMoEntryId="101698",
FMoEntrySeq=1,
FSrcInterId ="105180",
FSrcEntrySeq=1,
FSrcBillType="PRD_MO",
FBaseUnitId =new
{
FNumber = "ke",
},
FUnitID = new
{
FNumber = "ke",
},
FStockId =new
{
FNumber = "P003",
},
FOwnerId = new
{
FNumber = "101",
},
FStockStatusId =new
{
FNumber = "KCZT01_SYS",
},
FMustQty ="9",
FRealQty ="9",
FLot =new
{
FNumber = "BMG0020",
},
FAuxpropId = new
{
FAUXPROPID__FF100004 = new
{
FNUMBER = "00000",
},
FAUXPROPID__FF100005 = new
{
FNUMBER = "20191106",
},
},
FEntity_Link =new[]
{
new
{
FEntity_Link_FSTableName ="T_PRD_MORPTENTRY",
FEntity_Link_FRuleId ="PRD_MORPT2INSTOCK",
FEntity_Link_FSBillId ="105180",
FEntity_Link_FSId ="105199",
FEntity_Link_FSTableId =0,
FEntity_Link_FBasePrdRealQtyOld ="8",
FEntity_Link_FBasePrdRealQty ="8",
},
},
}
}
},
};
var data = JsonConvert.SerializeObject(Content);
JObject jObject = JObject.Parse(data);
var result = apiClient.Draft(formId, data);
}
private void UpDateFields(string formId)
{
/*var Content = new
{
model =new
{
FPrdOrgId = new
{
FNumber = "101",
},
FDescription ="测试操作用生产订单",
FBillType=new
{
FNumber = "SCRKD01_SYS",
},
}
};*/
var Content = new
{
Model = new
{
SubHeadEntity5 = new
{
FIsCoby = true,
FIsMainPrd = true,
},
FBillType = new
{
FNumber = "SCRKD01_SYS",
},
IsDeleteEntry = "false",
FStockOrgId = new
{
FNumber = "101",
},
FPrdOrgId = new
{
FNumber = "101",
},
FEntity = new[]
{
new
{
FIsNew = false,
FProductType ="1",
FInStockType ="1",
FSrcEntryId ="105199",
FMaterialId =new
{
FNumber="7.03.01329",
},
FMoBillNo = "MO001457",
FMoId="101574",
FMoEntryId="101698",
FMoEntrySeq=1,
FSrcInterId ="105180",
FSrcEntrySeq=1,
FSrcBillType="PRD_MO",
FBaseUnitId =new
{
FNumber = "ke",
},
FUnitID = new
{
FNumber = "ke",
},
FStockId =new
{
FNumber = "P003",
},
FOwnerId = new
{
FNumber = "101",
},
FStockStatusId =new
{
FNumber = "KCZT01_SYS",
},
FMustQty ="9",
FRealQty ="9",
FLot =new
{
FNumber = "BMG0020",
},
FAuxpropId = new
{
FAUXPROPID__FF100004 = new
{
FNUMBER = "00000",
},
FAUXPROPID__FF100005 = new
{
FNUMBER = "20191106",
},
},
FEntity_Link =new[]
{
new
{
FEntity_Link_FSTableName ="T_PRD_MORPTENTRY",
FEntity_Link_FRuleId ="PRD_MORPT2INSTOCK",
FEntity_Link_FSBillId ="105180",
FEntity_Link_FSId ="105199",
FEntity_Link_FSTableId =0,
FEntity_Link_FBasePrdRealQtyOld ="8",
FEntity_Link_FBasePrdRealQty ="8",
},
},
}
}
},
};
var data = JsonConvert.SerializeObject(Content);
JObject jObject = JObject.Parse(data);
var result = apiClient.Save(formId, data);
}
/// <summary>
/// 提交单据数据
/// </summary>
/// <param name="formId"></param>
private void SubmitFields(string formId)
{
var dataObj = new { };
var data = JsonConvert.SerializeObject(dataObj);
var result = apiClient.Submit(formId, data);
}
/// <summary>
/// 审核单据数据
/// </summary>
/// <param name="formId"></param>
private void AuditFields(string formId,string numbers)
{
var dataObj = new
{
ids = numbers,
};
var data = JsonConvert.SerializeObject(dataObj);
var result = apiClient.Audit(formId, data);
}
/// <summary>
/// 删除单据信息
/// </summary>
/// <param name="formId"></param>
private void DeleteFields(string formId,string number)
{
var dataObj = new
{
ids = number,
};
var data = JsonConvert.SerializeObject(dataObj);
var result = apiClient.Delete(formId, data);
}
/// <summary>
/// 反审核
/// </summary>
/// <param name="formId"></param>
private void UnAuditFields(string formId,string numbers)
{
var dataObj = new
{
ids = numbers,
};
var data = JsonConvert.SerializeObject(dataObj);
var result = apiClient.UnAudit(formId, data);
}
/// <summary>
/// 查看
/// </summary>
/// <param name="formId"></param>
private void ViewFields(string formId,string numbers)
{
var dataObj = new
{
id = numbers,
};
var data = JsonConvert.SerializeObject(dataObj);
var result = apiClient.View(formId, data);
JObject JObject = JObject.Parse(result);
string value = JObject["Result"]["Result"]["Id"].ToString();
}
/// <summary>
/// 获取数据库表格内容
/// </summary>
/// <returns></returns>
private DataTable GetDataBase(string tableName)
{
string sqlValue = string.Format("select * from {0}",tableName);
return SqlHelper.ExecuteDataTable(sqlValue);
}
/// <summary>
/// 获取指定列数据表
/// </summary>
/// <param name="tableName"></param>
/// <returns></returns>
private DataTable GetDataBase(string tableName,string asFieldKeys)
{
string sqlValue = string.Format("select {0} from {1}", asFieldKeys, tableName);
return SqlHelper.ExecuteDataTable(sqlValue);
}
/// <summary>
/// 数据添加到数据库中
/// </summary>
/// <param name="apiSource"></param>
/// <param name="dataBase"></param>
///
private void insertToDataBase(DataTable apiSource, DataTable dataBase, string tableName, string primaryKey, string identityKeys, string asfieldKeys)
{
string insertSql = "insert into {0} ({1}) values ({2});";
if (apiSource != null && apiSource.Rows.Count > 0)
{
foreach (DataRow row in apiSource.Rows)
{
if (apiSource.Select(string.Format("{0}='{1}'", primaryKey + "", row[primaryKey] + "")).Length == 0)
{
string insertFields = string.Empty;//添加的列名
string insertValues = string.Empty;//列数据
foreach (DataColumn col in dataBase.Columns)
{
if (asfieldKeys.Contains(col.ColumnName))
{
insertValues += string.Format("'{0}',", row[col.ColumnName]);
insertFields += string.Format(col.ColumnName + ",");
}
else if (col.ColumnName == "mps_lpt_id")
continue;
else if ((col.DataType == typeof(Decimal) || col.DataType == typeof(Int32)) && !col.AllowDBNull)
{
insertValues += "0,";
insertFields += string.Format(col.ColumnName + ",");
}
else if (col.AllowDBNull)
continue;
else
{
insertValues += string.Format("'',");
insertFields += string.Format(col.ColumnName + ",");
}
}
try
{
SqlHelper.ExecuteNonQuery(string.Format(insertSql, "mps_planTaskListTab", insertFields.TrimEnd(','), insertValues.TrimEnd(',')));
}
catch (Exception)
{
continue;
}
}
else
continue;
}
}
}
/// <summary>
/// 比较差异并更新数据库中的数据
/// </summary>
private void GetExcept(DataTable apiSource, DataTable dataBase, string tableName, string primaryKey, string identityKeys ,string asfieldKeys)
{
DataTable DataBase = GetDataBase(tableName);
DataTable T_Except = new DataTable();
try
{
T_Except = dataBase.AsEnumerable().Except(apiSource.AsEnumerable(), DataRowComparer.Default).CopyToDataTable();//数据库与api比较
}
catch (Exception)
{
}
foreach (DataRow row in T_Except.Rows)
{
if (apiSource.Select(string.Format("{0}='{1}'",primaryKey+"",row[primaryKey]+"")).Length>0)
continue;
else
{
string delSql = "delete from {0} where {1} = '{2}'";
try
{
SqlHelper.ExecuteNonQuery(string.Format(delSql, tableName, primaryKey, row[primaryKey]));
}
catch (Exception)
{
continue;
}
}
}
DataTable F_Except = new DataTable();
try
{
F_Except = apiSource.AsEnumerable().Except(dataBase.AsEnumerable(), DataRowComparer.Default).CopyToDataTable();//api与数据库比较,添加并更新
}
catch (Exception)
{
}
foreach (DataRow row in F_Except.Rows)
{
if (dataBase.Select(string.Format("{0}='{1}'", primaryKey + "", row[primaryKey] + "")).Length > 0)
{
foreach (DataColumn col in row.Table.Columns)
{
string UpdateSql = "update {0} set {1} = '{2}' where {3} = '{4}'";
string x = string.Format(UpdateSql, tableName, col.ColumnName, row[col.ColumnName], primaryKey, row[primaryKey]);
try
{
SqlHelper.ExecuteNonQuery(string.Format(UpdateSql, tableName, col.ColumnName, row[col.ColumnName], primaryKey, row[primaryKey]));
}
catch (Exception)
{
continue;
}
}
}
else
{
string insertSql = "insert into {0} ({1}) values ({2})";
string insertFields = string.Empty;
string insertValues = string.Empty;
foreach (DataColumn col in DataBase.Columns)
{
if (asfieldKeys.Contains(col.ColumnName))
{
insertValues += string.Format("'{0}',", row[col.ColumnName]);
insertFields += string.Format(col.ColumnName + ",");
}
else if (col.ColumnName == identityKeys)
continue;
else if ((col.DataType == typeof(Decimal) || col.DataType == typeof(Int32)) && !col.AllowDBNull)
{
insertValues += "0,";
insertFields += string.Format(col.ColumnName + ",");
}
else if (col.AllowDBNull)
continue;
else
{
insertValues += string.Format("'',");
insertFields += string.Format(col.ColumnName + ",");
}
}
try
{
string x = string.Format(insertSql, tableName, insertFields.TrimEnd(','), insertValues.TrimEnd(','));
SqlHelper.ExecuteNonQuery(string.Format(insertSql, tableName, insertFields.TrimEnd(','), insertValues.TrimEnd(',')));
}
catch (Exception)
{
continue;
}
}
}
}
private void CreatePrd_MoAndInstock()
{
Data_Prd_Mo_Update data_Prd_Mo_Update = new Data_Prd_Mo_Update();
data_Prd_Mo_Update.Model = new Model();
data_Prd_Mo_Update.Model.FID = 101635;
data_Prd_Mo_Update.NeedReturnFields = new List<string>() { "Fid", "FBillNo", "FTreeEntity.FEntryId" };
//data_Prd_Mo_Update.Model.FBillType = new FBillType() { FNUMBER = "SCDD01_SYS" };
//data_Prd_Mo_Update.Model.FPrdOrgId = new FPrdOrgId() { FNumber = "101" };
//FTreeEntityItem fTreeEntityItem = new FTreeEntityItem();
//fTreeEntityItem.FMaterialId = new FMaterialId() { FNumber = "7.03.90012" };
//fTreeEntityItem.FUnitId = new FUnitId() { FNumber = "ke" };
//fTreeEntityItem.FWorkShopID = new FWorkShopID() { FNumber = "BM005" };
//fTreeEntityItem.FBomId = new FBomId() { FNumber = "M009D-RY1220" };
//fTreeEntityItem.FQty = 50;
//data_Prd_Mo_Update.Model.FTreeEntity = new List<FTreeEntityItem>();
//data_Prd_Mo_Update.Model.FTreeEntity.Add(fTreeEntityItem);
var Prd_MoResult = apiClient.Draft("PRD_MO", JsonConvert.SerializeObject(data_Prd_Mo_Update));//暂存生产订单
JObject Prd_MoId = JObject.Parse(Prd_MoResult);
Data_Prd_Mo_Update data_Prd_Mo_Draft = new Data_Prd_Mo_Update();
data_Prd_Mo_Draft.Model = new Model();
data_Prd_Mo_Draft.Model.FID = Convert.ToInt32(Prd_MoId["Result"]["NeedReturnData"][0]["FID"].ToString());//获取订单id
apiClient.Save("PRD_MO", JsonConvert.SerializeObject(data_Prd_Mo_Update));//保存生产订单
Data_Prd_Mo_Submit data_Prd_Mo_Submit = new Data_Prd_Mo_Submit() { Ids = Prd_MoId["Result"]["NeedReturnData"][0]["FID"].ToString() };
var submit = apiClient.Submit("PRD_MO", JsonConvert.SerializeObject(data_Prd_Mo_Submit));//提交
Data_Prd_Mo_Audit data_Prd_Mo_Audit = new Data_Prd_Mo_Audit() { Ids = Prd_MoId["Result"]["NeedReturnData"][0]["FID"].ToString() };
var audit = apiClient.Audit("PRD_MO", JsonConvert.SerializeObject(data_Prd_Mo_Audit));//审核
DataExecuteBillQuery GetPrd_PPBOMId = new DataExecuteBillQuery() //查询用料单ID
{
FormId = "PRD_PPBOM",
FieldKeys="Fid",
FilterString = string.Format("FMOBillNO='{0}'",Prd_MoId["Result"]["NeedReturnData"][0]["FBillNo"].ToString()),
};
var Prd_PPBOMId = apiClient.ExecuteBillQuery(JsonConvert.SerializeObject(GetPrd_PPBOMId));//获取用料清单ID数组
//Data_Prd_PPBom_Update data_Prd_PPBom_Update = new Data_Prd_PPBom_Update();
//data_Prd_PPBom_Update.NeedUpDateFields = new List<string>() { "FMaterialID2", "FEntity" };
//data_Prd_PPBom_Update.Model = new Data_Prd_PPBom.Model();
//data_Prd_PPBom_Update.Model.FID = Convert.ToInt32(Prd_PPBomId[0][0]);
//data_Prd_PPBom_Update.NeedReturnFields = new List<string>() { "Fid", "FBillNo", "FEntity.FEntryId" };
//Data_Prd_PPBom.FEntityItem fEntityItem = new Data_Prd_PPBom.FEntityItem();
//fEntityItem.FMaterialID2 = new FMaterialID2() { FNumber = "2001002" };
//data_Prd_PPBom_Update.Model.FEntity = new List<Data_Prd_PPBom.FEntityItem>();
//data_Prd_PPBom_Update.Model.FEntity.Add(fEntityItem);
//var Prd_PPBom_Update = apiClient.Save("PRD_PPBOM", JsonConvert.SerializeObject(data_Prd_PPBom_Update));//每次执行会增加一条子物料
Data_Prd_PPBom_Submit data_Prd_PPBom_Submit = new Data_Prd_PPBom_Submit() { Ids = Prd_PPBOMId[0][0].ToString() };
var Prd_PPBom_Submit = apiClient.Submit("PRD_PPBOM", JsonConvert.SerializeObject(data_Prd_PPBom_Submit));//提交
Data_Prd_PPBom_Audit data_Prd_PPBom_Audit = new Data_Prd_PPBom_Audit() { Ids = Prd_PPBOMId[0][0].ToString() };
var Prd_PPBom_Audit = apiClient.Audit("PRD_PPBOM", JsonConvert.SerializeObject(data_Prd_PPBom_Audit));//用料单审核
Data_Prd_Mo_ToStart data_Prd_Mo_ToStart = new Data_Prd_Mo_ToStart() { Ids = Prd_MoId["Result"]["NeedReturnData"][0]["FID"].ToString() };
var excute = apiClient.ExcuteOperation("PRD_MO", "ToStart", JsonConvert.SerializeObject(data_Prd_Mo_ToStart));//执行到开工
//下推用料单到领料单
Data_Prd_PPBom_Push data_Prd_PPBom_Push = new Data_Prd_PPBom_Push();
data_Prd_PPBom_Push.Ids = Prd_PPBOMId[0][0].ToString();
data_Prd_PPBom_Push.TargetBillTypeId = "";
data_Prd_PPBom_Push.TargetFormId = "PRD_PickMtrl";
data_Prd_PPBom_Push.IsDraftWhenSaveFail = true.ToString();
data_Prd_PPBom_Push.IsEnableDefaultRule = true.ToString();
//var Prd_PPBom_Push = apiClient.Push("PRD_PPBOM", JsonConvert.SerializeObject(data_Prd_PPBom_Push));//领料单暂存后需要补充数据
DataExecuteBillQuery GetPrd_PickMtrlId = new DataExecuteBillQuery() //查询领料单ID
{
FormId = "PRD_PickMtrl",
FieldKeys = "Fid",
FilterString = string.Format("FMOBillNO='{0}'", Prd_MoId["Result"]["NeedReturnData"][0]["FBillNo"].ToString()),
};
var Prd_PickMtrlId = apiClient.ExecuteBillQuery(JsonConvert.SerializeObject(GetPrd_PickMtrlId));//获取领料清单ID数组
Data_Prd_PickMtrl_Update data_Prd_PickMtrl_Update = new Data_Prd_PickMtrl_Update();
data_Prd_PickMtrl_Update.Model = new Data_Prd_PickMtrl.Model();
data_Prd_PickMtrl_Update.NeedUpDateFields = new List<string>() { "FEntity", "FStockId" };
data_Prd_PickMtrl_Update.NeedReturnFields = new List<string>() { "FEntity.FStockId" };
data_Prd_PickMtrl_Update.Model.FID = Convert.ToInt32(Prd_PickMtrlId[0][0].ToString());
Data_Prd_PickMtrl.FEntityItem fEntityItem_PickMtrl = new Data_Prd_PickMtrl.FEntityItem();
fEntityItem_PickMtrl.FStockId = new Data_Prd_PickMtrl.FStockId() { FNumber = "P003" };
data_Prd_PickMtrl_Update.Model.FEntity = new List<Data_Prd_PickMtrl.FEntityItem>();
data_Prd_PickMtrl_Update.Model.FEntity.Add(fEntityItem_PickMtrl);
var Prd_PickMtrl_Update = apiClient.Save("PRD_PickMtrl", JsonConvert.SerializeObject(data_Prd_PickMtrl_Update));//保存领料单
Data_Prd_PickMtrl_Submit data_Prd_PickMtrl_Submit = new Data_Prd_PickMtrl_Submit() { Ids = Prd_PickMtrlId[0][0].ToString() };
var Prd_PickMtrl_Submit = apiClient.Submit("PRD_PickMtrl", JsonConvert.SerializeObject(data_Prd_PickMtrl_Submit));//提交
Data_Prd_PickMtrl_Audit data_Prd_PickMtrl_Audit = new Data_Prd_PickMtrl_Audit() { Ids = Prd_PickMtrlId[0][0].ToString() };
var Prd_PickMtrl_Audit = apiClient.Audit("PRD_PickMtrl", JsonConvert.SerializeObject(data_Prd_PickMtrl_Audit));//审核
//根据生产订单号,生成生产入库单
Data_Prd_Instock_Update data_Prd_Instock_Update = new Data_Prd_Instock_Update();
data_Prd_Instock_Update.Model = new Data_Prd_Instock.Model();
Data_Prd_Instock.FEntityItem fEntityItem_Instock = new Data_Prd_Instock.FEntityItem();
data_Prd_Instock_Update.Model.FEntity = new List<Data_Prd_Instock.FEntityItem>();
data_Prd_Instock_Update.Model.FEntity.Add(fEntityItem_Instock);
var Prd_Instock_Update = apiClient.Save("PRD_INSTOCK", JsonConvert.SerializeObject(data_Prd_Instock_Update));
}
}
}
@@ -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,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using DevExpress.UserSkins;
using DevExpress.Skins;
using DevExpress.LookAndFeel;
namespace DXApplication3
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
BonusSkins.Register();
SkinManager.EnableFormSkins();
UserLookAndFeel.Default.SetSkinStyle("DevExpress Style");
Application.Run(new Form1());
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DXApplication3")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DXApplication3")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9006f149-aa49-4b8e-ba69-386d945fa738")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace DXApplication3.Properties {
using System;
/// <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 (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DXApplication3.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;
}
}
}
}
@@ -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,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace DXApplication3.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.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;
}
}
}
}
@@ -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>