| @ -0,0 +1,43 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using Forks.Utils; | |||
| using BWP.B3ClientService.NamedValueTemplate; | |||
| namespace BO.BO.Bill | |||
| { | |||
| public class CarcassStateWeight | |||
| { | |||
| public long GradeAndWeight_ID { get; set; } | |||
| public long? Code { get; set; } | |||
| public long? Product_ID { get; set; } | |||
| public string Product_Name { get; set; } | |||
| public decimal? Nubmber { get; set; } | |||
| public decimal? State1Weight { get; set; } | |||
| public decimal? State2Weight { get; set; } | |||
| public decimal? State3Weight { get; set; } | |||
| public decimal? State4Weight { get; set; } | |||
| public decimal? State5Weight { get; set; } | |||
| public NamedValue<胴体状态>? CurrentState { get; set; } | |||
| public decimal? CurrentWeight { get; set; } | |||
| public DateTime? Time { get; set; } | |||
| } | |||
| } | |||
| @ -0,0 +1,42 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using BO.BO.BaseInfo; | |||
| using BO.BO.Bill; | |||
| using Forks.JsonRpc.Client; | |||
| using System.Web.Script.Serialization; | |||
| namespace BO.Utils.BillRpc | |||
| { | |||
| public static class CarcassStateWeightRpc | |||
| { | |||
| static JavaScriptSerializer serializer = new JavaScriptSerializer(); | |||
| public static List<CarcassStateWeight> GetCarcassStateWeightList(DateTime date, long? maxID = null) | |||
| { | |||
| const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/CarcassStateWeightRpc/GetCarcassStateWeightList"; | |||
| var result = RpcFacade.Call<string>(method, date, maxID); | |||
| return serializer.Deserialize<List<CarcassStateWeight>>(result); | |||
| } | |||
| public static List<GradeAndWeight_Detail> GetGradeAndWeight_DetailByCode(long code) | |||
| { | |||
| const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/CarcassStateWeightRpc/GetGradeAndWeight_DetailByCode"; | |||
| var obj = RpcFacade.Call<string>(method, code); | |||
| obj = obj.ESerializeDateTime(); | |||
| return serializer.Deserialize<List<GradeAndWeight_Detail>>(obj); | |||
| } | |||
| public static void UpdateOrInsertDetail(CarcassStateWeight detail, bool fillTechnics = false) | |||
| { | |||
| const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/CarcassStateWeightRpc/UpdateOrInsertDetail"; | |||
| detail.GradeAndWeight_ID = RpcFacade.Call<long>(method, serializer.Serialize(detail), fillTechnics); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,112 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>{51C38871-00FE-4F18-BD49-D6A9124A844C}</ProjectGuid> | |||
| <OutputType>Library</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>CarcassStateWeight</RootNamespace> | |||
| <AssemblyName>CarcassStateWeight</AssemblyName> | |||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
| <FileAlignment>512</FileAlignment> | |||
| <TargetFrameworkProfile /> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
| <PlatformTarget>AnyCPU</PlatformTarget> | |||
| <DebugSymbols>true</DebugSymbols> | |||
| <DebugType>full</DebugType> | |||
| <Optimize>false</Optimize> | |||
| <OutputPath>bin\Debug\</OutputPath> | |||
| <DefineConstants>DEBUG;TRACE</DefineConstants> | |||
| <ErrorReport>prompt</ErrorReport> | |||
| <WarningLevel>4</WarningLevel> | |||
| <Prefer32Bit>false</Prefer32Bit> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||
| <PlatformTarget>AnyCPU</PlatformTarget> | |||
| <DebugType>pdbonly</DebugType> | |||
| <Optimize>true</Optimize> | |||
| <OutputPath>bin\Release\</OutputPath> | |||
| <DefineConstants>TRACE</DefineConstants> | |||
| <ErrorReport>prompt</ErrorReport> | |||
| <WarningLevel>4</WarningLevel> | |||
| <Prefer32Bit>false</Prefer32Bit> | |||
| </PropertyGroup> | |||
| <PropertyGroup> | |||
| <StartupObject /> | |||
| </PropertyGroup> | |||
| <ItemGroup> | |||
| <Reference Include="BO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\tsref\Debug\BO.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="BWP.WinFormControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\tsref\Debug\BWP.WinFormControl.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Newtonsoft.Json, Version=4.0.3.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\tsref\Debug\Newtonsoft.Json.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="System" /> | |||
| <Reference Include="System.Core" /> | |||
| <Reference Include="System.Xml.Linq" /> | |||
| <Reference Include="System.Data.DataSetExtensions" /> | |||
| <Reference Include="Microsoft.CSharp" /> | |||
| <Reference Include="System.Data" /> | |||
| <Reference Include="System.Deployment" /> | |||
| <Reference Include="System.Drawing" /> | |||
| <Reference Include="System.Windows.Forms" /> | |||
| <Reference Include="System.Xml" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Compile Include="CarcassStateWeightForm.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="CarcassStateWeightForm.Designer.cs"> | |||
| <DependentUpon>CarcassStateWeightForm.cs</DependentUpon> | |||
| </Compile> | |||
| <Compile Include="Dtos\ClientGoodsSetDto.cs" /> | |||
| <Compile Include="Program.cs" /> | |||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||
| <Compile Include="SyncUtil.cs" /> | |||
| <EmbeddedResource Include="CarcassStateWeightForm.resx"> | |||
| <DependentUpon>CarcassStateWeightForm.cs</DependentUpon> | |||
| </EmbeddedResource> | |||
| <EmbeddedResource Include="Properties\Resources.resx"> | |||
| <Generator>ResXFileCodeGenerator</Generator> | |||
| <LastGenOutput>Resources.Designer.cs</LastGenOutput> | |||
| <SubType>Designer</SubType> | |||
| </EmbeddedResource> | |||
| <Compile Include="Properties\Resources.Designer.cs"> | |||
| <AutoGen>True</AutoGen> | |||
| <DependentUpon>Resources.resx</DependentUpon> | |||
| <DesignTime>True</DesignTime> | |||
| </Compile> | |||
| <None Include="app.config" /> | |||
| <None Include="Properties\DataSources\BO.BO.Bill.CarcassStateWeight.datasource" /> | |||
| <None Include="Properties\Settings.settings"> | |||
| <Generator>SettingsSingleFileGenerator</Generator> | |||
| <LastGenOutput>Settings.Designer.cs</LastGenOutput> | |||
| </None> | |||
| <Compile Include="Properties\Settings.Designer.cs"> | |||
| <AutoGen>True</AutoGen> | |||
| <DependentUpon>Settings.settings</DependentUpon> | |||
| <DesignTimeSharedInput>True</DesignTimeSharedInput> | |||
| </Compile> | |||
| </ItemGroup> | |||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
| <!-- 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,585 @@ | |||
| namespace CarcassStateWeight | |||
| { | |||
| partial class CarcassStateWeightForm | |||
| { | |||
| /// <summary> | |||
| /// 必需的设计器变量。 | |||
| /// </summary> | |||
| private System.ComponentModel.IContainer components = null; | |||
| /// <summary> | |||
| /// 清理所有正在使用的资源。 | |||
| /// </summary> | |||
| /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> | |||
| protected override void Dispose(bool disposing) | |||
| { | |||
| if (disposing && (components != null)) | |||
| { | |||
| components.Dispose(); | |||
| } | |||
| base.Dispose(disposing); | |||
| } | |||
| #region Windows 窗体设计器生成的代码 | |||
| /// <summary> | |||
| /// 设计器支持所需的方法 - 不要修改 | |||
| /// 使用代码编辑器修改此方法的内容。 | |||
| /// </summary> | |||
| private void InitializeComponent() | |||
| { | |||
| this.components = new System.ComponentModel.Container(); | |||
| this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); | |||
| this.enableWeight = new System.Windows.Forms.CheckBox(); | |||
| this.panel1 = new System.Windows.Forms.Panel(); | |||
| this.lblChengZhong = new System.Windows.Forms.Label(); | |||
| this.splitContainer1 = new System.Windows.Forms.SplitContainer(); | |||
| this.textBox1 = new System.Windows.Forms.TextBox(); | |||
| this.label2 = new System.Windows.Forms.Label(); | |||
| this.commitBtn = new System.Windows.Forms.Button(); | |||
| this.syncBtn = new System.Windows.Forms.Button(); | |||
| this.label1 = new System.Windows.Forms.Label(); | |||
| this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); | |||
| this.dataGridViewCode = new System.Windows.Forms.DataGridView(); | |||
| this.Product_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.State2Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.State3Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.State4Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.State5Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.CurrentState = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.CurrentWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.cb_check = new System.Windows.Forms.DataGridViewCheckBoxColumn(); | |||
| this.dataGridViewSync = new System.Windows.Forms.DataGridView(); | |||
| this.D_GradeAndWeight_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.timer1 = new System.Windows.Forms.Timer(this.components); | |||
| this.GradeAndWeight_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.Code = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.Product_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.Nubmber = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.State1Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.carcassStateWeightBindingSource = new System.Windows.Forms.BindingSource(this.components); | |||
| this.D_Code = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_Product_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_Nubmber = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_State1Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_State2Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_State3Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_Product_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_State4Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_State5Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_CurrentState = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_CurrentWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.D_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |||
| this.carcassStateWeightBindingSource1 = new System.Windows.Forms.BindingSource(this.components); | |||
| this.butcherTimeInput = new BWP.WinFormControl.UDatePicker(); | |||
| this.uTabControl1 = new BWP.WinFormControl.UTabControl(); | |||
| this.tableLayoutPanel1.SuspendLayout(); | |||
| this.panel1.SuspendLayout(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); | |||
| this.splitContainer1.Panel1.SuspendLayout(); | |||
| this.splitContainer1.Panel2.SuspendLayout(); | |||
| this.splitContainer1.SuspendLayout(); | |||
| this.tableLayoutPanel2.SuspendLayout(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.dataGridViewCode)).BeginInit(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.dataGridViewSync)).BeginInit(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.carcassStateWeightBindingSource)).BeginInit(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.carcassStateWeightBindingSource1)).BeginInit(); | |||
| this.SuspendLayout(); | |||
| // | |||
| // tableLayoutPanel1 | |||
| // | |||
| this.tableLayoutPanel1.ColumnCount = 1; | |||
| this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); | |||
| this.tableLayoutPanel1.Controls.Add(this.enableWeight, 0, 1); | |||
| this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0); | |||
| this.tableLayoutPanel1.Controls.Add(this.splitContainer1, 0, 2); | |||
| this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 1); | |||
| this.tableLayoutPanel1.Name = "tableLayoutPanel1"; | |||
| this.tableLayoutPanel1.RowCount = 3; | |||
| this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 78.83212F)); | |||
| this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); | |||
| this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 559F)); | |||
| this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); | |||
| this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); | |||
| this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); | |||
| this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); | |||
| this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); | |||
| this.tableLayoutPanel1.Size = new System.Drawing.Size(1260, 653); | |||
| this.tableLayoutPanel1.TabIndex = 0; | |||
| // | |||
| // enableWeight | |||
| // | |||
| this.enableWeight.AutoCheck = false; | |||
| this.enableWeight.AutoSize = true; | |||
| this.enableWeight.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.enableWeight.Location = new System.Drawing.Point(3, 68); | |||
| this.enableWeight.Name = "enableWeight"; | |||
| this.enableWeight.Size = new System.Drawing.Size(108, 23); | |||
| this.enableWeight.TabIndex = 32; | |||
| this.enableWeight.Text = "启用称重"; | |||
| this.enableWeight.UseVisualStyleBackColor = true; | |||
| // | |||
| // panel1 | |||
| // | |||
| this.panel1.BackColor = System.Drawing.Color.Black; | |||
| this.panel1.Controls.Add(this.lblChengZhong); | |||
| this.panel1.Location = new System.Drawing.Point(3, 3); | |||
| this.panel1.Name = "panel1"; | |||
| this.panel1.Size = new System.Drawing.Size(195, 58); | |||
| this.panel1.TabIndex = 29; | |||
| // | |||
| // lblChengZhong | |||
| // | |||
| this.lblChengZhong.AutoSize = true; | |||
| this.lblChengZhong.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); | |||
| this.lblChengZhong.ForeColor = System.Drawing.Color.Red; | |||
| this.lblChengZhong.Location = new System.Drawing.Point(15, 18); | |||
| this.lblChengZhong.Name = "lblChengZhong"; | |||
| this.lblChengZhong.Size = new System.Drawing.Size(97, 40); | |||
| this.lblChengZhong.TabIndex = 0; | |||
| this.lblChengZhong.Text = "0.00"; | |||
| // | |||
| // splitContainer1 | |||
| // | |||
| this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; | |||
| this.splitContainer1.Location = new System.Drawing.Point(3, 97); | |||
| this.splitContainer1.Name = "splitContainer1"; | |||
| this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; | |||
| // | |||
| // splitContainer1.Panel1 | |||
| // | |||
| this.splitContainer1.Panel1.Controls.Add(this.textBox1); | |||
| this.splitContainer1.Panel1.Controls.Add(this.butcherTimeInput); | |||
| this.splitContainer1.Panel1.Controls.Add(this.label2); | |||
| this.splitContainer1.Panel1.Controls.Add(this.commitBtn); | |||
| this.splitContainer1.Panel1.Controls.Add(this.syncBtn); | |||
| this.splitContainer1.Panel1.Controls.Add(this.label1); | |||
| // | |||
| // splitContainer1.Panel2 | |||
| // | |||
| this.splitContainer1.Panel2.Controls.Add(this.tableLayoutPanel2); | |||
| this.splitContainer1.Size = new System.Drawing.Size(1254, 553); | |||
| this.splitContainer1.SplitterDistance = 51; | |||
| this.splitContainer1.TabIndex = 33; | |||
| // | |||
| // textBox1 | |||
| // | |||
| this.textBox1.Location = new System.Drawing.Point(914, 15); | |||
| this.textBox1.Name = "textBox1"; | |||
| this.textBox1.Size = new System.Drawing.Size(150, 21); | |||
| this.textBox1.TabIndex = 11; | |||
| this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); | |||
| // | |||
| // label2 | |||
| // | |||
| this.label2.AutoSize = true; | |||
| this.label2.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label2.Location = new System.Drawing.Point(2, 15); | |||
| this.label2.Name = "label2"; | |||
| this.label2.Size = new System.Drawing.Size(69, 20); | |||
| this.label2.TabIndex = 8; | |||
| this.label2.Text = "日期:"; | |||
| // | |||
| // commitBtn | |||
| // | |||
| this.commitBtn.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.commitBtn.Location = new System.Drawing.Point(1102, 3); | |||
| this.commitBtn.Name = "commitBtn"; | |||
| this.commitBtn.Size = new System.Drawing.Size(100, 40); | |||
| this.commitBtn.TabIndex = 7; | |||
| this.commitBtn.Text = "提交"; | |||
| this.commitBtn.UseVisualStyleBackColor = true; | |||
| this.commitBtn.Click += new System.EventHandler(this.commitBtn_Click); | |||
| // | |||
| // syncBtn | |||
| // | |||
| this.syncBtn.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.syncBtn.Location = new System.Drawing.Point(299, 3); | |||
| this.syncBtn.Name = "syncBtn"; | |||
| this.syncBtn.Size = new System.Drawing.Size(100, 40); | |||
| this.syncBtn.TabIndex = 5; | |||
| this.syncBtn.Text = "同步数据"; | |||
| this.syncBtn.UseVisualStyleBackColor = true; | |||
| this.syncBtn.Click += new System.EventHandler(this.syncBtn_Click); | |||
| // | |||
| // label1 | |||
| // | |||
| this.label1.AutoSize = true; | |||
| this.label1.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label1.Location = new System.Drawing.Point(809, 15); | |||
| this.label1.Name = "label1"; | |||
| this.label1.Size = new System.Drawing.Size(89, 20); | |||
| this.label1.TabIndex = 4; | |||
| this.label1.Text = "扫码区:"; | |||
| // | |||
| // tableLayoutPanel2 | |||
| // | |||
| this.tableLayoutPanel2.ColumnCount = 3; | |||
| this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 68.31956F)); | |||
| this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 31.68044F)); | |||
| this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 506F)); | |||
| this.tableLayoutPanel2.Controls.Add(this.dataGridViewCode, 2, 0); | |||
| this.tableLayoutPanel2.Controls.Add(this.dataGridViewSync, 0, 0); | |||
| this.tableLayoutPanel2.Controls.Add(this.uTabControl1, 1, 0); | |||
| this.tableLayoutPanel2.Location = new System.Drawing.Point(6, 3); | |||
| this.tableLayoutPanel2.Name = "tableLayoutPanel2"; | |||
| this.tableLayoutPanel2.RowCount = 1; | |||
| this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); | |||
| this.tableLayoutPanel2.Size = new System.Drawing.Size(1237, 484); | |||
| this.tableLayoutPanel2.TabIndex = 0; | |||
| // | |||
| // dataGridViewCode | |||
| // | |||
| this.dataGridViewCode.AllowUserToAddRows = false; | |||
| this.dataGridViewCode.AllowUserToDeleteRows = false; | |||
| this.dataGridViewCode.AutoGenerateColumns = false; | |||
| this.dataGridViewCode.BackgroundColor = System.Drawing.SystemColors.Control; | |||
| this.dataGridViewCode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; | |||
| this.dataGridViewCode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { | |||
| this.GradeAndWeight_ID, | |||
| this.Code, | |||
| this.Product_Name, | |||
| this.Nubmber, | |||
| this.State1Weight, | |||
| this.Product_ID, | |||
| this.State2Weight, | |||
| this.State3Weight, | |||
| this.State4Weight, | |||
| this.State5Weight, | |||
| this.CurrentState, | |||
| this.CurrentWeight, | |||
| this.Time, | |||
| this.cb_check}); | |||
| this.dataGridViewCode.DataSource = this.carcassStateWeightBindingSource; | |||
| this.dataGridViewCode.Dock = System.Windows.Forms.DockStyle.Fill; | |||
| this.dataGridViewCode.Location = new System.Drawing.Point(733, 3); | |||
| this.dataGridViewCode.Name = "dataGridViewCode"; | |||
| this.dataGridViewCode.RowTemplate.Height = 23; | |||
| this.dataGridViewCode.Size = new System.Drawing.Size(501, 478); | |||
| this.dataGridViewCode.TabIndex = 2; | |||
| this.dataGridViewCode.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewCode_CellContentClick); | |||
| // | |||
| // Product_ID | |||
| // | |||
| this.Product_ID.DataPropertyName = "Product_ID"; | |||
| this.Product_ID.HeaderText = "Product_ID"; | |||
| this.Product_ID.Name = "Product_ID"; | |||
| this.Product_ID.Visible = false; | |||
| // | |||
| // State2Weight | |||
| // | |||
| this.State2Weight.DataPropertyName = "State2Weight"; | |||
| this.State2Weight.HeaderText = "State2Weight"; | |||
| this.State2Weight.Name = "State2Weight"; | |||
| this.State2Weight.Visible = false; | |||
| // | |||
| // State3Weight | |||
| // | |||
| this.State3Weight.DataPropertyName = "State3Weight"; | |||
| this.State3Weight.HeaderText = "State3Weight"; | |||
| this.State3Weight.Name = "State3Weight"; | |||
| this.State3Weight.Visible = false; | |||
| // | |||
| // State4Weight | |||
| // | |||
| this.State4Weight.DataPropertyName = "State4Weight"; | |||
| this.State4Weight.HeaderText = "State4Weight"; | |||
| this.State4Weight.Name = "State4Weight"; | |||
| this.State4Weight.Visible = false; | |||
| // | |||
| // State5Weight | |||
| // | |||
| this.State5Weight.DataPropertyName = "State5Weight"; | |||
| this.State5Weight.HeaderText = "State5Weight"; | |||
| this.State5Weight.Name = "State5Weight"; | |||
| this.State5Weight.Visible = false; | |||
| // | |||
| // CurrentState | |||
| // | |||
| this.CurrentState.DataPropertyName = "CurrentState"; | |||
| this.CurrentState.HeaderText = "CurrentState"; | |||
| this.CurrentState.Name = "CurrentState"; | |||
| this.CurrentState.Visible = false; | |||
| // | |||
| // CurrentWeight | |||
| // | |||
| this.CurrentWeight.DataPropertyName = "CurrentWeight"; | |||
| this.CurrentWeight.HeaderText = "CurrentWeight"; | |||
| this.CurrentWeight.Name = "CurrentWeight"; | |||
| this.CurrentWeight.Visible = false; | |||
| // | |||
| // Time | |||
| // | |||
| this.Time.DataPropertyName = "Time"; | |||
| this.Time.HeaderText = "Time"; | |||
| this.Time.Name = "Time"; | |||
| this.Time.Visible = false; | |||
| // | |||
| // cb_check | |||
| // | |||
| this.cb_check.HeaderText = "选中"; | |||
| this.cb_check.Name = "cb_check"; | |||
| this.cb_check.Width = 50; | |||
| // | |||
| // dataGridViewSync | |||
| // | |||
| this.dataGridViewSync.AllowUserToAddRows = false; | |||
| this.dataGridViewSync.AllowUserToDeleteRows = false; | |||
| this.dataGridViewSync.AutoGenerateColumns = false; | |||
| this.dataGridViewSync.BackgroundColor = System.Drawing.SystemColors.Control; | |||
| this.dataGridViewSync.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; | |||
| this.dataGridViewSync.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { | |||
| this.D_GradeAndWeight_ID, | |||
| this.D_Code, | |||
| this.D_Product_Name, | |||
| this.D_Nubmber, | |||
| this.D_State1Weight, | |||
| this.D_State2Weight, | |||
| this.D_State3Weight, | |||
| this.D_Product_ID, | |||
| this.D_State4Weight, | |||
| this.D_State5Weight, | |||
| this.D_CurrentState, | |||
| this.D_CurrentWeight, | |||
| this.D_Time}); | |||
| this.dataGridViewSync.DataSource = this.carcassStateWeightBindingSource1; | |||
| this.dataGridViewSync.Dock = System.Windows.Forms.DockStyle.Fill; | |||
| this.dataGridViewSync.Location = new System.Drawing.Point(3, 3); | |||
| this.dataGridViewSync.Name = "dataGridViewSync"; | |||
| this.dataGridViewSync.RowTemplate.Height = 23; | |||
| this.dataGridViewSync.Size = new System.Drawing.Size(493, 478); | |||
| this.dataGridViewSync.TabIndex = 1; | |||
| this.dataGridViewSync.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewSync_CellContentClick); | |||
| // | |||
| // D_GradeAndWeight_ID | |||
| // | |||
| this.D_GradeAndWeight_ID.DataPropertyName = "GradeAndWeight_ID"; | |||
| this.D_GradeAndWeight_ID.HeaderText = "顺序"; | |||
| this.D_GradeAndWeight_ID.Name = "D_GradeAndWeight_ID"; | |||
| this.D_GradeAndWeight_ID.Width = 60; | |||
| // | |||
| // GradeAndWeight_ID | |||
| // | |||
| this.GradeAndWeight_ID.DataPropertyName = "GradeAndWeight_ID"; | |||
| this.GradeAndWeight_ID.HeaderText = "序号"; | |||
| this.GradeAndWeight_ID.Name = "GradeAndWeight_ID"; | |||
| this.GradeAndWeight_ID.Width = 65; | |||
| // | |||
| // Code | |||
| // | |||
| this.Code.DataPropertyName = "Code"; | |||
| this.Code.HeaderText = "条码"; | |||
| this.Code.Name = "Code"; | |||
| this.Code.Width = 65; | |||
| // | |||
| // Product_Name | |||
| // | |||
| this.Product_Name.DataPropertyName = "Product_Name"; | |||
| this.Product_Name.HeaderText = "产品名称"; | |||
| this.Product_Name.Name = "Product_Name"; | |||
| // | |||
| // Nubmber | |||
| // | |||
| this.Nubmber.DataPropertyName = "Nubmber"; | |||
| this.Nubmber.HeaderText = "数量"; | |||
| this.Nubmber.Name = "Nubmber"; | |||
| this.Nubmber.Width = 65; | |||
| // | |||
| // State1Weight | |||
| // | |||
| this.State1Weight.DataPropertyName = "State1Weight"; | |||
| this.State1Weight.HeaderText = "胴体重量"; | |||
| this.State1Weight.Name = "State1Weight"; | |||
| // | |||
| // carcassStateWeightBindingSource | |||
| // | |||
| this.carcassStateWeightBindingSource.DataSource = typeof(BO.BO.Bill.CarcassStateWeight); | |||
| // | |||
| // D_Code | |||
| // | |||
| this.D_Code.DataPropertyName = "Code"; | |||
| this.D_Code.HeaderText = "条码"; | |||
| this.D_Code.Name = "D_Code"; | |||
| this.D_Code.Width = 60; | |||
| // | |||
| // D_Product_Name | |||
| // | |||
| this.D_Product_Name.DataPropertyName = "Product_Name"; | |||
| this.D_Product_Name.HeaderText = "产品名称"; | |||
| this.D_Product_Name.Name = "D_Product_Name"; | |||
| // | |||
| // D_Nubmber | |||
| // | |||
| this.D_Nubmber.DataPropertyName = "Nubmber"; | |||
| this.D_Nubmber.HeaderText = "数量"; | |||
| this.D_Nubmber.Name = "D_Nubmber"; | |||
| this.D_Nubmber.Width = 60; | |||
| // | |||
| // D_State1Weight | |||
| // | |||
| this.D_State1Weight.DataPropertyName = "State1Weight"; | |||
| this.D_State1Weight.HeaderText = "胴体重量"; | |||
| this.D_State1Weight.Name = "D_State1Weight"; | |||
| // | |||
| // D_State2Weight | |||
| // | |||
| this.D_State2Weight.DataPropertyName = "State2Weight"; | |||
| this.D_State2Weight.HeaderText = "入库重量"; | |||
| this.D_State2Weight.Name = "D_State2Weight"; | |||
| // | |||
| // D_State3Weight | |||
| // | |||
| this.D_State3Weight.DataPropertyName = "State3Weight"; | |||
| this.D_State3Weight.HeaderText = "State3Weight"; | |||
| this.D_State3Weight.Name = "D_State3Weight"; | |||
| this.D_State3Weight.Visible = false; | |||
| // | |||
| // D_Product_ID | |||
| // | |||
| this.D_Product_ID.DataPropertyName = "Product_ID"; | |||
| this.D_Product_ID.HeaderText = "Product_ID"; | |||
| this.D_Product_ID.Name = "D_Product_ID"; | |||
| this.D_Product_ID.Visible = false; | |||
| // | |||
| // D_State4Weight | |||
| // | |||
| this.D_State4Weight.DataPropertyName = "State4Weight"; | |||
| this.D_State4Weight.HeaderText = "State4Weight"; | |||
| this.D_State4Weight.Name = "D_State4Weight"; | |||
| this.D_State4Weight.Visible = false; | |||
| // | |||
| // D_State5Weight | |||
| // | |||
| this.D_State5Weight.DataPropertyName = "State5Weight"; | |||
| this.D_State5Weight.HeaderText = "State5Weight"; | |||
| this.D_State5Weight.Name = "D_State5Weight"; | |||
| this.D_State5Weight.Visible = false; | |||
| // | |||
| // D_CurrentState | |||
| // | |||
| this.D_CurrentState.DataPropertyName = "CurrentState"; | |||
| this.D_CurrentState.HeaderText = "CurrentState"; | |||
| this.D_CurrentState.Name = "D_CurrentState"; | |||
| this.D_CurrentState.Visible = false; | |||
| // | |||
| // D_CurrentWeight | |||
| // | |||
| this.D_CurrentWeight.DataPropertyName = "CurrentWeight"; | |||
| this.D_CurrentWeight.HeaderText = "CurrentWeight"; | |||
| this.D_CurrentWeight.Name = "D_CurrentWeight"; | |||
| this.D_CurrentWeight.Visible = false; | |||
| // | |||
| // D_Time | |||
| // | |||
| this.D_Time.DataPropertyName = "Time"; | |||
| this.D_Time.HeaderText = "Time"; | |||
| this.D_Time.Name = "D_Time"; | |||
| this.D_Time.Visible = false; | |||
| // | |||
| // carcassStateWeightBindingSource1 | |||
| // | |||
| this.carcassStateWeightBindingSource1.DataSource = typeof(BO.BO.Bill.CarcassStateWeight); | |||
| // | |||
| // butcherTimeInput | |||
| // | |||
| this.butcherTimeInput.BackColor = System.Drawing.Color.White; | |||
| this.butcherTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; | |||
| this.butcherTimeInput.Date = new System.DateTime(2017, 10, 21, 0, 0, 0, 0); | |||
| this.butcherTimeInput.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.butcherTimeInput.Location = new System.Drawing.Point(93, 10); | |||
| this.butcherTimeInput.Name = "butcherTimeInput"; | |||
| this.butcherTimeInput.Size = new System.Drawing.Size(133, 30); | |||
| this.butcherTimeInput.TabIndex = 10; | |||
| this.butcherTimeInput.Text = "2017/10/21"; | |||
| this.butcherTimeInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; | |||
| this.butcherTimeInput.Type = BWP.WinFormControl.DateTimeType.Date; | |||
| // | |||
| // uTabControl1 | |||
| // | |||
| this.uTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; | |||
| this.uTabControl1.FromRightFlow = false; | |||
| this.uTabControl1.Location = new System.Drawing.Point(502, 3); | |||
| this.uTabControl1.Name = "uTabControl1"; | |||
| this.uTabControl1.SelectedIndex = 0; | |||
| this.uTabControl1.Size = new System.Drawing.Size(225, 478); | |||
| this.uTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; | |||
| this.uTabControl1.TabIndex = 3; | |||
| // | |||
| // CarcassStateWeightForm | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.ClientSize = new System.Drawing.Size(1275, 666); | |||
| this.Controls.Add(this.tableLayoutPanel1); | |||
| this.Name = "CarcassStateWeightForm"; | |||
| this.Text = "胴体称重"; | |||
| this.Load += new System.EventHandler(this.CarcassStateWeightForm_Load); | |||
| this.tableLayoutPanel1.ResumeLayout(false); | |||
| this.tableLayoutPanel1.PerformLayout(); | |||
| this.panel1.ResumeLayout(false); | |||
| this.panel1.PerformLayout(); | |||
| this.splitContainer1.Panel1.ResumeLayout(false); | |||
| this.splitContainer1.Panel1.PerformLayout(); | |||
| this.splitContainer1.Panel2.ResumeLayout(false); | |||
| ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); | |||
| this.splitContainer1.ResumeLayout(false); | |||
| this.tableLayoutPanel2.ResumeLayout(false); | |||
| ((System.ComponentModel.ISupportInitialize)(this.dataGridViewCode)).EndInit(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.dataGridViewSync)).EndInit(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.carcassStateWeightBindingSource)).EndInit(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.carcassStateWeightBindingSource1)).EndInit(); | |||
| this.ResumeLayout(false); | |||
| } | |||
| #endregion | |||
| private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; | |||
| private System.Windows.Forms.Panel panel1; | |||
| private System.Windows.Forms.Label lblChengZhong; | |||
| private System.Windows.Forms.CheckBox enableWeight; | |||
| private System.Windows.Forms.SplitContainer splitContainer1; | |||
| private System.Windows.Forms.Timer timer1; | |||
| private System.Windows.Forms.Button syncBtn; | |||
| private System.Windows.Forms.Label label1; | |||
| private System.Windows.Forms.Button commitBtn; | |||
| private System.Windows.Forms.Label label2; | |||
| private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; | |||
| private System.Windows.Forms.DataGridView dataGridViewCode; | |||
| private System.Windows.Forms.DataGridView dataGridViewSync; | |||
| private BWP.WinFormControl.UDatePicker butcherTimeInput; | |||
| private BWP.WinFormControl.UTabControl uTabControl1; | |||
| private System.Windows.Forms.TextBox textBox1; | |||
| private System.Windows.Forms.BindingSource carcassStateWeightBindingSource; | |||
| private System.Windows.Forms.BindingSource carcassStateWeightBindingSource1; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_GradeAndWeight_ID; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_Code; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_Product_Name; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_Nubmber; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_State1Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_State2Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_State3Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_Product_ID; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_State4Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_State5Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_CurrentState; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_CurrentWeight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn D_Time; | |||
| private System.Windows.Forms.DataGridViewCheckBoxColumn cb_check; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn GradeAndWeight_ID; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn Code; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn Product_Name; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn Nubmber; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn State1Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn Product_ID; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn State2Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn State3Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn State4Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn State5Weight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn CurrentState; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn CurrentWeight; | |||
| private System.Windows.Forms.DataGridViewTextBoxColumn Time; | |||
| } | |||
| } | |||
| @ -0,0 +1,407 @@ | |||
| using BO; | |||
| using BO.BO.Bill; | |||
| using BO.Utils; | |||
| using BO.Utils.BillRpc; | |||
| using BWP.WinFormControl; | |||
| using BWP.WinFormControl.WeightDataFormat; | |||
| using System; | |||
| using System.Collections.Concurrent; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.IO.Ports; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace CarcassStateWeight | |||
| { | |||
| public partial class CarcassStateWeightForm : Form, IAfterLogin | |||
| { | |||
| #region IAfterLogin | |||
| public string RoleName | |||
| { | |||
| get { return "定级员"; } | |||
| } | |||
| public Form Generate() | |||
| { | |||
| return this; | |||
| } | |||
| #endregion | |||
| List<BO.BO.Bill.CarcassStateWeight> list; | |||
| List<BO.BO.Bill.CarcassStateWeight> details; | |||
| Thread syncWork; | |||
| private delegate void InvokeHandler(); | |||
| SerialPort weightPort; | |||
| int maxIndex = 0; | |||
| public CarcassStateWeightForm() | |||
| { | |||
| InitializeComponent(); | |||
| houseList = ProductEntity.Init(BaseInfoRpcUtil.GetBaseInfoEntity("GetWhiteBarList")); | |||
| AddHouseBtn(); | |||
| details = new List<BO.BO.Bill.CarcassStateWeight>(); | |||
| } | |||
| private void syncBtn_Click(object sender, EventArgs e) | |||
| { | |||
| list = CarcassStateWeightRpc.GetCarcassStateWeightList(butcherTimeInput.Date.Value); | |||
| BindDataGrid(); | |||
| //tangRow = FindRowSetSelected(tangEntity); | |||
| //maoRow = FindRowSetSelected(maoEntity); | |||
| dataGridViewSync.Refresh(); | |||
| //if (syncWork == null || !syncWork.IsAlive) | |||
| //{ | |||
| // syncWork = new Thread(Sync); | |||
| // syncWork.Start(); | |||
| // syncBtn.BackColor = Color.FromArgb(15, 215, 107); | |||
| // syncBtn.ForeColor = Color.White; | |||
| //} | |||
| //else | |||
| //{ | |||
| // syncBtn.BackColor = Color.FromKnownColor(KnownColor.Control) | |||
| // syncWork.Abort();; | |||
| // syncBtn.ForeColor = Color.FromKnownColor(KnownColor.ControlText); | |||
| //} | |||
| } | |||
| void Sync() | |||
| { | |||
| while (true) | |||
| { | |||
| Thread.Sleep(5000); | |||
| this.Invoke(new InvokeHandler(delegate () | |||
| { | |||
| list = CarcassStateWeightRpc.GetCarcassStateWeightList(butcherTimeInput.Date.Value); | |||
| BindDataGrid(); | |||
| //tangRow = FindRowSetSelected(tangEntity); | |||
| //maoRow = FindRowSetSelected(maoEntity); | |||
| dataGridViewSync.Refresh(); | |||
| })); | |||
| } | |||
| } | |||
| void BindDataGrid() | |||
| { | |||
| dataGridViewSync.DataSource = list.OrderBy(x => x.Time).ToList(); | |||
| //foreach (DataGridViewRow row in dataGridViewSync.Rows) | |||
| //{ | |||
| // if ((bool)row.Cells["D_Finish"].Value) | |||
| // row.DefaultCellStyle.BackColor = Color.YellowGreen; | |||
| //} | |||
| } | |||
| DataGridViewRow FindRowSetSelected(GradeAndWeight tag) | |||
| { | |||
| ////if (tag == null) | |||
| //// return null; | |||
| ////foreach (DataGridViewRow row in dataGridViewSync.Rows) | |||
| ////{ | |||
| //// if ((long)row.Cells["D_OrderDetail_ID"].Value == tag.OrderDetail_ID && (string)row.Cells["D_Technics_Name"].Value == tag.Technics_Name) | |||
| //// { | |||
| //// if (tag.Finish) | |||
| //// row.DefaultCellStyle.BackColor = Color.YellowGreen; | |||
| //// else | |||
| //// row.DefaultCellStyle.BackColor = tag.Technics == 1 ? Color.Yellow : dataGridViewSync.RowsDefaultCellStyle.SelectionBackColor; | |||
| //// if (tag.Technics == 0) | |||
| //// tangEntity = row.DataBoundItem as GradeAndWeight; | |||
| //// else | |||
| //// maoEntity = row.DataBoundItem as GradeAndWeight; | |||
| //// return row; | |||
| //// } | |||
| ////} | |||
| return null; | |||
| } | |||
| private void commitBtn_Click(object sender, EventArgs e) | |||
| { | |||
| List<BO.BO.Bill.CarcassStateWeight> listCsw = new List<BO.BO.Bill.CarcassStateWeight>(); | |||
| for (int i = 0; i < dataGridViewCode.Rows.Count; i++) | |||
| { | |||
| DataGridViewCheckBoxCell checkCell = (DataGridViewCheckBoxCell) dataGridViewCode.Rows[i].Cells["cb_check"]; | |||
| Boolean flag = Convert.ToBoolean(checkCell.Value); | |||
| if (flag == true) //查找被选择的数据行 | |||
| { | |||
| DataGridViewRow row = dataGridViewCode.Rows[i]; | |||
| BO.BO.Bill.CarcassStateWeight slectedCSW = row.DataBoundItem as BO.BO.Bill.CarcassStateWeight; | |||
| listCsw.Add(slectedCSW); | |||
| } | |||
| } | |||
| foreach (var csw in listCsw) | |||
| { | |||
| CarcassStateWeightRpc.UpdateOrInsertDetail(csw); | |||
| details.Remove(csw); | |||
| } | |||
| dataGridViewCode.DataSource = null; | |||
| dataGridViewCode.DataSource = details; | |||
| dataGridViewCode.Refresh(); | |||
| } | |||
| List<Button> houseSelectedBtn = new List<Button>(); | |||
| List<Button> houseBtn = new List<Button>(); | |||
| List<ProductEntity> houseList; | |||
| readonly Color btnSelectForeColor = Color.FromArgb(255, 255, 255); | |||
| readonly Color btnSelectBackColor = Color.FromArgb(66, 163, 218); | |||
| Color btnUnSelectForeColor = SystemColors.ControlText; | |||
| Color btnUnSelectBackColor = Color.FromArgb(225, 225, 225); | |||
| private void AddHouseBtn() | |||
| { | |||
| int pageSize = 48; | |||
| foreach (var houseItems in houseList) | |||
| { | |||
| var tabPage = new TabPage(houseItems.Part); | |||
| tabPage.Name = string.Format("house_{0}", houseItems.Part); | |||
| var flowCount = houseItems.Details.Count / 48; | |||
| if (houseItems.Details.Count % 48 != 0) | |||
| flowCount += 1; | |||
| FlowLayoutPanel pageBtnPanel = null; | |||
| for (var i = 0; i < flowCount; i++) | |||
| { | |||
| var houseFlow = new FlowLayoutPanel() { RightToLeft = RightToLeft.No, Name = string.Format("houseFlow_{0}", houseItems.Part), BorderStyle = BorderStyle.FixedSingle }; | |||
| if (flowCount > 1) | |||
| { | |||
| if (i == 0) | |||
| { | |||
| pageBtnPanel = new FlowLayoutPanel() { Dock = DockStyle.Bottom, Height = 65, RightToLeft = RightToLeft.No, BorderStyle = BorderStyle.FixedSingle }; | |||
| pageBtnPanel.Location = new Point(3, 492 - 65); | |||
| } | |||
| else | |||
| houseFlow.Visible = false; | |||
| var btn = new Button() { Text = (i + 1).ToString(), Tag = houseFlow, Size = new Size(75, 55), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 5 }, Font = new Font("宋体", 15) }; | |||
| pageBtnPanel.Controls.Add(btn); | |||
| btn.Click += (sender, e) => | |||
| { | |||
| var currentBind = btn.Tag as FlowLayoutPanel; | |||
| foreach (var subControl in pageBtnPanel.Controls) | |||
| { | |||
| var pb = subControl as Button; | |||
| var p = pb.Tag as FlowLayoutPanel; | |||
| p.Visible = currentBind == p; | |||
| } | |||
| }; | |||
| houseFlow.Width = 709; | |||
| houseFlow.Height = 492 - 70; | |||
| } | |||
| else | |||
| houseFlow.Dock = DockStyle.Fill; | |||
| tabPage.Controls.Add(houseFlow); | |||
| if (pageBtnPanel != null) | |||
| tabPage.Controls.Add(pageBtnPanel); | |||
| int idx = i * pageSize; | |||
| for (var j = 0; j < pageSize; j++) | |||
| { | |||
| var padding = new Padding { All = 5 }; | |||
| if ((idx + 1) % 8 != 0 && (idx + 1) % 4 == 0) | |||
| padding = new Padding(5, 5, 15, 5); | |||
| var house = houseItems.Details[idx]; | |||
| var btn = new Button() { Name = "_" + house.Item1, Tag = house, Text = house.Item2, Size = new Size(77, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = padding, Font = new Font("宋体", 12), BackColor = btnUnSelectBackColor }; | |||
| btn.Click += (sender, e) => | |||
| { | |||
| if (houseSelectedBtn.Contains(btn)) | |||
| { | |||
| btn.BackColor = btnUnSelectBackColor; | |||
| btn.ForeColor = btnUnSelectForeColor; | |||
| houseSelectedBtn.Remove(btn); | |||
| } | |||
| else | |||
| { | |||
| btn.BackColor = btnSelectBackColor; | |||
| btn.ForeColor = btnSelectForeColor; | |||
| houseSelectedBtn.Add(btn); | |||
| } | |||
| }; | |||
| houseBtn.Add(btn); | |||
| houseFlow.Controls.Add(btn); | |||
| idx += 1; | |||
| if (idx == houseItems.Details.Count) | |||
| break; | |||
| } | |||
| } | |||
| uTabControl1.TabPages.Add(tabPage); | |||
| } | |||
| if (uTabControl1.TabPages.Count != 0) | |||
| uTabControl1.SelectedIndex = uTabControl1.TabPages.Count - 1; | |||
| } | |||
| private void textBox1_TextChanged(object sender, EventArgs e) | |||
| { | |||
| string value = textBox1.Text.ToString().Trim(); | |||
| long code = Convert.ToInt64(value); | |||
| List<GradeAndWeight_Detail> gawDetailList = CarcassStateWeightRpc.GetGradeAndWeight_DetailByCode(code); | |||
| GradeAndWeight_Detail gawDetail = gawDetailList[0]; | |||
| if (gawDetail != null) | |||
| { | |||
| BO.BO.Bill.CarcassStateWeight newCarcassStateWeight; | |||
| newCarcassStateWeight = new BO.BO.Bill.CarcassStateWeight(); | |||
| newCarcassStateWeight.Code = code; | |||
| newCarcassStateWeight.Nubmber = 1; | |||
| newCarcassStateWeight.State1Weight = gawDetail.Weight; | |||
| int r = new Random().Next(); | |||
| newCarcassStateWeight.GradeAndWeight_ID = DateTime.Now.ToFileTime() + r; | |||
| newCarcassStateWeight.Product_ID = gawDetail.Livestock_ID; | |||
| newCarcassStateWeight.Product_Name = gawDetail.Livestock_Name; | |||
| newCarcassStateWeight.Time = DateTime.Now; | |||
| AddDetail(newCarcassStateWeight); | |||
| } | |||
| } | |||
| static object _obj = new object(); | |||
| void AddDetail(BO.BO.Bill.CarcassStateWeight currentRow) | |||
| { | |||
| lock (_obj) | |||
| { | |||
| maxIndex++; | |||
| var entity = new BO.BO.Bill.CarcassStateWeight(); | |||
| //entity.Index = maxIndex; | |||
| if (currentRow != null) | |||
| { | |||
| details.Insert(0, currentRow); | |||
| } | |||
| //CarcassStateWeightRpc.UpdateOrInsertDetail(entity, true); | |||
| BindDetailGrid(); | |||
| } | |||
| } | |||
| void BindDetailGrid() | |||
| { | |||
| dataGridViewCode.DataSource = null; | |||
| if (details.Any()) | |||
| dataGridViewCode.DataSource = details; | |||
| if (lastSelectID.HasValue) | |||
| { | |||
| foreach (DataGridViewRow row in dataGridViewCode.Rows) | |||
| { | |||
| if ((long)row.Cells["GradeAndWeight_ID"].Value == lastSelectID) | |||
| { | |||
| dataGridViewCode.CurrentCell = row.Cells[row.Cells.Count - 1]; | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| dataGridViewCode.Refresh(); | |||
| } | |||
| BO.BO.Bill.CarcassStateWeight lastCheckItem; | |||
| long? lastSelectID = null; | |||
| BO.BO.Bill.CarcassStateWeight modifyDetail; | |||
| private void dataGridViewCode_CellContentClick(object sender, DataGridViewCellEventArgs e) | |||
| { | |||
| //if (e.RowIndex < 0) | |||
| // return; | |||
| //var currentRow = dataGridViewCode.CurrentRow.DataBoundItem as BO.BO.Bill.CarcassStateWeight; | |||
| //lastSelectID = currentRow.GradeAndWeight_ID; | |||
| //if (e.ColumnIndex == 2) | |||
| //{ | |||
| // if (lastCheckItem != null && lastCheckItem.ID != currentRow.ID) | |||
| // lastCheckItem.ReadWeight = false; | |||
| // lastCheckItem = currentRow; | |||
| // lastCheckItem.ReadWeight = !lastCheckItem.ReadWeight; | |||
| // modifyDetail = null; | |||
| // //if (modifyPanel.Visible) | |||
| // //modifyPanel.Hide(); | |||
| // dataGridViewCode.Refresh(); | |||
| // if (lastCheckItem.ReadWeight) | |||
| // { | |||
| // //noWeightList = new ConcurrentQueue<CarcassStateWeight>(); | |||
| // var stack = new Stack<BO.BO.Bill.CarcassStateWeight>(); | |||
| // foreach (var item in details) | |||
| // { | |||
| // stack.Push(item); | |||
| // if (item.ID == lastCheckItem.ID) | |||
| // break; | |||
| // } | |||
| // //while (stack.Count > 0) | |||
| // //noWeightList.Enqueue(stack.Pop()); | |||
| // } | |||
| // else | |||
| // { | |||
| // //FillQueue(); | |||
| // lastCheckItem = null; | |||
| // } | |||
| // return; | |||
| //} | |||
| //modifyDetail = currentRow; | |||
| ////stateLabel.Text = string.Format("您正在修改序号为 {0} 的信息", modifyDetail.Index); | |||
| ////modifyPanel.Show(); | |||
| } | |||
| private void dataGridViewSync_CellContentClick(object sender, DataGridViewCellEventArgs e) | |||
| { | |||
| } | |||
| private void CarcassStateWeightForm_Load(object sender, EventArgs e) | |||
| { | |||
| } | |||
| } | |||
| class ProductEntity | |||
| { | |||
| public string Part { get; set; } | |||
| List<Tuple<string, string>> details = new List<Tuple<string, string>>(); | |||
| public List<Tuple<string, string>> Details { get { return details; } } | |||
| public static List<ProductEntity> Init(List<Tuple<string, string>> list) | |||
| { | |||
| var result = new List<ProductEntity>(); | |||
| foreach (var item in list) | |||
| { | |||
| var part = item.Item2[0].ToString(); | |||
| if (part.Contains("去")) | |||
| part = "去皮白条"; | |||
| else if (part.Contains("带")) | |||
| part = "带皮白条"; | |||
| var first = result.FirstOrDefault(x => x.Part == part); | |||
| if (first == null) | |||
| { | |||
| first = new ProductEntity { Part = part }; | |||
| result.Add(first); | |||
| } | |||
| first.Details.Add(new Tuple<string, string>(item.Item1, item.Item2)); | |||
| } | |||
| result.Reverse(); | |||
| return result; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,162 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <root> | |||
| <!-- | |||
| Microsoft ResX Schema | |||
| Version 2.0 | |||
| The primary goals of this format is to allow a simple XML format | |||
| that is mostly human readable. The generation and parsing of the | |||
| various data types are done through the TypeConverter classes | |||
| associated with the data types. | |||
| Example: | |||
| ... ado.net/XML headers & schema ... | |||
| <resheader name="resmimetype">text/microsoft-resx</resheader> | |||
| <resheader name="version">2.0</resheader> | |||
| <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | |||
| <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | |||
| <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | |||
| <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | |||
| <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | |||
| <value>[base64 mime encoded serialized .NET Framework object]</value> | |||
| </data> | |||
| <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||
| <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | |||
| <comment>This is a comment</comment> | |||
| </data> | |||
| There are any number of "resheader" rows that contain simple | |||
| name/value pairs. | |||
| Each data row contains a name, and value. The row also contains a | |||
| type or mimetype. Type corresponds to a .NET class that support | |||
| text/value conversion through the TypeConverter architecture. | |||
| Classes that don't support this are serialized and stored with the | |||
| mimetype set. | |||
| The mimetype is used for serialized objects, and tells the | |||
| ResXResourceReader how to depersist the object. This is currently not | |||
| extensible. For a given mimetype the value must be set accordingly: | |||
| Note - application/x-microsoft.net.object.binary.base64 is the format | |||
| that the ResXResourceWriter will generate, however the reader can | |||
| read any of the formats listed below. | |||
| mimetype: application/x-microsoft.net.object.binary.base64 | |||
| value : The object must be serialized with | |||
| : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | |||
| : and then encoded with base64 encoding. | |||
| mimetype: application/x-microsoft.net.object.soap.base64 | |||
| value : The object must be serialized with | |||
| : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | |||
| : and then encoded with base64 encoding. | |||
| mimetype: application/x-microsoft.net.object.bytearray.base64 | |||
| value : The object must be serialized into a byte array | |||
| : using a System.ComponentModel.TypeConverter | |||
| : and then encoded with base64 encoding. | |||
| --> | |||
| <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |||
| <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | |||
| <xsd:element name="root" msdata:IsDataSet="true"> | |||
| <xsd:complexType> | |||
| <xsd:choice maxOccurs="unbounded"> | |||
| <xsd:element name="metadata"> | |||
| <xsd:complexType> | |||
| <xsd:sequence> | |||
| <xsd:element name="value" type="xsd:string" minOccurs="0" /> | |||
| </xsd:sequence> | |||
| <xsd:attribute name="name" use="required" type="xsd:string" /> | |||
| <xsd:attribute name="type" type="xsd:string" /> | |||
| <xsd:attribute name="mimetype" type="xsd:string" /> | |||
| <xsd:attribute ref="xml:space" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| <xsd:element name="assembly"> | |||
| <xsd:complexType> | |||
| <xsd:attribute name="alias" type="xsd:string" /> | |||
| <xsd:attribute name="name" type="xsd:string" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| <xsd:element name="data"> | |||
| <xsd:complexType> | |||
| <xsd:sequence> | |||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||
| <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | |||
| </xsd:sequence> | |||
| <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | |||
| <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | |||
| <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | |||
| <xsd:attribute ref="xml:space" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| <xsd:element name="resheader"> | |||
| <xsd:complexType> | |||
| <xsd:sequence> | |||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||
| </xsd:sequence> | |||
| <xsd:attribute name="name" type="xsd:string" use="required" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| </xsd:choice> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| </xsd:schema> | |||
| <resheader name="resmimetype"> | |||
| <value>text/microsoft-resx</value> | |||
| </resheader> | |||
| <resheader name="version"> | |||
| <value>2.0</value> | |||
| </resheader> | |||
| <resheader name="reader"> | |||
| <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
| </resheader> | |||
| <resheader name="writer"> | |||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
| </resheader> | |||
| <metadata name="Product_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="State2Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="State3Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="State4Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="State5Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="CurrentState.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="CurrentWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="cb_check.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="carcassStateWeightBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||
| <value>107, 17</value> | |||
| </metadata> | |||
| <metadata name="D_GradeAndWeight_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="carcassStateWeightBindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||
| <value>360, 17</value> | |||
| </metadata> | |||
| <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||
| <value>17, 17</value> | |||
| </metadata> | |||
| <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>25</value> | |||
| </metadata> | |||
| </root> | |||
| @ -0,0 +1,18 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace CarcassStateWeight.Dtos | |||
| { | |||
| [Serializable] | |||
| public class ClientGoodsSetDto | |||
| { | |||
| public string Name { get; set; } | |||
| public long Goods_ID { get; set; } | |||
| public string Goods_Name { get; set; } | |||
| public string Goods_Code { get; set; } | |||
| public string Goods_Spec { get; set; } | |||
| } | |||
| } | |||
| @ -0,0 +1,21 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Windows.Forms; | |||
| namespace CarcassStateWeight | |||
| { | |||
| static class Program | |||
| { | |||
| /// <summary> | |||
| /// 应用程序的主入口点。 | |||
| /// </summary> | |||
| [STAThread] | |||
| static void Main() | |||
| { | |||
| Application.EnableVisualStyles(); | |||
| Application.SetCompatibleTextRenderingDefault(false); | |||
| Application.Run(new CarcassStateWeightForm()); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的一般信息由以下 | |||
| // 控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("CarcassStateWeight")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("CarcassStateWeight")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| //将 ComVisible 设置为 false 将使此程序集中的类型 | |||
| //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| //请将此类型的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("51c38871-00fe-4f18-bd49-d6a9124a844c")] | |||
| // 程序集的版本信息由下列四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: : | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||
| @ -0,0 +1,10 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <!-- | |||
| This file is automatically generated by Visual Studio .Net. It is | |||
| used to store generic object data source configuration information. | |||
| Renaming the file extension or editing the content of this file may | |||
| cause the file to be unrecognizable by the program. | |||
| --> | |||
| <GenericObjectDataSource DisplayName="CarcassStateWeight" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> | |||
| <TypeInfo>BO.BO.Bill.CarcassStateWeight, BO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> | |||
| </GenericObjectDataSource> | |||
| @ -0,0 +1,63 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // 此代码由工具生成。 | |||
| // 运行时版本:4.0.30319.42000 | |||
| // | |||
| // 对此文件的更改可能会导致不正确的行为,并且如果 | |||
| // 重新生成代码,这些更改将会丢失。 | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace CarcassStateWeight.Properties { | |||
| using System; | |||
| /// <summary> | |||
| /// 一个强类型的资源类,用于查找本地化的字符串等。 | |||
| /// </summary> | |||
| // 此类是由 StronglyTypedResourceBuilder | |||
| // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 | |||
| // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen | |||
| // (以 /str 作为命令选项),或重新生成 VS 项目。 | |||
| [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |||
| [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |||
| internal class Resources { | |||
| private static global::System.Resources.ResourceManager resourceMan; | |||
| private static global::System.Globalization.CultureInfo resourceCulture; | |||
| [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] | |||
| internal Resources() { | |||
| } | |||
| /// <summary> | |||
| /// 返回此类使用的缓存的 ResourceManager 实例。 | |||
| /// </summary> | |||
| [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] | |||
| internal static global::System.Resources.ResourceManager ResourceManager { | |||
| get { | |||
| if (object.ReferenceEquals(resourceMan, null)) { | |||
| global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CarcassStateWeight.Properties.Resources", typeof(Resources).Assembly); | |||
| resourceMan = temp; | |||
| } | |||
| return resourceMan; | |||
| } | |||
| } | |||
| /// <summary> | |||
| /// 使用此强类型资源类,为所有资源查找 | |||
| /// 重写当前线程的 CurrentUICulture 属性。 | |||
| /// </summary> | |||
| [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] | |||
| internal static global::System.Globalization.CultureInfo Culture { | |||
| get { | |||
| return resourceCulture; | |||
| } | |||
| set { | |||
| resourceCulture = value; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,117 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <root> | |||
| <!-- | |||
| Microsoft ResX Schema | |||
| Version 2.0 | |||
| The primary goals of this format is to allow a simple XML format | |||
| that is mostly human readable. The generation and parsing of the | |||
| various data types are done through the TypeConverter classes | |||
| associated with the data types. | |||
| Example: | |||
| ... ado.net/XML headers & schema ... | |||
| <resheader name="resmimetype">text/microsoft-resx</resheader> | |||
| <resheader name="version">2.0</resheader> | |||
| <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | |||
| <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | |||
| <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | |||
| <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | |||
| <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | |||
| <value>[base64 mime encoded serialized .NET Framework object]</value> | |||
| </data> | |||
| <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||
| <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | |||
| <comment>This is a comment</comment> | |||
| </data> | |||
| There are any number of "resheader" rows that contain simple | |||
| name/value pairs. | |||
| Each data row contains a name, and value. The row also contains a | |||
| type or mimetype. Type corresponds to a .NET class that support | |||
| text/value conversion through the TypeConverter architecture. | |||
| Classes that don't support this are serialized and stored with the | |||
| mimetype set. | |||
| The mimetype is used for serialized objects, and tells the | |||
| ResXResourceReader how to depersist the object. This is currently not | |||
| extensible. For a given mimetype the value must be set accordingly: | |||
| Note - application/x-microsoft.net.object.binary.base64 is the format | |||
| that the ResXResourceWriter will generate, however the reader can | |||
| read any of the formats listed below. | |||
| mimetype: application/x-microsoft.net.object.binary.base64 | |||
| value : The object must be serialized with | |||
| : System.Serialization.Formatters.Binary.BinaryFormatter | |||
| : and then encoded with base64 encoding. | |||
| mimetype: application/x-microsoft.net.object.soap.base64 | |||
| value : The object must be serialized with | |||
| : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | |||
| : and then encoded with base64 encoding. | |||
| mimetype: application/x-microsoft.net.object.bytearray.base64 | |||
| value : The object must be serialized into a byte array | |||
| : using a System.ComponentModel.TypeConverter | |||
| : and then encoded with base64 encoding. | |||
| --> | |||
| <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |||
| <xsd:element name="root" msdata:IsDataSet="true"> | |||
| <xsd:complexType> | |||
| <xsd:choice maxOccurs="unbounded"> | |||
| <xsd:element name="metadata"> | |||
| <xsd:complexType> | |||
| <xsd:sequence> | |||
| <xsd:element name="value" type="xsd:string" minOccurs="0" /> | |||
| </xsd:sequence> | |||
| <xsd:attribute name="name" type="xsd:string" /> | |||
| <xsd:attribute name="type" type="xsd:string" /> | |||
| <xsd:attribute name="mimetype" type="xsd:string" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| <xsd:element name="assembly"> | |||
| <xsd:complexType> | |||
| <xsd:attribute name="alias" type="xsd:string" /> | |||
| <xsd:attribute name="name" type="xsd:string" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| <xsd:element name="data"> | |||
| <xsd:complexType> | |||
| <xsd:sequence> | |||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||
| <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | |||
| </xsd:sequence> | |||
| <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> | |||
| <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | |||
| <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| <xsd:element name="resheader"> | |||
| <xsd:complexType> | |||
| <xsd:sequence> | |||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||
| </xsd:sequence> | |||
| <xsd:attribute name="name" type="xsd:string" use="required" /> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| </xsd:choice> | |||
| </xsd:complexType> | |||
| </xsd:element> | |||
| </xsd:schema> | |||
| <resheader name="resmimetype"> | |||
| <value>text/microsoft-resx</value> | |||
| </resheader> | |||
| <resheader name="version"> | |||
| <value>2.0</value> | |||
| </resheader> | |||
| <resheader name="reader"> | |||
| <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
| </resheader> | |||
| <resheader name="writer"> | |||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
| </resheader> | |||
| </root> | |||
| @ -0,0 +1,26 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // 此代码由工具生成。 | |||
| // 运行时版本:4.0.30319.42000 | |||
| // | |||
| // 对此文件的更改可能会导致不正确的行为,并且如果 | |||
| // 重新生成代码,这些更改将会丢失。 | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace CarcassStateWeight.Properties { | |||
| [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |||
| [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] | |||
| internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { | |||
| private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); | |||
| public static Settings Default { | |||
| get { | |||
| return defaultInstance; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,7 @@ | |||
| <?xml version='1.0' encoding='utf-8'?> | |||
| <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> | |||
| <Profiles> | |||
| <Profile Name="(Default)" /> | |||
| </Profiles> | |||
| <Settings /> | |||
| </SettingsFile> | |||
| @ -0,0 +1,25 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using CarcassStateWeight.Dtos; | |||
| using Forks.JsonRpc.Client; | |||
| using Newtonsoft.Json; | |||
| namespace CarcassStateWeight | |||
| { | |||
| public class SyncUtil | |||
| { | |||
| /// <summary> | |||
| /// 获取存货配置表 | |||
| /// </summary> | |||
| /// <returns></returns> | |||
| public static List<ClientGoodsSetDto> GetClientGoodsSetList() | |||
| { | |||
| var json = RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BillRpc/ClientGoodsSetRpc/GetList"); | |||
| var list = JsonConvert.DeserializeObject<List<ClientGoodsSetDto>>(json); | |||
| return list; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,3 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <configuration> | |||
| <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration> | |||
| @ -0,0 +1,59 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>9c789b74-7884-4fe4-b62b-c8833a4c40de</ProjectGuid> | |||
| <OutputType>Library</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>CarcassStateWeighting</RootNamespace> | |||
| <AssemblyName>CarcassStateWeighting</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"/> | |||
| <Reference Include="System.Core"/> | |||
| <Reference Include="System.Xml.Linq"/> | |||
| <Reference Include="System.Data.DataSetExtensions"/> | |||
| <Reference Include="Microsoft.CSharp"/> | |||
| <Reference Include="System.Data"/> | |||
| <Reference Include="System.Xml"/> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Compile Include="Class1.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,11 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| namespace CarcassStateWeighting | |||
| { | |||
| public class Class1 | |||
| { | |||
| } | |||
| } | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的一般信息由以下 | |||
| // 控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("CarcassStateWeighting")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("CarcassStateWeighting")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| //将 ComVisible 设置为 false 将使此程序集中的类型 | |||
| //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| //请将此类型的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("9c789b74-7884-4fe4-b62b-c8833a4c40de")] | |||
| // 程序集的版本信息由下列四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: : | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||