| @ -0,0 +1,85 @@ | |||||
| | |||||
| Microsoft Visual Studio Solution File, Format Version 11.00 | |||||
| # Visual Studio 2010 | |||||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RpcHelper", "RpcHelper\RpcHelper\RpcHelper.csproj", "{B9E23023-B831-4853-8384-9E33B75BE70C}" | |||||
| EndProject | |||||
| Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Web", "Web\", "{FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}" | |||||
| ProjectSection(WebsiteProperties) = preProject | |||||
| TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0" | |||||
| ProjectReferences = "{B9E23023-B831-4853-8384-9E33B75BE70C}|RpcHelper.dll;{88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}|ClassHelper.dll;" | |||||
| Debug.AspNetCompiler.VirtualPath = "/Web" | |||||
| Debug.AspNetCompiler.PhysicalPath = "Web\" | |||||
| Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Web\" | |||||
| Debug.AspNetCompiler.Updateable = "true" | |||||
| Debug.AspNetCompiler.ForceOverwrite = "true" | |||||
| Debug.AspNetCompiler.FixedNames = "false" | |||||
| Debug.AspNetCompiler.Debug = "True" | |||||
| Release.AspNetCompiler.VirtualPath = "/Web" | |||||
| Release.AspNetCompiler.PhysicalPath = "Web\" | |||||
| Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Web\" | |||||
| Release.AspNetCompiler.Updateable = "true" | |||||
| Release.AspNetCompiler.ForceOverwrite = "true" | |||||
| Release.AspNetCompiler.FixedNames = "false" | |||||
| Release.AspNetCompiler.Debug = "False" | |||||
| VWDPort = "7620" | |||||
| EndProjectSection | |||||
| EndProject | |||||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{96422879-4D58-4F13-9BC7-FC102730068E}" | |||||
| EndProject | |||||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassHelper", "ClassHelper\ClassHelper.csproj", "{88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}" | |||||
| EndProject | |||||
| Global | |||||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||||
| Debug|Any CPU = Debug|Any CPU | |||||
| Debug|Mixed Platforms = Debug|Mixed Platforms | |||||
| Debug|x86 = Debug|x86 | |||||
| Release|Any CPU = Release|Any CPU | |||||
| Release|Mixed Platforms = Release|Mixed Platforms | |||||
| Release|x86 = Release|x86 | |||||
| EndGlobalSection | |||||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Debug|x86.ActiveCfg = Debug|Any CPU | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Release|Mixed Platforms.Build.0 = Release|Any CPU | |||||
| {B9E23023-B831-4853-8384-9E33B75BE70C}.Release|x86.ActiveCfg = Release|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Debug|x86.ActiveCfg = Debug|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Release|Any CPU.ActiveCfg = Debug|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Release|Any CPU.Build.0 = Debug|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Release|Mixed Platforms.Build.0 = Debug|Any CPU | |||||
| {FD57AB6D-8F7C-450B-A0F8-515D4EE35DDE}.Release|x86.ActiveCfg = Debug|Any CPU | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Debug|Any CPU.ActiveCfg = Debug|x86 | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Debug|Mixed Platforms.Build.0 = Debug|x86 | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Debug|x86.ActiveCfg = Debug|x86 | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Debug|x86.Build.0 = Debug|x86 | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Release|Any CPU.ActiveCfg = Release|x86 | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Release|Mixed Platforms.ActiveCfg = Release|x86 | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Release|Mixed Platforms.Build.0 = Release|x86 | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Release|x86.ActiveCfg = Release|x86 | |||||
| {96422879-4D58-4F13-9BC7-FC102730068E}.Release|x86.Build.0 = Release|x86 | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Debug|x86.ActiveCfg = Debug|Any CPU | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Release|Mixed Platforms.Build.0 = Release|Any CPU | |||||
| {88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}.Release|x86.ActiveCfg = Release|Any CPU | |||||
| EndGlobalSection | |||||
| GlobalSection(SolutionProperties) = preSolution | |||||
| HideSolutionNode = FALSE | |||||
| EndGlobalSection | |||||
| EndGlobal | |||||
| @ -0,0 +1,54 @@ | |||||
| <?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)' == '' ">AnyCPU</Platform> | |||||
| <ProductVersion>8.0.30703</ProductVersion> | |||||
| <SchemaVersion>2.0</SchemaVersion> | |||||
| <ProjectGuid>{88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}</ProjectGuid> | |||||
| <OutputType>Library</OutputType> | |||||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||||
| <RootNamespace>ClassHelper</RootNamespace> | |||||
| <AssemblyName>ClassHelper</AssemblyName> | |||||
| <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | |||||
| <FileAlignment>512</FileAlignment> | |||||
| </PropertyGroup> | |||||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
| <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' "> | |||||
| <DebugType>pdbonly</DebugType> | |||||
| <Optimize>true</Optimize> | |||||
| <OutputPath>bin\Release\</OutputPath> | |||||
| <DefineConstants>TRACE</DefineConstants> | |||||
| <ErrorReport>prompt</ErrorReport> | |||||
| <WarningLevel>4</WarningLevel> | |||||
| </PropertyGroup> | |||||
| <ItemGroup> | |||||
| <Reference Include="System.Core" /> | |||||
| <Reference Include="System.Web.Extensions" /> | |||||
| <Reference Include="System.Xml.Linq" /> | |||||
| <Reference Include="System.Data.DataSetExtensions" /> | |||||
| <Reference Include="Microsoft.CSharp" /> | |||||
| <Reference Include="System.Data" /> | |||||
| <Reference Include="System.Xml" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <Compile Include="Util.cs" /> | |||||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||||
| </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,36 @@ | |||||
| using System.Reflection; | |||||
| using System.Runtime.CompilerServices; | |||||
| using System.Runtime.InteropServices; | |||||
| // 有关程序集的常规信息通过以下 | |||||
| // 特性集控制。更改这些特性值可修改 | |||||
| // 与程序集关联的信息。 | |||||
| [assembly: AssemblyTitle("ClassHelper")] | |||||
| [assembly: AssemblyDescription("")] | |||||
| [assembly: AssemblyConfiguration("")] | |||||
| [assembly: AssemblyCompany("Microsoft")] | |||||
| [assembly: AssemblyProduct("ClassHelper")] | |||||
| [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] | |||||
| [assembly: AssemblyTrademark("")] | |||||
| [assembly: AssemblyCulture("")] | |||||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||||
| // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, | |||||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||||
| [assembly: ComVisible(false)] | |||||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||||
| [assembly: Guid("866a6084-ffea-4874-a70b-2009b2f963b2")] | |||||
| // 程序集的版本信息由下面四个值组成: | |||||
| // | |||||
| // 主版本 | |||||
| // 次版本 | |||||
| // 内部版本号 | |||||
| // 修订号 | |||||
| // | |||||
| // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, | |||||
| // 方法是按如下所示使用“*”: | |||||
| // [assembly: AssemblyVersion("1.0.*")] | |||||
| [assembly: AssemblyVersion("1.0.0.0")] | |||||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||||
| @ -0,0 +1,21 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Web.Script.Serialization; | |||||
| namespace ClassHelper { | |||||
| public class NTuple | |||||
| { | |||||
| public string Item1 { get; set; } | |||||
| public long Item2 { get; set; } | |||||
| public bool Item3 { get; set; } | |||||
| } | |||||
| public static class Util { | |||||
| public static List<NTuple> GetTuple(object o) { | |||||
| var serializer = new JavaScriptSerializer(); | |||||
| var str = serializer.Serialize(o); | |||||
| var results = serializer.Deserialize<List<NTuple>>(str); | |||||
| return results; | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,17 @@ | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper { | |||||
| public class FeedGoodsSale { | |||||
| public FeedGoodsSale() { | |||||
| Head = new FeedGoodsSaleHead(); | |||||
| Body = new FeedGoodsSaleBody(); | |||||
| } | |||||
| [XmlElement(ElementName = "header")] | |||||
| public FeedGoodsSaleHead Head; | |||||
| [XmlElement(ElementName = "body")] | |||||
| public FeedGoodsSaleBody Body; | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,16 @@ | |||||
| using System.Collections.Generic; | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper | |||||
| { | |||||
| public class FeedGoodsSaleBody { | |||||
| internal FeedGoodsSaleBody() { | |||||
| Entrys = new List<FeedGoodsSaleEntry>(); | |||||
| } | |||||
| [XmlElement(ElementName = "detail")] | |||||
| public List<FeedGoodsSaleEntry> Entrys { get; set; } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,103 @@ | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper | |||||
| { | |||||
| public class FeedGoodsSaleHead { | |||||
| private string _ebsid = string.Empty; | |||||
| [XmlElement(ElementName = "EBSID")] | |||||
| public string Ebsid { | |||||
| get { return _ebsid; } | |||||
| set { _ebsid = value; } | |||||
| } | |||||
| private string _code = string.Empty; | |||||
| [XmlElement(ElementName = "AccountingUnitCode")] | |||||
| public string AccountingUnitCode { | |||||
| get { return _code; } | |||||
| set { _code = value; } | |||||
| } | |||||
| private string _sourceID = string.Empty; | |||||
| [XmlElement(ElementName = "SourceID")] | |||||
| public string SourceID { | |||||
| get { return _sourceID; } | |||||
| set { _sourceID = value; } | |||||
| } | |||||
| private string _sourceType = string.Empty; | |||||
| [XmlElement(ElementName = "SourceType")] | |||||
| public string SourceType { | |||||
| get { return _sourceType; } | |||||
| set { _sourceType = value; } | |||||
| } | |||||
| private string _saleDate = string.Empty; | |||||
| [XmlElement(ElementName = "SaleDate")] | |||||
| public string SaleDate { | |||||
| get { return _saleDate; } | |||||
| set { _saleDate = value; } | |||||
| } | |||||
| private string _outDate = string.Empty; | |||||
| [XmlElement(ElementName = "OutDate")] | |||||
| public string OutDate { | |||||
| get { return _outDate; } | |||||
| set { _outDate = value; } | |||||
| } | |||||
| private string _breedUnitCode = string.Empty; | |||||
| [XmlElement(ElementName = "BreedUnitCode")] | |||||
| public string BreedUnitCode { | |||||
| get { return _breedUnitCode; } | |||||
| set { _breedUnitCode = value; } | |||||
| } | |||||
| private string _contractID = string.Empty; | |||||
| [XmlElement(ElementName = "ContractID")] | |||||
| public string ContractID { | |||||
| get { return _contractID; } | |||||
| set { _contractID = value; } | |||||
| } | |||||
| private string _storeCode = string.Empty; | |||||
| [XmlElement(ElementName = "StoreCode")] | |||||
| public string StoreCode { | |||||
| get { return _storeCode; } | |||||
| set { _storeCode = value; } | |||||
| } | |||||
| private string _saleType = string.Empty; | |||||
| [XmlElement(ElementName = "SaleType")] | |||||
| public string SaleType { | |||||
| get { return _saleType; } | |||||
| set { _saleType = value; } | |||||
| } | |||||
| private string _staffCode = string.Empty; | |||||
| [XmlElement(ElementName = "StaffCode")] | |||||
| public string StaffCode { | |||||
| get { return _staffCode; } | |||||
| set { _staffCode = value; } | |||||
| } | |||||
| private string _remark = string.Empty; | |||||
| [XmlElement(ElementName = "Remark")] | |||||
| public string Remark { | |||||
| get { return _remark; } | |||||
| set { _remark = value; } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,91 @@ | |||||
| using System.Collections.Generic; | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper { | |||||
| [XmlRoot(ElementName = "bills")] | |||||
| public class FeedGoodsSales { | |||||
| public FeedGoodsSales() { | |||||
| Bills = new List<FeedGoodsSale>(); | |||||
| } | |||||
| [XmlElement(ElementName = "bill")] | |||||
| public List<FeedGoodsSale> Bills { get; set; } | |||||
| } | |||||
| public class FeedGoodsSaleEntry { | |||||
| private string _sourceDetailID = string.Empty; | |||||
| [XmlElement(ElementName = "SourceDetailID")] | |||||
| public string SourceDetailID { | |||||
| get { return _sourceDetailID; } | |||||
| set { _sourceDetailID = value; } | |||||
| } | |||||
| private string _contractID = string.Empty; | |||||
| [XmlElement(ElementName = "ContractID")] | |||||
| public string ContractID { | |||||
| get { return _contractID; } | |||||
| set { _contractID = value; } | |||||
| } | |||||
| private string _goodsCode = string.Empty; | |||||
| [XmlElement(ElementName = "GoodsCode")] | |||||
| public string GoodsCode { | |||||
| get { return _goodsCode; } | |||||
| set { _goodsCode = value; } | |||||
| } | |||||
| private string _number = string.Empty; | |||||
| [XmlElement(ElementName = "Number")] | |||||
| public string Number { | |||||
| get { return _number; } | |||||
| set { _number = value; } | |||||
| } | |||||
| private string _secNumber = string.Empty; | |||||
| [XmlElement(ElementName = "SecNumber")] | |||||
| public string SecNumber { | |||||
| get { return _secNumber; } | |||||
| set { _secNumber = value; } | |||||
| } | |||||
| private string _price = string.Empty; | |||||
| [XmlElement(ElementName = "Price")] | |||||
| public string Price { | |||||
| get { return _price; } | |||||
| set { _price = value; } | |||||
| } | |||||
| private string _money = string.Empty; | |||||
| [XmlElement(ElementName = "Money")] | |||||
| public string Money { | |||||
| get { return _money; } | |||||
| set { _money = value; } | |||||
| } | |||||
| private string _outDate = string.Empty; | |||||
| [XmlElement(ElementName = "OutDate")] | |||||
| public string OutDate { | |||||
| get { return _outDate; } | |||||
| set { _outDate = value; } | |||||
| } | |||||
| private string _ebsid = string.Empty; | |||||
| [XmlElement(ElementName = "LINE_ID")] | |||||
| public string LineID { | |||||
| get { return _ebsid; } | |||||
| set { _ebsid = value; } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,18 @@ | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper | |||||
| { | |||||
| public class FeedPlan { | |||||
| public FeedPlan() { | |||||
| Head = new FeedPlanHead(); | |||||
| Body = new FeedPlanBody( ); | |||||
| } | |||||
| [XmlElement(ElementName = "header")] | |||||
| public FeedPlanHead Head; | |||||
| [XmlElement(ElementName = "body")] | |||||
| public FeedPlanBody Body; | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,15 @@ | |||||
| using System.Collections.Generic; | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper | |||||
| { | |||||
| public class FeedPlanBody { | |||||
| internal FeedPlanBody() { | |||||
| Entrys = new List<FeedPlanBodyEntry>(); | |||||
| } | |||||
| [XmlElement(ElementName = "detail")] | |||||
| public List<FeedPlanBodyEntry> Entrys { get; set; } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,112 @@ | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper { | |||||
| public class FeedPlanBodyEntry { | |||||
| private string _operateType = string.Empty; | |||||
| [XmlElement(ElementName = "OPERATE_TYPE")] | |||||
| public string OperateType { | |||||
| get { return _operateType; } | |||||
| set { _operateType = value; } | |||||
| } | |||||
| private string _chickTime = string.Empty; | |||||
| [XmlElement(ElementName = "ChickTime")] | |||||
| public string ChickTime { | |||||
| get { return _chickTime; } | |||||
| set { _chickTime = value; } | |||||
| } | |||||
| private string _breedOrgCode = string.Empty; | |||||
| [XmlElement(ElementName = "BreedOrgCode")] | |||||
| public string BreedOrgCode { | |||||
| get { return _breedOrgCode; } | |||||
| set { _breedOrgCode = value; } | |||||
| } | |||||
| private string _breedUnitCode = string.Empty; | |||||
| [XmlElement(ElementName = "BreedUnitCode")] | |||||
| public string BreedUnitCode { | |||||
| get { return _breedUnitCode; } | |||||
| set { _breedUnitCode = value; } | |||||
| } | |||||
| private string _salesmanName = string.Empty; | |||||
| [XmlElement(ElementName = "Salesman")] | |||||
| public string Salesman { | |||||
| get { return _salesmanName; } | |||||
| set { _salesmanName = value; } | |||||
| } | |||||
| private string _chickCode = string.Empty; | |||||
| [XmlElement(ElementName = "ChickCode")] | |||||
| public string ChickCode { | |||||
| get { return _chickCode; } | |||||
| set { _chickCode = value; } | |||||
| } | |||||
| private string _hatchFactoryCode = string.Empty; | |||||
| [XmlElement(ElementName = "HatchFactoryCode")] | |||||
| public string HatchFactoryCode { | |||||
| get { return _hatchFactoryCode; } | |||||
| set { _hatchFactoryCode = value; } | |||||
| } | |||||
| private string _breedAddress = string.Empty; | |||||
| [XmlElement(ElementName = "BreedAddress")] | |||||
| public string BreedAddress { | |||||
| get { return _breedAddress; } | |||||
| set { _breedAddress = value; } | |||||
| } | |||||
| private string _client = string.Empty; | |||||
| [XmlElement(ElementName = "Client")] | |||||
| public string Client { | |||||
| get { return _client; } | |||||
| set { _client = value; } | |||||
| } | |||||
| private string _contact = string.Empty; | |||||
| [XmlElement(ElementName = "Contact")] | |||||
| public string Contact { | |||||
| get { return _contact; } | |||||
| set { _contact = value; } | |||||
| } | |||||
| private string _planDetailNum = string.Empty; | |||||
| [XmlElement(ElementName = "PlanDetailNum")] | |||||
| public string PlanDetailNum { | |||||
| get { return _planDetailNum; } | |||||
| set { _planDetailNum = value; } | |||||
| } | |||||
| private string _contractID = string.Empty; | |||||
| [XmlElement(ElementName = "ContractID")] | |||||
| public string ContractID { | |||||
| get { return _contractID; } | |||||
| set { _contractID = value; } | |||||
| } | |||||
| private string _price = string.Empty; | |||||
| [XmlElement(ElementName = "Price")] | |||||
| public string Price { | |||||
| get { return _price; } | |||||
| set { _price = value; } | |||||
| } | |||||
| private string _ebsid = string.Empty; | |||||
| [XmlElement(ElementName = "LINE_ID")] | |||||
| public string LineID { | |||||
| get { return _ebsid; } | |||||
| set { _ebsid = value; } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,53 @@ | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper | |||||
| { | |||||
| public class FeedPlanHead { | |||||
| private string _operateType = string.Empty; | |||||
| [XmlElement(ElementName = "OPERATE_TYPE")] | |||||
| public string OperateType { | |||||
| get { return _operateType; } | |||||
| set { _operateType = value; } | |||||
| } | |||||
| private string _ebsid = string.Empty; | |||||
| [XmlElement(ElementName = "EBSID")] | |||||
| public string Ebsid { | |||||
| get { return _ebsid; } | |||||
| set { _ebsid = value; } | |||||
| } | |||||
| private string _code = string.Empty; | |||||
| [XmlElement(ElementName = "AccountingUnitCode")] | |||||
| public string AccountingUnitCode { | |||||
| get { return _code; } | |||||
| set { _code = value; } | |||||
| } | |||||
| private string _planDate = string.Empty; | |||||
| [XmlElement(ElementName = "PlanDate")] | |||||
| public string PlanDate { | |||||
| get { return _planDate; } | |||||
| set { _planDate = value; } | |||||
| } | |||||
| private string _chickTime = string.Empty; | |||||
| [XmlElement(ElementName = "ChickTime")] | |||||
| public string ChickTime { | |||||
| get { return _chickTime; } | |||||
| set { _chickTime = value; } | |||||
| } | |||||
| private string _remark = string.Empty; | |||||
| [XmlElement(ElementName = "Remark")] | |||||
| public string Remark { | |||||
| get { return _remark; } | |||||
| set { _remark = value; } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,16 @@ | |||||
| using System.Collections.Generic; | |||||
| using System.Xml.Serialization; | |||||
| using RpcHelper; | |||||
| namespace RpcHelper { | |||||
| [XmlRoot(ElementName = "bills")] | |||||
| public class FeedPlans { | |||||
| public FeedPlans() { | |||||
| Bills = new List<FeedPlan>(); | |||||
| } | |||||
| [XmlElement(ElementName = "bill")] | |||||
| public List<FeedPlan> Bills { get; set; } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,15 @@ | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper | |||||
| { | |||||
| public class GetContractBail { | |||||
| public GetContractBail() { | |||||
| Head = new GetContractBailHead(); | |||||
| } | |||||
| [XmlElement(ElementName = "header")] | |||||
| public GetContractBailHead Head; | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,91 @@ | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper | |||||
| { | |||||
| public class GetContractBailHead { | |||||
| private string _ebsid = string.Empty; | |||||
| [XmlElement(ElementName = "EBSID")] | |||||
| public string Ebsid { | |||||
| get { return _ebsid; } | |||||
| set { _ebsid = value; } | |||||
| } | |||||
| private string _code = string.Empty; | |||||
| [XmlElement(ElementName = "AccountingUnitCode")] | |||||
| public string AccountingUnitCode { | |||||
| get { return _code; } | |||||
| set { _code = value; } | |||||
| } | |||||
| private string _cooperative = string.Empty; | |||||
| [XmlElement(ElementName = "CoopCode")] | |||||
| public string CooperativeCode { | |||||
| get { return _cooperative; } | |||||
| set { _cooperative = value; } | |||||
| } | |||||
| private string _planDate = string.Empty; | |||||
| [XmlElement(ElementName = "Date")] | |||||
| public string Date { | |||||
| get { return _planDate; } | |||||
| set { _planDate = value; } | |||||
| } | |||||
| private string _breedUnitCode = string.Empty; | |||||
| [XmlElement(ElementName = "BreedUnitCode")] | |||||
| public string BreedUnitCode { | |||||
| get { return _breedUnitCode; } | |||||
| set { _breedUnitCode = value; } | |||||
| } | |||||
| private string _contractID = string.Empty; | |||||
| [XmlElement(ElementName = "ContractID")] | |||||
| public string ContractID { | |||||
| get { return _contractID; } | |||||
| set { _contractID = value; } | |||||
| } | |||||
| private string _staffCode = string.Empty; | |||||
| [XmlElement(ElementName = "StaffCode")] | |||||
| public string StaffCode { | |||||
| get { return _staffCode; } | |||||
| set { _staffCode = value; } | |||||
| } | |||||
| private string _money = string.Empty; | |||||
| [XmlElement(ElementName = "Money")] | |||||
| public string Money { | |||||
| get { return _money; } | |||||
| set { _money = value; } | |||||
| } | |||||
| private string _guaranteeMoney = string.Empty; | |||||
| [XmlElement(ElementName = "GuaranteeMoney")] | |||||
| public string GuaranteeMoney { | |||||
| get { return _guaranteeMoney; } | |||||
| set { _guaranteeMoney = value; } | |||||
| } | |||||
| private string _remark = string.Empty; | |||||
| [XmlElement(ElementName = "Remark")] | |||||
| public string Remark { | |||||
| get { return _remark; } | |||||
| set { _remark = value; } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,16 @@ | |||||
| using System.Collections.Generic; | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper | |||||
| { | |||||
| [XmlRoot(ElementName = "bills")] | |||||
| public class GetContractBails { | |||||
| public GetContractBails() { | |||||
| Bills = new List<GetContractBail>(); | |||||
| } | |||||
| [XmlElement(ElementName = "bill")] | |||||
| public List<GetContractBail> Bills { get; set; } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,8 @@ | |||||
| namespace RpcHelper | |||||
| { | |||||
| public interface IRpcHelper { | |||||
| string InsertFeedPlan(string xml, string url ); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,36 @@ | |||||
| using System.Reflection; | |||||
| using System.Runtime.CompilerServices; | |||||
| using System.Runtime.InteropServices; | |||||
| // 有关程序集的常规信息通过以下 | |||||
| // 特性集控制。更改这些特性值可修改 | |||||
| // 与程序集关联的信息。 | |||||
| [assembly: AssemblyTitle("RpcHelper")] | |||||
| [assembly: AssemblyDescription("")] | |||||
| [assembly: AssemblyConfiguration("")] | |||||
| [assembly: AssemblyCompany("Microsoft")] | |||||
| [assembly: AssemblyProduct("RpcHelper")] | |||||
| [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] | |||||
| [assembly: AssemblyTrademark("")] | |||||
| [assembly: AssemblyCulture("")] | |||||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||||
| // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, | |||||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||||
| [assembly: ComVisible(false)] | |||||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||||
| [assembly: Guid("31f2d644-96a2-449f-959c-2120fdca01ef")] | |||||
| // 程序集的版本信息由下面四个值组成: | |||||
| // | |||||
| // 主版本 | |||||
| // 次版本 | |||||
| // 内部版本号 | |||||
| // 修订号 | |||||
| // | |||||
| // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, | |||||
| // 方法是按如下所示使用“*”: | |||||
| // [assembly: AssemblyVersion("1.0.*")] | |||||
| [assembly: AssemblyVersion("1.0.0.0")] | |||||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||||
| @ -0,0 +1,67 @@ | |||||
| using System.Collections.Generic; | |||||
| using System.Xml.Serialization; | |||||
| namespace RpcHelper | |||||
| { | |||||
| [XmlRoot(ElementName = "results")] | |||||
| public class Results { | |||||
| public Results() { | |||||
| SendResult = new List<Result>(); | |||||
| } | |||||
| private string _resultcode = string.Empty; | |||||
| [XmlElement(ElementName = "resultcode")] | |||||
| public string Resultcode { | |||||
| get { return _resultcode; } | |||||
| set { _resultcode = value; } | |||||
| } | |||||
| private string _content = string.Empty; | |||||
| [XmlElement(ElementName = "content")] | |||||
| public string Content { | |||||
| get { return _content; } | |||||
| set { _content = value; } | |||||
| } | |||||
| [XmlElement(ElementName = "result")] | |||||
| public List<Result> SendResult { get; set; } | |||||
| } | |||||
| public class Result { | |||||
| private string _ebsid = string.Empty; | |||||
| [XmlElement(ElementName = "EBSID")] | |||||
| public string Ebsid { | |||||
| get { return _ebsid; } | |||||
| set { _ebsid = value; } | |||||
| } | |||||
| private string _resultcode = string.Empty; | |||||
| [XmlElement(ElementName = "resultcode")] | |||||
| public string Resultcode { | |||||
| get { return _resultcode; } | |||||
| set { _resultcode = value; } | |||||
| } | |||||
| private string _bwpid = string.Empty; | |||||
| [XmlElement(ElementName = "BWPID")] | |||||
| public string Bwpid { | |||||
| get { return _bwpid; } | |||||
| set { _bwpid = value; } | |||||
| } | |||||
| [XmlElement(ElementName = "SourceDetailID")] | |||||
| public string SourceDetailID { get; set; } | |||||
| private string _content = string.Empty; | |||||
| [XmlElement(ElementName = "content")] | |||||
| public string Content { | |||||
| get { return _content; } | |||||
| set { _content = value; } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,547 @@ | |||||
| using System; | |||||
| using System.IO; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using System.Xml; | |||||
| using System.Xml.Serialization; | |||||
| using ClassHelper; | |||||
| using Forks.JsonRpc.Client; | |||||
| using Forks.JsonRpc.Client.Data; | |||||
| namespace RpcHelper { | |||||
| public static class RpcHelperUtil {//ambiguous reference | |||||
| private static bool _isInit; | |||||
| public static string InsertFeedPlan(string data) { | |||||
| var logName = DateTime.Today.Date.ToString("yyyyMMdd") + "FeedPlanlog.txt"; | |||||
| var results = new Results(); | |||||
| var path = System.Web.HttpContext.Current.Request.PhysicalApplicationPath; | |||||
| string resultStr; | |||||
| using (var textWriter = new StreamWriter(path + "\\log\\" + logName, true, Encoding.UTF8)) { | |||||
| textWriter.WriteLine("{0} 日计划接口开始接收数据:------------------------------------", DateTime.Now); | |||||
| textWriter.WriteLine(data); | |||||
| Console.WriteLine("{0}:开始接受数据:", DateTime.Now); | |||||
| Console.WriteLine(data); | |||||
| try { | |||||
| var dmo = ParseXmlToMsg<FeedPlans>(data); | |||||
| if (!_isInit) { | |||||
| var url = System.Configuration.ConfigurationManager.AppSettings["url"]; | |||||
| RpcFacade.Init(url, "LiuHeEBS"); | |||||
| _isInit = true; | |||||
| } | |||||
| var username = System.Configuration.ConfigurationManager.AppSettings["username"]; | |||||
| var strPwd = System.Configuration.ConfigurationManager.AppSettings["pwd"]; | |||||
| RpcFacade.Login(username, strPwd); | |||||
| foreach (var bill in dmo.Bills) { | |||||
| var r = new Result(); | |||||
| r.Ebsid = bill.Head.Ebsid; | |||||
| textWriter.WriteLine("开始处理单据:" + r.Ebsid); | |||||
| Console.WriteLine("开始处理单据:" + r.Ebsid); | |||||
| results.SendResult.Add(r); | |||||
| var feedPlan = new RpcObject("/Breed/ChickFeed2_Breed/BO/FeedPlan"); | |||||
| SetString(feedPlan, "OperateType", bill.Head.OperateType); | |||||
| SetString(feedPlan, "PlanNo", bill.Head.Ebsid); | |||||
| SetString(feedPlan, "AccountingUnit_Code", bill.Head.AccountingUnitCode); | |||||
| SetDateTime(feedPlan, "PlanDate", bill.Head.PlanDate); | |||||
| SetDateTime(feedPlan, "ChickTime", bill.Head.ChickTime); | |||||
| SetString(feedPlan, "Remark", bill.Head.Remark); | |||||
| var details = new ManyList("/Breed/ChickFeed2_Breed/BO/FeedPlan_Detail"); | |||||
| foreach (var entry in bill.Body.Entrys) { | |||||
| var detail1 = new RpcObject("/Breed/ChickFeed2_Breed/BO/FeedPlan_Detail"); | |||||
| SetDateTime(detail1, "ChickTime", entry.ChickTime); | |||||
| SetString(detail1, "BreedOrg_Code", entry.BreedOrgCode); | |||||
| SetString(detail1, "BreedUnit_Code", entry.BreedUnitCode); | |||||
| SetString(detail1, "Salesman_Name", entry.Salesman); | |||||
| SetString(detail1, "Chick_Code", entry.ChickCode); | |||||
| SetString(detail1, "HatchFactory_Code", entry.HatchFactoryCode); | |||||
| SetString(detail1, "BreedUnit_Address", entry.BreedAddress); | |||||
| SetString(detail1, "Client", entry.Client); | |||||
| SetString(detail1, "Contact", entry.Contact); | |||||
| SetInt(detail1, "PlanDetailNum", entry.PlanDetailNum); | |||||
| SetDecimal(detail1, "Price", entry.Price); | |||||
| SetLong(detail1, "Contract_ID", entry.ContractID); | |||||
| SetLong(detail1, "LineID", entry.LineID); | |||||
| SetString(detail1, "OperateType", entry.OperateType); | |||||
| details.Add(detail1); | |||||
| } | |||||
| feedPlan.Set("Details", details); | |||||
| try { | |||||
| var id = RpcFacade.Call<long>("/Breed/ChickFeed2_Breed/Rpcs/FeedPlanRpc/Get", feedPlan); | |||||
| if (bill.Head.OperateType == "NEW") { | |||||
| textWriter.WriteLine("成功创建计划No." + id); | |||||
| r.Content = "成功创建计划单No." + id; | |||||
| } else { | |||||
| textWriter.WriteLine("成功操作计划No." + id); | |||||
| r.Content = "成功操作计划No." + id; | |||||
| } | |||||
| r.Resultcode = "0"; | |||||
| r.Bwpid = id.ToString(); | |||||
| } catch (Exception e1) { | |||||
| r.Resultcode = "1"; | |||||
| r.Content = "调用错误,原因:" + e1.Message; | |||||
| textWriter.WriteLine("内部错误:" + e1.Message); | |||||
| Console.WriteLine("内部错误:" + e1.Message); | |||||
| } | |||||
| } | |||||
| } catch (Exception e) { | |||||
| results.Resultcode = "1"; | |||||
| results.Content = "调用错误,原因:" + e.Message; | |||||
| textWriter.WriteLine("内部错误:" + e.Message); | |||||
| Console.WriteLine("内部错误:" + e.Message); | |||||
| } finally { | |||||
| RpcFacade.Logout(); | |||||
| } | |||||
| if (results.SendResult.Count > 0 && results.SendResult.All(x => x.Resultcode == "0")) { | |||||
| results.Resultcode = "0"; | |||||
| } else { | |||||
| results.Resultcode = "1"; | |||||
| } | |||||
| resultStr = ObjToXml(results, Formatting.Indented, Encoding.GetEncoding("gb2312")); | |||||
| textWriter.WriteLine("返回报文:" + resultStr); | |||||
| textWriter.WriteLine("{0} 日计划接口处理完毕 ", DateTime.Now); | |||||
| } | |||||
| return resultStr; | |||||
| } | |||||
| public static string InsertGCB(string data) { | |||||
| var logName = DateTime.Today.Date.ToString("yyyyMMdd") + "GetContractBaillog.txt"; | |||||
| var results = new Results(); | |||||
| var path = System.Web.HttpContext.Current.Request.PhysicalApplicationPath; | |||||
| string resultStr; | |||||
| using (var textWriter = new StreamWriter(path + "\\log\\" + logName, true, Encoding.UTF8)) { | |||||
| textWriter.WriteLine("{0} 收合同保证金接口开始接收数据:------------------------------------", DateTime.Now); | |||||
| textWriter.WriteLine(data); | |||||
| Console.WriteLine("{0}:开始接受数据:", DateTime.Now); | |||||
| Console.WriteLine(data); | |||||
| try { | |||||
| var dmos = ParseXmlToMsg<GetContractBails>(data); | |||||
| if (!_isInit) { | |||||
| var url = System.Configuration.ConfigurationManager.AppSettings["url"]; | |||||
| RpcFacade.Init(url, "LiuHeEBS"); | |||||
| _isInit = true; | |||||
| } | |||||
| var username = System.Configuration.ConfigurationManager.AppSettings["username"]; | |||||
| var strPwd = System.Configuration.ConfigurationManager.AppSettings["pwd"]; | |||||
| RpcFacade.Login(username, strPwd); | |||||
| foreach (var bill in dmos.Bills) { | |||||
| var r = new Result(); | |||||
| r.Ebsid = bill.Head.Ebsid; | |||||
| textWriter.WriteLine("开始处理单据:" + r.Ebsid); | |||||
| Console.WriteLine("开始处理单据:" + r.Ebsid); | |||||
| results.SendResult.Add(r); | |||||
| var dmo = new RpcObject("/Breed/ChickFeed2_Breed/BO/GetContractBail"); | |||||
| SetString(dmo, "AccountingUnit_Code", bill.Head.AccountingUnitCode); | |||||
| SetString(dmo, "Cooperative_Code", bill.Head.CooperativeCode); | |||||
| SetString(dmo, "BreedUnit_Code", bill.Head.BreedUnitCode); | |||||
| SetLong(dmo, "Contract_ID", bill.Head.ContractID); | |||||
| SetDateTime(dmo, "Date", bill.Head.Date); | |||||
| SetString(dmo, "Remark", bill.Head.Remark); | |||||
| SetDecimal(dmo, "GuaranteeMoney", bill.Head.GuaranteeMoney); | |||||
| SetDecimal(dmo, "Money", bill.Head.Money); | |||||
| SetString(dmo, "Staff_Code", bill.Head.StaffCode); | |||||
| SetString(dmo, "ExtCode", bill.Head.Ebsid); | |||||
| try { | |||||
| var id = RpcFacade.Call<long>("/Breed/ChickFeed2_Breed/Rpcs/GetContractBailRpc/Insert", dmo); | |||||
| textWriter.WriteLine("成功创建收合同保证金No." + id); | |||||
| r.Content = "成功创建收合同保证金No." + id; | |||||
| r.Resultcode = "0"; | |||||
| r.Bwpid = id.ToString(); | |||||
| } catch (Exception e1) { | |||||
| r.Resultcode = "1"; | |||||
| r.Content = "调用错误,原因:" + e1.Message; | |||||
| textWriter.WriteLine("内部错误:" + e1.Message); | |||||
| Console.WriteLine("内部错误:" + e1.Message); | |||||
| } | |||||
| } | |||||
| } catch (Exception e) { | |||||
| results.Resultcode = "1"; | |||||
| results.Content = "调用错误,原因:" + e.Message; | |||||
| textWriter.WriteLine("内部错误:" + e.Message); | |||||
| Console.WriteLine("内部错误:" + e.Message); | |||||
| } finally { | |||||
| RpcFacade.Logout(); | |||||
| } | |||||
| if (results.SendResult.Count > 0 && results.SendResult.All(x => x.Resultcode == "0")) { | |||||
| results.Resultcode = "0"; | |||||
| } else { | |||||
| results.Resultcode = "1"; | |||||
| } | |||||
| resultStr = ObjToXml(results, Formatting.Indented, Encoding.GetEncoding("gb2312")); | |||||
| textWriter.WriteLine("返回报文:" + resultStr); | |||||
| textWriter.WriteLine("{0} 收合同保证金接口处理完毕", DateTime.Now); | |||||
| } | |||||
| return resultStr; | |||||
| } | |||||
| public static string InsertBCB(string data) { | |||||
| var logName = DateTime.Today.Date.ToString("yyyyMMdd") + "BackContractBaillog.txt"; | |||||
| var results = new Results(); | |||||
| var path = System.Web.HttpContext.Current.Request.PhysicalApplicationPath; | |||||
| string resultStr; | |||||
| using (var textWriter = new StreamWriter(path + "\\log\\" + logName, true, Encoding.UTF8)) { | |||||
| textWriter.WriteLine("{0} 退合同保证金接口开始接收数据:----------------------------------", DateTime.Now); | |||||
| textWriter.WriteLine(data); | |||||
| Console.WriteLine("{0}:开始接受数据:", DateTime.Now); | |||||
| Console.WriteLine(data); | |||||
| try { | |||||
| var dmos = ParseXmlToMsg<GetContractBails>(data); | |||||
| if (!_isInit) { | |||||
| var url = System.Configuration.ConfigurationManager.AppSettings["url"]; | |||||
| RpcFacade.Init(url, "LiuHeEBS"); | |||||
| _isInit = true; | |||||
| } | |||||
| var username = System.Configuration.ConfigurationManager.AppSettings["username"]; | |||||
| var strPwd = System.Configuration.ConfigurationManager.AppSettings["pwd"]; | |||||
| RpcFacade.Login(username, strPwd); | |||||
| foreach (var bill in dmos.Bills) { | |||||
| var r = new Result(); | |||||
| r.Ebsid = bill.Head.Ebsid; | |||||
| textWriter.WriteLine("开始处理单据:" + r.Ebsid); | |||||
| Console.WriteLine("开始处理单据:" + r.Ebsid); | |||||
| results.SendResult.Add(r); | |||||
| var dmo = new RpcObject("/Breed/ChickFeed2_Breed/BO/BackContractBail"); | |||||
| SetString(dmo, "AccountingUnit_Code", bill.Head.AccountingUnitCode); | |||||
| SetString(dmo, "Cooperative_Code", bill.Head.CooperativeCode); | |||||
| SetString(dmo, "BreedUnit_Code", bill.Head.BreedUnitCode); | |||||
| SetLong(dmo, "Contract_ID", bill.Head.ContractID); | |||||
| SetDateTime(dmo, "Date", bill.Head.Date); | |||||
| SetString(dmo, "Remark", bill.Head.Remark); | |||||
| SetDecimal(dmo, "GuaranteeMoney", bill.Head.GuaranteeMoney); | |||||
| SetDecimal(dmo, "Money", bill.Head.Money); | |||||
| SetString(dmo, "Staff_Code", bill.Head.StaffCode); | |||||
| SetString(dmo, "ExtCode", bill.Head.Ebsid); | |||||
| try { | |||||
| var id = RpcFacade.Call<long>("/Breed/ChickFeed2_Breed/Rpcs/BackContractBailRpc/Insert", dmo); | |||||
| textWriter.WriteLine("成功创建退合同保证金No." + id); | |||||
| r.Content = "成功创建退合同保证金No." + id; | |||||
| r.Resultcode = "0"; | |||||
| r.Bwpid = id.ToString(); | |||||
| } catch (Exception e1) { | |||||
| r.Resultcode = "1"; | |||||
| r.Content = "调用错误,原因:" + e1.Message; | |||||
| textWriter.WriteLine("内部错误:" + e1.Message); | |||||
| Console.WriteLine("内部错误:" + e1.Message); | |||||
| } | |||||
| } | |||||
| } catch (Exception e) { | |||||
| results.Resultcode = "1"; | |||||
| results.Content = "调用错误,原因:" + e.Message; | |||||
| textWriter.WriteLine("内部错误:" + e.Message); | |||||
| Console.WriteLine("内部错误:" + e.Message); | |||||
| } finally { | |||||
| RpcFacade.Logout(); | |||||
| } | |||||
| if (results.SendResult.Count > 0 && results.SendResult.All(x => x.Resultcode == "0")) { | |||||
| results.Resultcode = "0"; | |||||
| } else { | |||||
| results.Resultcode = "1"; | |||||
| } | |||||
| resultStr = ObjToXml(results, Formatting.Indented, Encoding.GetEncoding("gb2312")); | |||||
| textWriter.WriteLine("返回报文:" + resultStr); | |||||
| textWriter.WriteLine("{0} 退合同保证金接口处理完毕", DateTime.Now); | |||||
| } | |||||
| return resultStr; | |||||
| } | |||||
| public static string InsertGoodsSale(string data) { | |||||
| var logName = DateTime.Today.Date.ToString("yyyyMMdd") + "FeedGoodsSalelog.txt"; | |||||
| var results = new Results(); | |||||
| var path = System.Web.HttpContext.Current.Request.PhysicalApplicationPath; | |||||
| string resultStr; | |||||
| using (var textWriter = new StreamWriter(path + "\\log\\" + logName, true, Encoding.UTF8)) { | |||||
| textWriter.WriteLine("{0} 饲料养殖户销售接口开始接收数据:----------------------------------", DateTime.Now); | |||||
| textWriter.WriteLine(data); | |||||
| Console.WriteLine("{0}:开始接受数据:", DateTime.Now); | |||||
| Console.WriteLine(data); | |||||
| try { | |||||
| var dmos = ParseXmlToMsg<FeedGoodsSales>(data); | |||||
| if (!_isInit) { | |||||
| var url = System.Configuration.ConfigurationManager.AppSettings["url"]; | |||||
| RpcFacade.Init(url, "LiuHeEBS"); | |||||
| _isInit = true; | |||||
| } | |||||
| var username = System.Configuration.ConfigurationManager.AppSettings["username"]; | |||||
| var strPwd = System.Configuration.ConfigurationManager.AppSettings["pwd"]; | |||||
| RpcFacade.Login(username, strPwd); | |||||
| foreach (var bill in dmos.Bills) { | |||||
| var r = new Result(); | |||||
| r.Ebsid = bill.Head.Ebsid; | |||||
| textWriter.WriteLine("开始处理单据:" + r.Ebsid); | |||||
| Console.WriteLine("开始处理单据:" + r.Ebsid); | |||||
| results.SendResult.Add(r); | |||||
| var dmo = new RpcObject("/Breed/ChickFeed2_Breed/BO/FeedGoodsSale"); | |||||
| SetString(dmo, "AccountingUnit_Code", bill.Head.AccountingUnitCode); | |||||
| SetString(dmo, "BreedUnit_Code", bill.Head.BreedUnitCode); | |||||
| SetDateTime(dmo, "SaleDate", bill.Head.SaleDate); | |||||
| SetDateTime(dmo, "OutStoreDate", bill.Head.OutDate); | |||||
| SetLong(dmo, "Contract_ID", bill.Head.ContractID); | |||||
| SetString(dmo, "Remark", bill.Head.Remark); | |||||
| SetLong(dmo, "SaleType_ID", bill.Head.SaleType); | |||||
| SetString(dmo, "Store_Code", bill.Head.StoreCode); | |||||
| SetString(dmo, "Staff_Code", bill.Head.StaffCode); | |||||
| SetString(dmo, "OutData", bill.Head.Ebsid); | |||||
| var details = new ManyList("/Breed/ChickFeed2_Breed/BO/FeedGoodsSale_Detail"); | |||||
| foreach (var entry in bill.Body.Entrys) { | |||||
| var detail1 = new RpcObject("/Breed/ChickFeed2_Breed/BO/FeedGoodsSale_Detail"); | |||||
| SetString(detail1, "Goods_Code", entry.GoodsCode); | |||||
| if (!string.IsNullOrEmpty(entry.ContractID)) | |||||
| SetLong(detail1, "Contract_ID", entry.ContractID); | |||||
| else | |||||
| SetLong(detail1, "Contract_ID", bill.Head.ContractID); | |||||
| SetDecimal(detail1, "Price", entry.Price); | |||||
| SetDecimal(detail1, "Money", entry.Money); | |||||
| SetDecimal(detail1, "MainNum", entry.Number); | |||||
| SetDecimal(detail1, "SecondNum", entry.SecNumber); | |||||
| details.Add(detail1); | |||||
| } | |||||
| dmo.Set("Details", details); | |||||
| try { | |||||
| var id = RpcFacade.Call<long>("/Breed/ChickFeed2_Breed/Rpcs/FeedGoodsSaleRpc/NewInsert", dmo); | |||||
| textWriter.WriteLine("成功创建饲料养殖户销售No." + id); | |||||
| r.Content = "成功创建饲料养殖户销售No." + id; | |||||
| r.Resultcode = "0"; | |||||
| r.Bwpid = id.ToString(); | |||||
| } catch (Exception e1) { | |||||
| r.Resultcode = "1"; | |||||
| r.Content = "调用错误,原因:" + e1.Message; | |||||
| textWriter.WriteLine("内部错误:" + e1.Message); | |||||
| Console.WriteLine("内部错误:" + e1.Message); | |||||
| } | |||||
| } | |||||
| } catch (Exception e) { | |||||
| results.Resultcode = "1"; | |||||
| results.Content = "调用错误,原因:" + e.Message; | |||||
| textWriter.WriteLine("内部错误:" + e.Message); | |||||
| Console.WriteLine("内部错误:" + e.Message); | |||||
| } finally { | |||||
| RpcFacade.Logout(); | |||||
| } | |||||
| if (results.SendResult.Count > 0 && results.SendResult.All(x => x.Resultcode == "0")) { | |||||
| results.Resultcode = "0"; | |||||
| } else { | |||||
| results.Resultcode = "1"; | |||||
| } | |||||
| resultStr = ObjToXml(results, Formatting.Indented, Encoding.GetEncoding("gb2312")); | |||||
| textWriter.WriteLine("返回报文:" + resultStr); | |||||
| textWriter.WriteLine("{0} 饲料养殖户销售接口处理完毕", DateTime.Now); | |||||
| } | |||||
| return resultStr; | |||||
| } | |||||
| public static string UpdateGoodsSale(string data) { | |||||
| var logName = DateTime.Today.Date.ToString("yyyyMMdd") + "FeedGoodsSalelog.txt"; | |||||
| var results = new Results(); | |||||
| results.Content = null; | |||||
| var path = System.Web.HttpContext.Current.Request.PhysicalApplicationPath; | |||||
| string resultStr; | |||||
| using (var textWriter = new StreamWriter(path + "\\log\\" + logName, true, Encoding.UTF8)) { | |||||
| textWriter.WriteLine("{0} 饲料养殖户销售接口开始接收数据:----------------------------------", DateTime.Now); | |||||
| textWriter.WriteLine(data); | |||||
| try { | |||||
| var dmos = ParseXmlToMsg<FeedGoodsSales>(data); | |||||
| if (!_isInit) { | |||||
| var url = System.Configuration.ConfigurationManager.AppSettings["url"]; | |||||
| RpcFacade.Init(url, "LiuHeEBS"); | |||||
| _isInit = true; | |||||
| } | |||||
| var username = System.Configuration.ConfigurationManager.AppSettings["username"]; | |||||
| var strPwd = System.Configuration.ConfigurationManager.AppSettings["pwd"]; | |||||
| RpcFacade.Login(username, strPwd); | |||||
| foreach (var bill in dmos.Bills) { | |||||
| textWriter.WriteLine("开始处理单据:" + bill.Head.Ebsid); | |||||
| if (string.IsNullOrEmpty(bill.Head.Ebsid)) | |||||
| bill.Head.Ebsid = null; | |||||
| var dmo = new RpcObject("/Breed/ChickFeed2_Breed/BO/FeedGoodsSale"); | |||||
| var details = new ManyList("/Breed/ChickFeed2_Breed/BO/FeedGoodsSale_Detail"); | |||||
| foreach (var entry in bill.Body.Entrys) { | |||||
| var detail1 = new RpcObject("/Breed/ChickFeed2_Breed/BO/FeedGoodsSale_Detail"); | |||||
| SetLong(detail1, "SourceDetailID", entry.SourceDetailID); | |||||
| SetDecimal(detail1, "Price", entry.Price); | |||||
| SetDecimal(detail1, "Money", entry.Money); | |||||
| SetDecimal(detail1, "MainNum", entry.Number); | |||||
| SetDecimal(detail1, "SecondNum", entry.SecNumber); | |||||
| SetDateTime(detail1, "OutDate", entry.OutDate); | |||||
| details.Add(detail1); | |||||
| } | |||||
| dmo.Set("Details", details); | |||||
| try { | |||||
| var obj = RpcFacade.Call<object>("/Breed/LiuHeModule/Rpcs/FeedGoodsSaleRpc/Update", dmo); | |||||
| var tuples = Util.GetTuple(obj); | |||||
| foreach (var tuple in tuples) { | |||||
| var r = new Result(); | |||||
| r.Ebsid = bill.Head.Ebsid; | |||||
| r.Content = tuple.Item1; | |||||
| r.Resultcode = tuple.Item3 ? "0" : "1"; | |||||
| r.Bwpid = null; | |||||
| r.SourceDetailID = tuple.Item2.ToString(); | |||||
| results.SendResult.Add(r); | |||||
| } | |||||
| //var tupls = obj as Tuple<string, long, bool>; | |||||
| } catch (Exception e1) { | |||||
| var r = new Result(); | |||||
| r.Resultcode = "1"; | |||||
| r.Content = "调用错误,原因:" + e1.Message; | |||||
| results.SendResult.Add(r); | |||||
| textWriter.WriteLine("内部错误:" + e1.Message); | |||||
| } | |||||
| } | |||||
| } catch (Exception e) { | |||||
| results.Resultcode = "1"; | |||||
| results.Content = "调用错误,原因:" + e.Message; | |||||
| textWriter.WriteLine("内部错误:" + e.Message); | |||||
| } finally { | |||||
| RpcFacade.Logout(); | |||||
| } | |||||
| if (results.SendResult.Count > 0 && results.SendResult.All(x => x.Resultcode == "0")) { | |||||
| results.Resultcode = "0"; | |||||
| } else { | |||||
| results.Resultcode = "1"; | |||||
| } | |||||
| resultStr = ObjToXml(results, Formatting.Indented, Encoding.GetEncoding("gb2312")); | |||||
| textWriter.WriteLine("返回报文:" + resultStr); | |||||
| textWriter.WriteLine("{0} 饲料养殖户销售接口处理完毕", DateTime.Now); | |||||
| } | |||||
| return resultStr; | |||||
| } | |||||
| private static void SetLong(RpcObject rpcObject, string name, string value) { | |||||
| if (!string.IsNullOrEmpty(value)) { | |||||
| rpcObject.Set(name, long.Parse(value)); | |||||
| } | |||||
| } | |||||
| private static void SetDateTime(RpcObject rpcObject, string name, string value) { | |||||
| if (!string.IsNullOrEmpty(value)) { | |||||
| rpcObject.Set(name, Convert.ToDateTime(value)); | |||||
| } | |||||
| } | |||||
| private static void SetDecimal(RpcObject rpcObject, string name, string value) { | |||||
| if (!string.IsNullOrEmpty(value)) { | |||||
| rpcObject.Set(name, decimal.Parse(value)); | |||||
| } | |||||
| } | |||||
| private static void SetInt(RpcObject rpcObject, string name, string value) { | |||||
| if (!string.IsNullOrEmpty(value)) { | |||||
| rpcObject.Set(name, int.Parse(value)); | |||||
| } | |||||
| } | |||||
| private static void SetShort(RpcObject rpcObject, string name, string value) { | |||||
| if (!string.IsNullOrEmpty(value)) { | |||||
| rpcObject.Set(name, short.Parse(value)); | |||||
| } | |||||
| } | |||||
| private static void SetString(RpcObject rpcObject, string name, string value) { | |||||
| if (!string.IsNullOrEmpty(value)) { | |||||
| rpcObject.Set(name, value); | |||||
| } | |||||
| } | |||||
| public static T ParseXmlToMsg<T>(string xml) { | |||||
| using (TextReader reader = new StringReader(xml)) { | |||||
| return (T)new XmlSerializer(typeof(T)).Deserialize(reader); | |||||
| } | |||||
| } | |||||
| public static string ObjToXml(object obj, Formatting formatting, Encoding encoding) { | |||||
| using (var stream = new MemoryStream()) { | |||||
| using (var writer = new XmlTextWriter(stream, encoding)) { | |||||
| writer.Formatting = formatting; | |||||
| writer.IndentChar = '\t'; | |||||
| var ns = new XmlSerializerNamespaces(); | |||||
| ns.Add(string.Empty, string.Empty); | |||||
| new XmlSerializer(obj.GetType()).Serialize(writer, obj, ns); | |||||
| } | |||||
| return encoding.GetString(stream.ToArray()); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,83 @@ | |||||
| <?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)' == '' ">AnyCPU</Platform> | |||||
| <ProductVersion>8.0.30703</ProductVersion> | |||||
| <SchemaVersion>2.0</SchemaVersion> | |||||
| <ProjectGuid>{B9E23023-B831-4853-8384-9E33B75BE70C}</ProjectGuid> | |||||
| <OutputType>Library</OutputType> | |||||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||||
| <RootNamespace>RpcHelper</RootNamespace> | |||||
| <AssemblyName>RpcHelper</AssemblyName> | |||||
| <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | |||||
| <FileAlignment>512</FileAlignment> | |||||
| </PropertyGroup> | |||||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
| <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' "> | |||||
| <DebugType>pdbonly</DebugType> | |||||
| <Optimize>true</Optimize> | |||||
| <OutputPath>bin\Release\</OutputPath> | |||||
| <DefineConstants>TRACE</DefineConstants> | |||||
| <ErrorReport>prompt</ErrorReport> | |||||
| <WarningLevel>4</WarningLevel> | |||||
| </PropertyGroup> | |||||
| <ItemGroup> | |||||
| <Reference Include="Forks.Json.cf"> | |||||
| <HintPath>..\..\..\..\Projects\tsref\release\Compact\Forks.Json.cf.dll</HintPath> | |||||
| </Reference> | |||||
| <Reference Include="Forks.JsonRpc.Client.cf"> | |||||
| <HintPath>..\..\..\..\Projects\tsref\release\Compact\Forks.JsonRpc.Client.cf.dll</HintPath> | |||||
| </Reference> | |||||
| <Reference Include="System" /> | |||||
| <Reference Include="System.configuration" /> | |||||
| <Reference Include="System.Core" /> | |||||
| <Reference Include="System.Web" /> | |||||
| <Reference Include="System.Windows.Forms" /> | |||||
| <Reference Include="System.Xml.Linq" /> | |||||
| <Reference Include="System.Data.DataSetExtensions" /> | |||||
| <Reference Include="Microsoft.CSharp" /> | |||||
| <Reference Include="System.Data" /> | |||||
| <Reference Include="System.Xml" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <Compile Include="FeedGoodsSale.cs" /> | |||||
| <Compile Include="FeedGoodsSaleBody.cs" /> | |||||
| <Compile Include="FeedGoodsSaleHead.cs" /> | |||||
| <Compile Include="FeedGoodsSales.cs" /> | |||||
| <Compile Include="GetContractBail.cs" /> | |||||
| <Compile Include="GetContractBailHead.cs" /> | |||||
| <Compile Include="GetContractBails.cs" /> | |||||
| <Compile Include="RpcHelper.cs" /> | |||||
| <Compile Include="FeedPlan.cs" /> | |||||
| <Compile Include="FeedPlanBody.cs" /> | |||||
| <Compile Include="FeedPlanBodyEntry.cs" /> | |||||
| <Compile Include="FeedPlanHead.cs" /> | |||||
| <Compile Include="FeedPlans.cs" /> | |||||
| <Compile Include="IRpcHelper.cs" /> | |||||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||||
| <Compile Include="Results.cs" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <ProjectReference Include="..\..\ClassHelper\ClassHelper.csproj"> | |||||
| <Project>{88FAE8C1-BA9B-47DF-B92E-F7AA4A081B84}</Project> | |||||
| <Name>ClassHelper</Name> | |||||
| </ProjectReference> | |||||
| </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,301 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Text; | |||||
| using System.Text.RegularExpressions; | |||||
| using System.Xml; | |||||
| using System.Xml.Serialization; | |||||
| using Forks.JsonRpc.Client; | |||||
| using Forks.JsonRpc.Client.Data; | |||||
| using RpcHelper; | |||||
| using Test.RpcWeb1; | |||||
| namespace Test { | |||||
| internal class Program { | |||||
| private static void Main(string[] args) { | |||||
| RpcFacade.Init("http://finance.food988.com/", "B3Finance"); | |||||
| var username ="system"; | |||||
| var strPwd = ""; | |||||
| RpcFacade.Login(username, strPwd); | |||||
| var applyForCredit = new RpcObject("/MainSystem/B3AFinance/BO/ApplyForCreditObject"); | |||||
| RpcFacade.Call<object>("/MainSystem/B3AFinance/Rpcs/B3Interface/ApplyForCreditObject", applyForCredit); | |||||
| //var web = new Service(); | |||||
| //var xml = InsertGCB(web); | |||||
| //Console.WriteLine(xml); | |||||
| Console.Read(); | |||||
| } | |||||
| public static string GetBase64(string value) { | |||||
| var encode = System.Text.Encoding.UTF8; | |||||
| byte[] bytedata = encode.GetBytes(value); | |||||
| return Convert.ToBase64String(bytedata, 0, bytedata.Length); | |||||
| } | |||||
| private static string InsertPlan(Service web) | |||||
| { | |||||
| var o = new FeedPlans(); | |||||
| var bill = new FeedPlan(); | |||||
| bill.Head.AccountingUnitCode = "0036"; | |||||
| bill.Head.ChickTime = "2015-10-11"; | |||||
| bill.Head.Ebsid = "H0120151001"; | |||||
| bill.Head.PlanDate = "2015-10-11"; | |||||
| bill.Head.Remark = "测试单据"; | |||||
| //bill.Head.OperateType = "NEW"; | |||||
| var detail = new FeedPlanBodyEntry(); | |||||
| detail.BreedAddress = "山东省青岛市平度市崔家集镇五里屯"; | |||||
| detail.BreedOrgCode = "HN321"; | |||||
| detail.BreedUnitCode = "0002X"; | |||||
| detail.ChickCode = "1001"; | |||||
| detail.Client = "张三1"; | |||||
| detail.Contact = "13100100101"; | |||||
| detail.ContractID = "1581"; | |||||
| detail.Price = "1.7"; | |||||
| detail.PlanDetailNum = "105"; | |||||
| detail.LineID = "21"; | |||||
| detail.HatchFactoryCode = "A4012"; | |||||
| detail.OperateType = "CANCEL"; | |||||
| bill.Body.Entrys.Add(detail); | |||||
| o.Bills.Add(bill); | |||||
| var data = RpcHelperUtil.ObjToXml(o, Formatting.Indented, Encoding.GetEncoding("gb2312")); | |||||
| //var xx = RpcHelper.ParseXmlToMsg<FeedPlans>(data); | |||||
| Console.WriteLine(data); | |||||
| //web.Url = "http://203.86.48.90:81/bwprpc/Service.asmx"; | |||||
| // web.Url = "http://192.168.1.2/bwprpc/Service.asmx"; | |||||
| web.Url = "http://localhost:2100/bwprpc/Service.asmx"; | |||||
| var xml = web.InsertFeedPlan(data); | |||||
| return xml; | |||||
| } | |||||
| private static string InsertGCB(Service web) | |||||
| { | |||||
| var o = new GetContractBails(); | |||||
| var bill = new GetContractBail(); | |||||
| bill.Head.AccountingUnitCode = ""; | |||||
| bill.Head.BreedUnitCode = "372330196908126699"; | |||||
| bill.Head.Date = "2016-05-09"; | |||||
| bill.Head.Ebsid = "GJE001201605050023"; | |||||
| bill.Head.Money = "321313"; | |||||
| bill.Head.Remark = "测试单据"; | |||||
| bill.Head.CooperativeCode = "D07"; | |||||
| o.Bills.Add(bill); | |||||
| var data = RpcHelperUtil.ObjToXml(o, Formatting.Indented, Encoding.GetEncoding("gb2312")); | |||||
| //var xx = RpcHelper.ParseXmlToMsg<FeedPlans>(data); | |||||
| // http://60.209.128.150:8000/B2/default.aspx | |||||
| Console.WriteLine(data); | |||||
| //web.Url = "http://203.86.48.90:81/bwprpc/Service.asmx"; | |||||
| // web.Url = "http://192.168.1.2/bwprpc/Service.asmx"; | |||||
| web.Url = "http://60.209.128.150:8000/bwpweb/Service.asmx"; | |||||
| var xml = web.InsertGCB(data); | |||||
| return xml; | |||||
| } | |||||
| private static string InsertGoodsSale(Service web) | |||||
| { | |||||
| var o = new FeedGoodsSales(); | |||||
| var bill = new FeedGoodsSale(); | |||||
| bill.Head.AccountingUnitCode = "0036"; | |||||
| bill.Head.SaleDate = "2015-10-11"; | |||||
| bill.Head.Ebsid = "H0120151001"; | |||||
| bill.Head.StoreCode = "1000"; | |||||
| bill.Head.Remark = "测试单据"; | |||||
| bill.Head.BreedUnitCode = "0002X"; | |||||
| var detail = new FeedGoodsSaleEntry(); | |||||
| detail.GoodsCode = "0009"; | |||||
| detail.Price = "0.5"; | |||||
| detail.Money = "50"; | |||||
| detail.Number = "100"; | |||||
| detail.SecNumber = "40"; | |||||
| detail.LineID = "21"; | |||||
| bill.Body.Entrys.Add(detail); | |||||
| o.Bills.Add(bill); | |||||
| var data = RpcHelperUtil.ObjToXml(o, Formatting.Indented, Encoding.GetEncoding("gb2312")); | |||||
| //var xx = RpcHelper.ParseXmlToMsg<FeedPlans>(data); | |||||
| Console.WriteLine(data); | |||||
| //web.Url = "http://203.86.48.90:81/bwprpc/Service.asmx"; | |||||
| // web.Url = "http://192.168.1.2/bwprpc/Service.asmx"; | |||||
| web.Url = "http://192.168.1.158:2100/bwprpc/Service.asmx"; | |||||
| var xml = web.InsertGoodsSale(data); | |||||
| return xml; | |||||
| } | |||||
| private static string UpdateGoodsSale(Service web) | |||||
| { | |||||
| var o = new FeedGoodsSales(); | |||||
| var bill = new FeedGoodsSale(); | |||||
| var detail = new FeedGoodsSaleEntry(); | |||||
| detail. SourceDetailID = "265"; | |||||
| detail.Price = "0.5"; | |||||
| detail.Money = "50"; | |||||
| detail.Number = "104"; | |||||
| detail.SecNumber = "40"; | |||||
| detail.LineID = "21"; | |||||
| bill.Body.Entrys.Add(detail); | |||||
| var detail2 = new FeedGoodsSaleEntry(); | |||||
| detail2.SourceDetailID = "266"; | |||||
| detail2.Price = "0.5"; | |||||
| detail2.Money = "50"; | |||||
| detail2.Number = "100"; | |||||
| detail2.SecNumber = "40"; | |||||
| detail2.OutDate="2015-10-10"; | |||||
| bill.Head.OutDate = "2015-10-10"; | |||||
| bill.Body.Entrys.Add(detail2); | |||||
| o.Bills.Add(bill); | |||||
| var data = RpcHelperUtil.ObjToXml(o, Formatting.Indented, Encoding.GetEncoding("gb2312")); | |||||
| //var xx = RpcHelper.ParseXmlToMsg<FeedPlans>(data); | |||||
| Console.WriteLine(data); | |||||
| //// web.Url = "http://localhost:7620/Web/Service.asmx"; | |||||
| // web.Url = "http://60.209.128.150:8000/bwpweb/Service.asmx"; | |||||
| // // web.Url = "http://192.168.1.2/bwprpc/Service.asmx"; | |||||
| // // web.Url = "http://192.168.1.158:2100/bwprpc/Service.asmx"; | |||||
| // var xml = web.UpdateGoodsSale(data); | |||||
| return ""; | |||||
| } | |||||
| } | |||||
| [XmlRoot(ElementName = "DATA")] | |||||
| public class EbsProviderResultData { | |||||
| [XmlElement(ElementName = "HEADER")] | |||||
| public List<EbsProviderResultHeader> Header { get; set; } | |||||
| } | |||||
| public class EbsProviderResultHeader { | |||||
| private string _sourceFlg = string.Empty; | |||||
| [XmlElement(ElementName = "SOURCE_FLG")] | |||||
| public string SourceFlg { | |||||
| get { return _sourceFlg; } | |||||
| set { _sourceFlg = value; } | |||||
| } | |||||
| private string _sourceID = string.Empty; | |||||
| [XmlElement(ElementName = "SOURCE_ID")] | |||||
| public string SourceID { | |||||
| get { return _sourceID; } | |||||
| set { _sourceID = value; } | |||||
| } | |||||
| private string _mdmID = string.Empty; | |||||
| [XmlElement(ElementName = "MDM_ID")] | |||||
| public string MdmID { | |||||
| get { return _mdmID; } | |||||
| set { _mdmID = value; } | |||||
| } | |||||
| private string _creationDate = string.Empty; | |||||
| [XmlElement(ElementName = "CREATION_DATE")] | |||||
| public string CreationDate { | |||||
| get { return _creationDate; } | |||||
| set { _creationDate = value; } | |||||
| } | |||||
| private string _vendorName = string.Empty; | |||||
| [XmlElement(ElementName = "VENDOR_NAME")] | |||||
| public string VendorName { | |||||
| get { return _vendorName; } | |||||
| set { _vendorName = value; } | |||||
| } | |||||
| private string _vendorNameAlt = string.Empty; | |||||
| [XmlElement(ElementName = "VENDOR_NAME_ALT")] | |||||
| public string VendorNameAlt { | |||||
| get { return _vendorNameAlt; } | |||||
| set { _vendorNameAlt = value; } | |||||
| } | |||||
| private string _name = string.Empty; | |||||
| [XmlElement(ElementName = "NAME")] | |||||
| public string Name { | |||||
| get { return _name; } | |||||
| set { _name = value; } | |||||
| } | |||||
| private string _jyName = string.Empty; | |||||
| [XmlElement(ElementName = "JY_NAME")] | |||||
| public string JyName { | |||||
| get { return _jyName; } | |||||
| set { _jyName = value; } | |||||
| } | |||||
| private string _gxName = string.Empty; | |||||
| [XmlElement(ElementName = "GX_NAME")] | |||||
| public string GxName { | |||||
| get { return _gxName; } | |||||
| set { _gxName = value; } | |||||
| } | |||||
| private string _zyName = string.Empty; | |||||
| [XmlElement(ElementName = "ZY_NAME")] | |||||
| public string ZyName { | |||||
| get { return _zyName; } | |||||
| set { _zyName = value; } | |||||
| } | |||||
| private string _principalName = string.Empty; | |||||
| [XmlElement(ElementName = "PRINCIPAL_NAME")] | |||||
| public string PrincipalName { | |||||
| get { return _principalName; } | |||||
| set { _principalName = value; } | |||||
| } | |||||
| private string _address1 = string.Empty; | |||||
| [XmlElement(ElementName = "ADDRESS1")] | |||||
| public string Address1 { | |||||
| get { return _address1; } | |||||
| set { _address1 = value; } | |||||
| } | |||||
| private string _vendorType = string.Empty; | |||||
| [XmlElement(ElementName = "VENDOR_TYPE")] | |||||
| public string VendorType { | |||||
| get { return _vendorType; } | |||||
| set { _vendorType = value; } | |||||
| } | |||||
| private string _employeeNumber = string.Empty; | |||||
| [XmlElement(ElementName = "EMPLOYEE_NUMBER")] | |||||
| public string EmployeeNumber { | |||||
| get { return _employeeNumber; } | |||||
| set { _employeeNumber = value; } | |||||
| } | |||||
| private string _taxReference = string.Empty; | |||||
| [XmlElement(ElementName = "TAX_REFERENCE")] | |||||
| public string TaxReference { | |||||
| get { return _taxReference; } | |||||
| set { _taxReference = value; } | |||||
| } | |||||
| private string _vendJd = string.Empty; | |||||
| [XmlElement(ElementName = "VEND_JD")] | |||||
| public string VendJd { | |||||
| get { return _vendJd; } | |||||
| set { _vendJd = value; } | |||||
| } | |||||
| private string _vendWd = string.Empty; | |||||
| [XmlElement(ElementName = "VEND_WD")] | |||||
| public string VendWd { | |||||
| get { return _vendWd; } | |||||
| set { _vendWd = value; } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,36 @@ | |||||
| using System.Reflection; | |||||
| using System.Runtime.CompilerServices; | |||||
| using System.Runtime.InteropServices; | |||||
| // 有关程序集的常规信息通过以下 | |||||
| // 特性集控制。更改这些特性值可修改 | |||||
| // 与程序集关联的信息。 | |||||
| [assembly: AssemblyTitle("Test")] | |||||
| [assembly: AssemblyDescription("")] | |||||
| [assembly: AssemblyConfiguration("")] | |||||
| [assembly: AssemblyCompany("Microsoft")] | |||||
| [assembly: AssemblyProduct("Test")] | |||||
| [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] | |||||
| [assembly: AssemblyTrademark("")] | |||||
| [assembly: AssemblyCulture("")] | |||||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||||
| // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, | |||||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||||
| [assembly: ComVisible(false)] | |||||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||||
| [assembly: Guid("3ffe4f14-5fc1-4424-8f33-cdd224cae724")] | |||||
| // 程序集的版本信息由下面四个值组成: | |||||
| // | |||||
| // 主版本 | |||||
| // 次版本 | |||||
| // 内部版本号 | |||||
| // 修订号 | |||||
| // | |||||
| // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, | |||||
| // 方法是按如下所示使用“*”: | |||||
| // [assembly: AssemblyVersion("1.0.*")] | |||||
| [assembly: AssemblyVersion("1.0.0.0")] | |||||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||||
| @ -0,0 +1,36 @@ | |||||
| //------------------------------------------------------------------------------ | |||||
| // <auto-generated> | |||||
| // 此代码由工具生成。 | |||||
| // 运行时版本:4.0.30319.2012 | |||||
| // | |||||
| // 对此文件的更改可能会导致不正确的行为,并且如果 | |||||
| // 重新生成代码,这些更改将会丢失。 | |||||
| // </auto-generated> | |||||
| //------------------------------------------------------------------------------ | |||||
| namespace Test.Properties { | |||||
| [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |||||
| [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.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; | |||||
| } | |||||
| } | |||||
| [global::System.Configuration.ApplicationScopedSettingAttribute()] | |||||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |||||
| [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] | |||||
| [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:2100/bwprpc/Service.asmx")] | |||||
| public string Test_RpcWeb1_Service { | |||||
| get { | |||||
| return ((string)(this["Test_RpcWeb1_Service"])); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,9 @@ | |||||
| <?xml version='1.0' encoding='utf-8'?> | |||||
| <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Test.Properties" GeneratedClassName="Settings"> | |||||
| <Profiles /> | |||||
| <Settings> | |||||
| <Setting Name="Test_RpcWeb1_Service" Type="(Web Service URL)" Scope="Application"> | |||||
| <Value Profile="(Default)">http://localhost:2100/bwprpc/Service.asmx</Value> | |||||
| </Setting> | |||||
| </Settings> | |||||
| </SettingsFile> | |||||
| @ -0,0 +1,114 @@ | |||||
| <?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>{96422879-4D58-4F13-9BC7-FC102730068E}</ProjectGuid> | |||||
| <OutputType>Exe</OutputType> | |||||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||||
| <RootNamespace>Test</RootNamespace> | |||||
| <AssemblyName>Test</AssemblyName> | |||||
| <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | |||||
| <TargetFrameworkProfile> | |||||
| </TargetFrameworkProfile> | |||||
| <FileAlignment>512</FileAlignment> | |||||
| </PropertyGroup> | |||||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | |||||
| <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|x86' "> | |||||
| <PlatformTarget>x86</PlatformTarget> | |||||
| <DebugType>pdbonly</DebugType> | |||||
| <Optimize>true</Optimize> | |||||
| <OutputPath>bin\Release\</OutputPath> | |||||
| <DefineConstants>TRACE</DefineConstants> | |||||
| <ErrorReport>prompt</ErrorReport> | |||||
| <WarningLevel>4</WarningLevel> | |||||
| </PropertyGroup> | |||||
| <ItemGroup> | |||||
| <Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||||
| <SpecificVersion>False</SpecificVersion> | |||||
| <HintPath>E:\BWPB3\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath> | |||||
| </Reference> | |||||
| <Reference Include="System" /> | |||||
| <Reference Include="System.Core" /> | |||||
| <Reference Include="System.EnterpriseServices" /> | |||||
| <Reference Include="System.Web.Services" /> | |||||
| <Reference Include="System.Xml.Linq" /> | |||||
| <Reference Include="System.Data.DataSetExtensions" /> | |||||
| <Reference Include="Microsoft.CSharp" /> | |||||
| <Reference Include="System.Data" /> | |||||
| <Reference Include="System.Xml" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <Compile Include="Program.cs" /> | |||||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||||
| <Compile Include="Properties\Settings.Designer.cs"> | |||||
| <AutoGen>True</AutoGen> | |||||
| <DesignTimeSharedInput>True</DesignTimeSharedInput> | |||||
| <DependentUpon>Settings.settings</DependentUpon> | |||||
| </Compile> | |||||
| <Compile Include="Web References\RpcWeb1\Reference.cs"> | |||||
| <AutoGen>True</AutoGen> | |||||
| <DesignTime>True</DesignTime> | |||||
| <DependentUpon>Reference.map</DependentUpon> | |||||
| </Compile> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <ProjectReference Include="..\RpcHelper\RpcHelper\RpcHelper.csproj"> | |||||
| <Project>{B9E23023-B831-4853-8384-9E33B75BE70C}</Project> | |||||
| <Name>RpcHelper</Name> | |||||
| </ProjectReference> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <None Include="app.config" /> | |||||
| <None Include="Properties\Settings.settings"> | |||||
| <Generator>SettingsSingleFileGenerator</Generator> | |||||
| <LastGenOutput>Settings.Designer.cs</LastGenOutput> | |||||
| </None> | |||||
| <None Include="Web References\RpcWeb1\Reference.map"> | |||||
| <Generator>MSDiscoCodeGenerator</Generator> | |||||
| <LastGenOutput>Reference.cs</LastGenOutput> | |||||
| </None> | |||||
| <None Include="Web References\RpcWeb1\Service.wsdl" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <WCFMetadata Include="Service References\" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <WebReferences Include="Web References\" /> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <WebReferenceUrl Include="http://localhost:2100/bwprpc/Service.asmx"> | |||||
| <UrlBehavior>Dynamic</UrlBehavior> | |||||
| <RelPath>Web References\RpcWeb1\</RelPath> | |||||
| <UpdateFromURL>http://localhost:2100/bwprpc/Service.asmx</UpdateFromURL> | |||||
| <ServiceLocationURL> | |||||
| </ServiceLocationURL> | |||||
| <CachedDynamicPropName> | |||||
| </CachedDynamicPropName> | |||||
| <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName> | |||||
| <CachedSettingsPropName>Test_RpcWeb1_Service</CachedSettingsPropName> | |||||
| </WebReferenceUrl> | |||||
| </ItemGroup> | |||||
| <ItemGroup> | |||||
| <None Include="Web References\RpcWeb1\Service.disco" /> | |||||
| </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,390 @@ | |||||
| //------------------------------------------------------------------------------ | |||||
| // <auto-generated> | |||||
| // 此代码由工具生成。 | |||||
| // 运行时版本:4.0.30319.2012 | |||||
| // | |||||
| // 对此文件的更改可能会导致不正确的行为,并且如果 | |||||
| // 重新生成代码,这些更改将会丢失。 | |||||
| // </auto-generated> | |||||
| //------------------------------------------------------------------------------ | |||||
| // | |||||
| // 此源代码是由 Microsoft.VSDesigner 4.0.30319.2012 版自动生成。 | |||||
| // | |||||
| #pragma warning disable 1591 | |||||
| namespace Test.RpcWeb1 { | |||||
| using System; | |||||
| using System.Web.Services; | |||||
| using System.Diagnostics; | |||||
| using System.Web.Services.Protocols; | |||||
| using System.ComponentModel; | |||||
| using System.Xml.Serialization; | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| [System.Diagnostics.DebuggerStepThroughAttribute()] | |||||
| [System.ComponentModel.DesignerCategoryAttribute("code")] | |||||
| [System.Web.Services.WebServiceBindingAttribute(Name="ServiceSoap", Namespace="http://tempuri.org/")] | |||||
| public partial class Service : System.Web.Services.Protocols.SoapHttpClientProtocol { | |||||
| private System.Threading.SendOrPostCallback InsertFeedPlanOperationCompleted; | |||||
| private System.Threading.SendOrPostCallback InsertGCBOperationCompleted; | |||||
| private System.Threading.SendOrPostCallback InsertBCBOperationCompleted; | |||||
| private System.Threading.SendOrPostCallback InsertGoodsSaleOperationCompleted; | |||||
| private System.Threading.SendOrPostCallback UpdateGoodsSaleOperationCompleted; | |||||
| private bool useDefaultCredentialsSetExplicitly; | |||||
| /// <remarks/> | |||||
| public Service() { | |||||
| this.Url = global::Test.Properties.Settings.Default.Test_RpcWeb1_Service; | |||||
| if ((this.IsLocalFileSystemWebService(this.Url) == true)) { | |||||
| this.UseDefaultCredentials = true; | |||||
| this.useDefaultCredentialsSetExplicitly = false; | |||||
| } | |||||
| else { | |||||
| this.useDefaultCredentialsSetExplicitly = true; | |||||
| } | |||||
| } | |||||
| public new string Url { | |||||
| get { | |||||
| return base.Url; | |||||
| } | |||||
| set { | |||||
| if ((((this.IsLocalFileSystemWebService(base.Url) == true) | |||||
| && (this.useDefaultCredentialsSetExplicitly == false)) | |||||
| && (this.IsLocalFileSystemWebService(value) == false))) { | |||||
| base.UseDefaultCredentials = false; | |||||
| } | |||||
| base.Url = value; | |||||
| } | |||||
| } | |||||
| public new bool UseDefaultCredentials { | |||||
| get { | |||||
| return base.UseDefaultCredentials; | |||||
| } | |||||
| set { | |||||
| base.UseDefaultCredentials = value; | |||||
| this.useDefaultCredentialsSetExplicitly = true; | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| public event InsertFeedPlanCompletedEventHandler InsertFeedPlanCompleted; | |||||
| /// <remarks/> | |||||
| public event InsertGCBCompletedEventHandler InsertGCBCompleted; | |||||
| /// <remarks/> | |||||
| public event InsertBCBCompletedEventHandler InsertBCBCompleted; | |||||
| /// <remarks/> | |||||
| public event InsertGoodsSaleCompletedEventHandler InsertGoodsSaleCompleted; | |||||
| /// <remarks/> | |||||
| public event UpdateGoodsSaleCompletedEventHandler UpdateGoodsSaleCompleted; | |||||
| /// <remarks/> | |||||
| [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/InsertFeedPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] | |||||
| public string InsertFeedPlan(string data) { | |||||
| object[] results = this.Invoke("InsertFeedPlan", new object[] { | |||||
| data}); | |||||
| return ((string)(results[0])); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void InsertFeedPlanAsync(string data) { | |||||
| this.InsertFeedPlanAsync(data, null); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void InsertFeedPlanAsync(string data, object userState) { | |||||
| if ((this.InsertFeedPlanOperationCompleted == null)) { | |||||
| this.InsertFeedPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInsertFeedPlanOperationCompleted); | |||||
| } | |||||
| this.InvokeAsync("InsertFeedPlan", new object[] { | |||||
| data}, this.InsertFeedPlanOperationCompleted, userState); | |||||
| } | |||||
| private void OnInsertFeedPlanOperationCompleted(object arg) { | |||||
| if ((this.InsertFeedPlanCompleted != null)) { | |||||
| System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); | |||||
| this.InsertFeedPlanCompleted(this, new InsertFeedPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/InsertGCB", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] | |||||
| public string InsertGCB(string data) { | |||||
| object[] results = this.Invoke("InsertGCB", new object[] { | |||||
| data}); | |||||
| return ((string)(results[0])); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void InsertGCBAsync(string data) { | |||||
| this.InsertGCBAsync(data, null); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void InsertGCBAsync(string data, object userState) { | |||||
| if ((this.InsertGCBOperationCompleted == null)) { | |||||
| this.InsertGCBOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInsertGCBOperationCompleted); | |||||
| } | |||||
| this.InvokeAsync("InsertGCB", new object[] { | |||||
| data}, this.InsertGCBOperationCompleted, userState); | |||||
| } | |||||
| private void OnInsertGCBOperationCompleted(object arg) { | |||||
| if ((this.InsertGCBCompleted != null)) { | |||||
| System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); | |||||
| this.InsertGCBCompleted(this, new InsertGCBCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/InsertBCB", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] | |||||
| public string InsertBCB(string data) { | |||||
| object[] results = this.Invoke("InsertBCB", new object[] { | |||||
| data}); | |||||
| return ((string)(results[0])); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void InsertBCBAsync(string data) { | |||||
| this.InsertBCBAsync(data, null); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void InsertBCBAsync(string data, object userState) { | |||||
| if ((this.InsertBCBOperationCompleted == null)) { | |||||
| this.InsertBCBOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInsertBCBOperationCompleted); | |||||
| } | |||||
| this.InvokeAsync("InsertBCB", new object[] { | |||||
| data}, this.InsertBCBOperationCompleted, userState); | |||||
| } | |||||
| private void OnInsertBCBOperationCompleted(object arg) { | |||||
| if ((this.InsertBCBCompleted != null)) { | |||||
| System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); | |||||
| this.InsertBCBCompleted(this, new InsertBCBCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/InsertGoodsSale", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] | |||||
| public string InsertGoodsSale(string data) { | |||||
| object[] results = this.Invoke("InsertGoodsSale", new object[] { | |||||
| data}); | |||||
| return ((string)(results[0])); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void InsertGoodsSaleAsync(string data) { | |||||
| this.InsertGoodsSaleAsync(data, null); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void InsertGoodsSaleAsync(string data, object userState) { | |||||
| if ((this.InsertGoodsSaleOperationCompleted == null)) { | |||||
| this.InsertGoodsSaleOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInsertGoodsSaleOperationCompleted); | |||||
| } | |||||
| this.InvokeAsync("InsertGoodsSale", new object[] { | |||||
| data}, this.InsertGoodsSaleOperationCompleted, userState); | |||||
| } | |||||
| private void OnInsertGoodsSaleOperationCompleted(object arg) { | |||||
| if ((this.InsertGoodsSaleCompleted != null)) { | |||||
| System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); | |||||
| this.InsertGoodsSaleCompleted(this, new InsertGoodsSaleCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateGoodsSale", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] | |||||
| public string UpdateGoodsSale(string data) { | |||||
| object[] results = this.Invoke("UpdateGoodsSale", new object[] { | |||||
| data}); | |||||
| return ((string)(results[0])); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void UpdateGoodsSaleAsync(string data) { | |||||
| this.UpdateGoodsSaleAsync(data, null); | |||||
| } | |||||
| /// <remarks/> | |||||
| public void UpdateGoodsSaleAsync(string data, object userState) { | |||||
| if ((this.UpdateGoodsSaleOperationCompleted == null)) { | |||||
| this.UpdateGoodsSaleOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateGoodsSaleOperationCompleted); | |||||
| } | |||||
| this.InvokeAsync("UpdateGoodsSale", new object[] { | |||||
| data}, this.UpdateGoodsSaleOperationCompleted, userState); | |||||
| } | |||||
| private void OnUpdateGoodsSaleOperationCompleted(object arg) { | |||||
| if ((this.UpdateGoodsSaleCompleted != null)) { | |||||
| System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); | |||||
| this.UpdateGoodsSaleCompleted(this, new UpdateGoodsSaleCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| public new void CancelAsync(object userState) { | |||||
| base.CancelAsync(userState); | |||||
| } | |||||
| private bool IsLocalFileSystemWebService(string url) { | |||||
| if (((url == null) | |||||
| || (url == string.Empty))) { | |||||
| return false; | |||||
| } | |||||
| System.Uri wsUri = new System.Uri(url); | |||||
| if (((wsUri.Port >= 1024) | |||||
| && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { | |||||
| return true; | |||||
| } | |||||
| return false; | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| public delegate void InsertFeedPlanCompletedEventHandler(object sender, InsertFeedPlanCompletedEventArgs e); | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| [System.Diagnostics.DebuggerStepThroughAttribute()] | |||||
| [System.ComponentModel.DesignerCategoryAttribute("code")] | |||||
| public partial class InsertFeedPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { | |||||
| private object[] results; | |||||
| internal InsertFeedPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : | |||||
| base(exception, cancelled, userState) { | |||||
| this.results = results; | |||||
| } | |||||
| /// <remarks/> | |||||
| public string Result { | |||||
| get { | |||||
| this.RaiseExceptionIfNecessary(); | |||||
| return ((string)(this.results[0])); | |||||
| } | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| public delegate void InsertGCBCompletedEventHandler(object sender, InsertGCBCompletedEventArgs e); | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| [System.Diagnostics.DebuggerStepThroughAttribute()] | |||||
| [System.ComponentModel.DesignerCategoryAttribute("code")] | |||||
| public partial class InsertGCBCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { | |||||
| private object[] results; | |||||
| internal InsertGCBCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : | |||||
| base(exception, cancelled, userState) { | |||||
| this.results = results; | |||||
| } | |||||
| /// <remarks/> | |||||
| public string Result { | |||||
| get { | |||||
| this.RaiseExceptionIfNecessary(); | |||||
| return ((string)(this.results[0])); | |||||
| } | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| public delegate void InsertBCBCompletedEventHandler(object sender, InsertBCBCompletedEventArgs e); | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| [System.Diagnostics.DebuggerStepThroughAttribute()] | |||||
| [System.ComponentModel.DesignerCategoryAttribute("code")] | |||||
| public partial class InsertBCBCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { | |||||
| private object[] results; | |||||
| internal InsertBCBCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : | |||||
| base(exception, cancelled, userState) { | |||||
| this.results = results; | |||||
| } | |||||
| /// <remarks/> | |||||
| public string Result { | |||||
| get { | |||||
| this.RaiseExceptionIfNecessary(); | |||||
| return ((string)(this.results[0])); | |||||
| } | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| public delegate void InsertGoodsSaleCompletedEventHandler(object sender, InsertGoodsSaleCompletedEventArgs e); | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| [System.Diagnostics.DebuggerStepThroughAttribute()] | |||||
| [System.ComponentModel.DesignerCategoryAttribute("code")] | |||||
| public partial class InsertGoodsSaleCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { | |||||
| private object[] results; | |||||
| internal InsertGoodsSaleCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : | |||||
| base(exception, cancelled, userState) { | |||||
| this.results = results; | |||||
| } | |||||
| /// <remarks/> | |||||
| public string Result { | |||||
| get { | |||||
| this.RaiseExceptionIfNecessary(); | |||||
| return ((string)(this.results[0])); | |||||
| } | |||||
| } | |||||
| } | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| public delegate void UpdateGoodsSaleCompletedEventHandler(object sender, UpdateGoodsSaleCompletedEventArgs e); | |||||
| /// <remarks/> | |||||
| [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] | |||||
| [System.Diagnostics.DebuggerStepThroughAttribute()] | |||||
| [System.ComponentModel.DesignerCategoryAttribute("code")] | |||||
| public partial class UpdateGoodsSaleCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { | |||||
| private object[] results; | |||||
| internal UpdateGoodsSaleCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : | |||||
| base(exception, cancelled, userState) { | |||||
| this.results = results; | |||||
| } | |||||
| /// <remarks/> | |||||
| public string Result { | |||||
| get { | |||||
| this.RaiseExceptionIfNecessary(); | |||||
| return ((string)(this.results[0])); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| #pragma warning restore 1591 | |||||
| @ -0,0 +1,7 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |||||
| <Results> | |||||
| <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:2100/bwprpc/Service.asmx?wsdl" filename="Service.wsdl" /> | |||||
| <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:2100/bwprpc/Service.asmx?disco" filename="Service.disco" /> | |||||
| </Results> | |||||
| </DiscoveryClientResultsFile> | |||||
| @ -0,0 +1,6 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/"> | |||||
| <contractRef ref="http://localhost:2100/bwprpc/Service.asmx?wsdl" docRef="http://localhost:2100/bwprpc/Service.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" /> | |||||
| <soap address="http://localhost:2100/bwprpc/Service.asmx" xmlns:q1="http://tempuri.org/" binding="q1:ServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> | |||||
| <soap address="http://localhost:2100/bwprpc/Service.asmx" xmlns:q2="http://tempuri.org/" binding="q2:ServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> | |||||
| </discovery> | |||||
| @ -0,0 +1,233 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> | |||||
| <wsdl:types> | |||||
| <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/"> | |||||
| <s:element name="InsertFeedPlan"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| <s:element name="InsertFeedPlanResponse"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="InsertFeedPlanResult" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| <s:element name="InsertGCB"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| <s:element name="InsertGCBResponse"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="InsertGCBResult" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| <s:element name="InsertBCB"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| <s:element name="InsertBCBResponse"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="InsertBCBResult" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| <s:element name="InsertGoodsSale"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| <s:element name="InsertGoodsSaleResponse"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="InsertGoodsSaleResult" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| <s:element name="UpdateGoodsSale"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| <s:element name="UpdateGoodsSaleResponse"> | |||||
| <s:complexType> | |||||
| <s:sequence> | |||||
| <s:element minOccurs="0" maxOccurs="1" name="UpdateGoodsSaleResult" type="s:string" /> | |||||
| </s:sequence> | |||||
| </s:complexType> | |||||
| </s:element> | |||||
| </s:schema> | |||||
| </wsdl:types> | |||||
| <wsdl:message name="InsertFeedPlanSoapIn"> | |||||
| <wsdl:part name="parameters" element="tns:InsertFeedPlan" /> | |||||
| </wsdl:message> | |||||
| <wsdl:message name="InsertFeedPlanSoapOut"> | |||||
| <wsdl:part name="parameters" element="tns:InsertFeedPlanResponse" /> | |||||
| </wsdl:message> | |||||
| <wsdl:message name="InsertGCBSoapIn"> | |||||
| <wsdl:part name="parameters" element="tns:InsertGCB" /> | |||||
| </wsdl:message> | |||||
| <wsdl:message name="InsertGCBSoapOut"> | |||||
| <wsdl:part name="parameters" element="tns:InsertGCBResponse" /> | |||||
| </wsdl:message> | |||||
| <wsdl:message name="InsertBCBSoapIn"> | |||||
| <wsdl:part name="parameters" element="tns:InsertBCB" /> | |||||
| </wsdl:message> | |||||
| <wsdl:message name="InsertBCBSoapOut"> | |||||
| <wsdl:part name="parameters" element="tns:InsertBCBResponse" /> | |||||
| </wsdl:message> | |||||
| <wsdl:message name="InsertGoodsSaleSoapIn"> | |||||
| <wsdl:part name="parameters" element="tns:InsertGoodsSale" /> | |||||
| </wsdl:message> | |||||
| <wsdl:message name="InsertGoodsSaleSoapOut"> | |||||
| <wsdl:part name="parameters" element="tns:InsertGoodsSaleResponse" /> | |||||
| </wsdl:message> | |||||
| <wsdl:message name="UpdateGoodsSaleSoapIn"> | |||||
| <wsdl:part name="parameters" element="tns:UpdateGoodsSale" /> | |||||
| </wsdl:message> | |||||
| <wsdl:message name="UpdateGoodsSaleSoapOut"> | |||||
| <wsdl:part name="parameters" element="tns:UpdateGoodsSaleResponse" /> | |||||
| </wsdl:message> | |||||
| <wsdl:portType name="ServiceSoap"> | |||||
| <wsdl:operation name="InsertFeedPlan"> | |||||
| <wsdl:input message="tns:InsertFeedPlanSoapIn" /> | |||||
| <wsdl:output message="tns:InsertFeedPlanSoapOut" /> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="InsertGCB"> | |||||
| <wsdl:input message="tns:InsertGCBSoapIn" /> | |||||
| <wsdl:output message="tns:InsertGCBSoapOut" /> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="InsertBCB"> | |||||
| <wsdl:input message="tns:InsertBCBSoapIn" /> | |||||
| <wsdl:output message="tns:InsertBCBSoapOut" /> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="InsertGoodsSale"> | |||||
| <wsdl:input message="tns:InsertGoodsSaleSoapIn" /> | |||||
| <wsdl:output message="tns:InsertGoodsSaleSoapOut" /> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="UpdateGoodsSale"> | |||||
| <wsdl:input message="tns:UpdateGoodsSaleSoapIn" /> | |||||
| <wsdl:output message="tns:UpdateGoodsSaleSoapOut" /> | |||||
| </wsdl:operation> | |||||
| </wsdl:portType> | |||||
| <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap"> | |||||
| <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> | |||||
| <wsdl:operation name="InsertFeedPlan"> | |||||
| <soap:operation soapAction="http://tempuri.org/InsertFeedPlan" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="InsertGCB"> | |||||
| <soap:operation soapAction="http://tempuri.org/InsertGCB" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="InsertBCB"> | |||||
| <soap:operation soapAction="http://tempuri.org/InsertBCB" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="InsertGoodsSale"> | |||||
| <soap:operation soapAction="http://tempuri.org/InsertGoodsSale" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="UpdateGoodsSale"> | |||||
| <soap:operation soapAction="http://tempuri.org/UpdateGoodsSale" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| </wsdl:binding> | |||||
| <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap"> | |||||
| <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> | |||||
| <wsdl:operation name="InsertFeedPlan"> | |||||
| <soap12:operation soapAction="http://tempuri.org/InsertFeedPlan" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="InsertGCB"> | |||||
| <soap12:operation soapAction="http://tempuri.org/InsertGCB" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="InsertBCB"> | |||||
| <soap12:operation soapAction="http://tempuri.org/InsertBCB" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="InsertGoodsSale"> | |||||
| <soap12:operation soapAction="http://tempuri.org/InsertGoodsSale" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| <wsdl:operation name="UpdateGoodsSale"> | |||||
| <soap12:operation soapAction="http://tempuri.org/UpdateGoodsSale" style="document" /> | |||||
| <wsdl:input> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:input> | |||||
| <wsdl:output> | |||||
| <soap12:body use="literal" /> | |||||
| </wsdl:output> | |||||
| </wsdl:operation> | |||||
| </wsdl:binding> | |||||
| <wsdl:service name="Service"> | |||||
| <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap"> | |||||
| <soap:address location="http://localhost:2100/bwprpc/Service.asmx" /> | |||||
| </wsdl:port> | |||||
| <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12"> | |||||
| <soap12:address location="http://localhost:2100/bwprpc/Service.asmx" /> | |||||
| </wsdl:port> | |||||
| </wsdl:service> | |||||
| </wsdl:definitions> | |||||
| @ -0,0 +1,15 @@ | |||||
| <?xml version="1.0"?> | |||||
| <configuration> | |||||
| <configSections> | |||||
| <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > | |||||
| <section name="Test.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> | |||||
| </sectionGroup> | |||||
| </configSections> | |||||
| <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup><applicationSettings> | |||||
| <Test.Properties.Settings> | |||||
| <setting name="Test_RpcWeb1_Service" serializeAs="String"> | |||||
| <value>http://localhost:2100/bwprpc/Service.asmx</value> | |||||
| </setting> | |||||
| </Test.Properties.Settings> | |||||
| </applicationSettings> | |||||
| </configuration> | |||||
| @ -0,0 +1,38 @@ | |||||
| using System.Web.Services; | |||||
| [WebService(Namespace = "http://tempuri.org/")] | |||||
| [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] | |||||
| public class Service : WebService { | |||||
| [WebMethod] | |||||
| public string InsertFeedPlan(string data) { | |||||
| var result = RpcHelper.RpcHelperUtil.InsertFeedPlan(data); | |||||
| return result; | |||||
| } | |||||
| [WebMethod] | |||||
| public string InsertGCB(string data) { | |||||
| var result = RpcHelper.RpcHelperUtil.InsertGCB(data); | |||||
| return result; | |||||
| } | |||||
| [WebMethod] | |||||
| public string InsertBCB(string data) { | |||||
| var result = RpcHelper.RpcHelperUtil.InsertBCB(data); | |||||
| return result; | |||||
| } | |||||
| [WebMethod] | |||||
| public string InsertGoodsSale(string data) { | |||||
| var result = RpcHelper.RpcHelperUtil.InsertGoodsSale(data); | |||||
| return result; | |||||
| } | |||||
| [WebMethod] | |||||
| public string UpdateGoodsSale(string data) { | |||||
| var result = RpcHelper.RpcHelperUtil.UpdateGoodsSale(data); | |||||
| return result; | |||||
| } | |||||
| } | |||||
| @ -0,0 +1 @@ | |||||
| <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Service" %> | |||||
| @ -0,0 +1,49 @@ | |||||
| <?xml version="1.0"?> | |||||
| <!-- | |||||
| 注意: 除了手动编辑此文件以外,您还可以使用 | |||||
| Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的 | |||||
| “网站”->“Asp.Net 配置”选项。 | |||||
| 设置和注释的完整列表在 | |||||
| machine.config.comments 中,该文件通常位于 | |||||
| \Windows\Microsoft.Net\Framework\v2.x\Config 中 | |||||
| --> | |||||
| <configuration> | |||||
| <appSettings> | |||||
| <add key="url" value="http://localhost:2100/MainSystem/"/> | |||||
| <add key="username" value="system"/> | |||||
| <add key="pwd" value=""/> | |||||
| </appSettings> | |||||
| <connectionStrings/> | |||||
| <system.web> | |||||
| <!-- | |||||
| 设置 compilation debug="true" 可将调试符号插入 | |||||
| 已编译的页面中。但由于这会 | |||||
| 影响性能,因此只在开发过程中将此值 | |||||
| 设置为 true。 | |||||
| --> | |||||
| <compilation debug="true" targetFramework="4.0"/> | |||||
| <!-- | |||||
| 通过 <authentication> 节可以配置 ASP.NET 用来 | |||||
| 识别进入用户的 | |||||
| 安全身份验证模式。 | |||||
| --> | |||||
| <authentication mode="Windows"/> | |||||
| <!-- | |||||
| 如果在执行请求的过程中出现未处理的错误, | |||||
| 则通过 <customErrors> 节可以配置相应的处理步骤。具体说来, | |||||
| 开发人员通过该节可以配置 | |||||
| 要显示的 html 错误页 | |||||
| 以代替错误堆栈跟踪。 | |||||
| <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> | |||||
| <error statusCode="403" redirect="NoAccess.htm" /> | |||||
| <error statusCode="404" redirect="FileNotFound.htm" /> | |||||
| </customErrors> | |||||
| --> | |||||
| <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/> | |||||
| </system.web> | |||||
| <!-- | |||||
| 在 Internet 信息服务 7.0 下运行 ASP.NET AJAX 需要 system.webServer | |||||
| 节。对早期版本的 IIS 来说则不需要此节。 | |||||
| --> | |||||
| </configuration> | |||||