Browse Source

加经检费 猪场扣款。

master
yibo 8 years ago
parent
commit
9f3991d4a1
16 changed files with 1088 additions and 437 deletions
  1. +1
    -0
      BO/BO.csproj
  2. +4
    -0
      BO/BO/Bill/WeightBill/WeightBill.cs
  3. +23
    -0
      BO/BO/Bill/WeightBill/WeightDetail.cs
  4. +15
    -3
      BO/Utils/BillRpc/WeightBillRpc.cs
  5. +1
    -1
      ButcherManageClient/Login.cs
  6. +11
    -2
      ButcherManageClient/SettingForm.cs
  7. +16
    -16
      ButcherOrder/ViewDetail.Designer.cs
  8. +9
    -0
      ButcherWeight/ButcherWeight.csproj
  9. +172
    -0
      ButcherWeight/RecordView.Designer.cs
  10. +58
    -0
      ButcherWeight/RecordView.cs
  11. +138
    -0
      ButcherWeight/RecordView.resx
  12. +266
    -168
      ButcherWeight/WeightForm.Designer.cs
  13. +152
    -57
      ButcherWeight/WeightForm.cs
  14. +4
    -1
      ButcherWeight/WeightForm.resx
  15. +213
    -189
      WeighAndGrading/GradeFrom.Designer.cs
  16. +5
    -0
      WeighAndGrading/GradeFrom.cs

+ 1
- 0
BO/BO.csproj View File

@ -59,6 +59,7 @@
<Compile Include="BO\Bill\OrderDetail\OrderDetail.cs" />
<Compile Include="BO\Bill\SecondOrder\SecondOrder.cs" />
<Compile Include="BO\Bill\SecondOrder\SecondOrder_Detail.cs" />
<Compile Include="BO\Bill\WeightBill\WeightDetail.cs" />
<Compile Include="CTuple.cs" />
<Compile Include="Utils\AfterLoginUtil.cs" />
<Compile Include="Utils\BillRpc\GradeAndWeightRpc.cs" />


+ 4
- 0
BO/BO/Bill/WeightBill/WeightBill.cs View File

@ -60,6 +60,10 @@ namespace BO.BO
}
}
public decimal? JingJianFee { get; set; }
public decimal? DiscontMoney { get; set; }
public string AnimalTestNumber { get; set; }
public DateTime? AnimalTestDate { get; set; }


+ 23
- 0
BO/BO/Bill/WeightBill/WeightDetail.cs View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BO.BO
{
[Serializable]
public class WeightDetail
{
public long ID { get; set; }
public long WeightBill_Detail_ID { get; set; }
public string Type { get; set; }
public decimal Weight { get; set; }
public DateTime? Time { get; set; }
public bool Delete { get; set; }
}
}

+ 15
- 3
BO/Utils/BillRpc/WeightBillRpc.cs View File

@ -6,12 +6,14 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
namespace BO.Utils.BillRpc
{
public static class WeightBillRpc
{
public static bool Send(WeightBill bo)
static JavaScriptSerializer serializer = new JavaScriptSerializer();
public static bool Send(WeightBill bo, List<WeightDetail> weightRecord)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/UploadBill";
var obj = new RpcObject("/MainSystem/B3ClientService/BO/WeightBill");
@ -48,6 +50,8 @@ namespace BO.Utils.BillRpc
obj.Set("HogGrade_Name", bo.HogGrade_Name);
obj.Set("ShackWeight", bo.ShackWeight);
obj.Set("ShackPrice", bo.ShackPrice);
obj.Set("JingJianFee", bo.JingJianFee);
obj.Set("DiscontMoney", bo.DiscontMoney);
obj.Set("AnimalTestNumber", bo.AnimalTestNumber);
obj.Set("AnimalTestDate", bo.AnimalTestDate);
obj.Set("AnimalTestMan", bo.AnimalTestMan);
@ -94,8 +98,8 @@ namespace BO.Utils.BillRpc
}
obj.Set("FarmerDetails", farmerDetils);
var result = RpcFacade.Call<RpcObject>(method, obj);
var s = serializer.Serialize(weightRecord);
var result = RpcFacade.Call<RpcObject>(method, obj, s);
if (bo.ID == 0)
bo.ID = result.Get<long>("ID");
var detailReturns = result.Get<List<RpcObject>>("DetailBack");
@ -353,5 +357,13 @@ namespace BO.Utils.BillRpc
}
return entity;
}
public static List<WeightDetail> GetWeightRecord(long id)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/GetWeightRecord";
var obj = RpcFacade.Call<string>(method, id);
obj = obj.ESerializeDateTime();
return serializer.Deserialize<List<WeightDetail>>(obj);
}
}
}

+ 1
- 1
ButcherManageClient/Login.cs View File

@ -36,7 +36,7 @@ namespace ButcherManageClient
private void settingBtn_Click(object sender, EventArgs e)
{
var f = new SettingForm();
var f = new SettingForm(rpcFacadeInited);
f.ShowDialog();
}


+ 11
- 2
ButcherManageClient/SettingForm.cs View File

@ -8,15 +8,18 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BO.Utils;
using Forks.JsonRpc.Client;
namespace ButcherManageClient
{
public partial class SettingForm : Form
{
public SettingForm()
bool mInited;
public SettingForm(bool rpcFacadeInited)
{
InitializeComponent();
uTextBoxWithPad1.Text = ButcherAppContext.Context.UrlConfig.ServerUrl;
mInited = rpcFacadeInited;
}
private void cancelBtn_Click(object sender, EventArgs e)
@ -26,8 +29,14 @@ namespace ButcherManageClient
private void saveBtn_Click(object sender, EventArgs e)
{
ButcherAppContext.Context.UrlConfig.ServerUrl = this.uTextBoxWithPad1.Text.Trim();
string uri = this.uTextBoxWithPad1.Text.Trim();
if (string.IsNullOrEmpty(uri))
throw new Exception("请先设置服务器地址");
ButcherAppContext.Context.UrlConfig.ServerUrl = uri;
ButcherAppContext.Context.Save();
if (mInited)
RpcFacade.ReInit(ButcherAppContext.Context.UrlConfig.ServerUrl);
MessageBox.Show("设置保存成功!");
}
}


+ 16
- 16
ButcherOrder/ViewDetail.Designer.cs View File

@ -28,9 +28,9 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.orderLabel = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
@ -124,17 +124,17 @@
this.detailGridView1.AllowUserToDeleteRows = false;
this.detailGridView1.AllowUserToResizeColumns = false;
this.detailGridView1.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.detailGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.detailGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.detailGridView1.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.detailGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.detailGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
this.detailGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.detailGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ID,
@ -147,8 +147,8 @@
this.detailGridView1.Name = "detailGridView1";
this.detailGridView1.ReadOnly = true;
this.detailGridView1.RowHeadersVisible = false;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.detailGridView1.RowsDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.detailGridView1.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.detailGridView1.RowTemplate.Height = 40;
this.detailGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.detailGridView1.Size = new System.Drawing.Size(488, 287);
@ -201,6 +201,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(576, 436);
this.ControlBox = false;
this.Controls.Add(this.detailGridView1);
this.Controls.Add(this.closeBtn);
this.Controls.Add(this.hotFadeNumberLabel);
@ -210,7 +211,6 @@
this.Controls.Add(this.orderLabel);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "ViewDetail";
this.Text = "查看明细";
((System.ComponentModel.ISupportInitialize)(this.detailGridView1)).EndInit();


+ 9
- 0
ButcherWeight/ButcherWeight.csproj View File

@ -58,6 +58,12 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RecordView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="RecordView.Designer.cs">
<DependentUpon>RecordView.cs</DependentUpon>
</Compile>
<Compile Include="WeightConfig.cs">
<SubType>Form</SubType>
</Compile>
@ -86,6 +92,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="RecordView.resx">
<DependentUpon>RecordView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WeightConfig.resx">
<DependentUpon>WeightConfig.cs</DependentUpon>
</EmbeddedResource>


+ 172
- 0
ButcherWeight/RecordView.Designer.cs View File

@ -0,0 +1,172 @@
namespace ButcherWeight
{
partial class RecordView
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.detailGridView = new BWP.WinFormControl.UDataGridView();
this.closeBtn = new System.Windows.Forms.Button();
this.D_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_WeightBill_Detail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Tpye = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Delete = new System.Windows.Forms.DataGridViewButtonColumn();
((System.ComponentModel.ISupportInitialize)(this.detailGridView)).BeginInit();
this.SuspendLayout();
//
// detailGridView
//
this.detailGridView.AllowUserToAddRows = false;
this.detailGridView.AllowUserToDeleteRows = false;
this.detailGridView.AllowUserToResizeColumns = false;
this.detailGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.detailGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.detailGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.detailGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.detailGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.detailGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.D_ID,
this.D_WeightBill_Detail_ID,
this.D_Tpye,
this.D_Weight,
this.D_Time,
this.D_Delete});
this.detailGridView.Location = new System.Drawing.Point(27, 26);
this.detailGridView.MultiSelect = false;
this.detailGridView.Name = "detailGridView";
this.detailGridView.ReadOnly = true;
this.detailGridView.RowHeadersVisible = false;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.detailGridView.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.detailGridView.RowTemplate.Height = 40;
this.detailGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.detailGridView.Size = new System.Drawing.Size(515, 323);
this.detailGridView.TabIndex = 0;
this.detailGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.detailGridView_CellContentClick);
//
// closeBtn
//
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.Location = new System.Drawing.Point(212, 372);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(146, 52);
this.closeBtn.TabIndex = 1;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// D_ID
//
this.D_ID.DataPropertyName = "ID";
this.D_ID.HeaderText = "ID";
this.D_ID.Name = "D_ID";
this.D_ID.ReadOnly = true;
this.D_ID.Visible = false;
//
// D_WeightBill_Detail_ID
//
this.D_WeightBill_Detail_ID.DataPropertyName = "WeightBill_Detail_ID";
this.D_WeightBill_Detail_ID.HeaderText = "WeightBill_Detail_ID";
this.D_WeightBill_Detail_ID.Name = "D_WeightBill_Detail_ID";
this.D_WeightBill_Detail_ID.ReadOnly = true;
this.D_WeightBill_Detail_ID.Visible = false;
//
// D_Tpye
//
this.D_Tpye.DataPropertyName = "Type";
this.D_Tpye.HeaderText = "类型";
this.D_Tpye.Name = "D_Tpye";
this.D_Tpye.ReadOnly = true;
//
// D_Weight
//
this.D_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle3.Format = "#0.######";
this.D_Weight.DefaultCellStyle = dataGridViewCellStyle3;
this.D_Weight.HeaderText = "重量";
this.D_Weight.Name = "D_Weight";
this.D_Weight.ReadOnly = true;
//
// D_Time
//
this.D_Time.DataPropertyName = "Time";
this.D_Time.HeaderText = "时间";
this.D_Time.Name = "D_Time";
this.D_Time.ReadOnly = true;
this.D_Time.Width = 150;
//
// D_Delete
//
this.D_Delete.HeaderText = "删除";
this.D_Delete.Name = "D_Delete";
this.D_Delete.ReadOnly = true;
this.D_Delete.Text = "删除";
this.D_Delete.UseColumnTextForButtonValue = true;
this.D_Delete.Width = 140;
//
// RecordView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(576, 436);
this.ControlBox = false;
this.Controls.Add(this.closeBtn);
this.Controls.Add(this.detailGridView);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "RecordView";
this.Text = "过磅明细";
((System.ComponentModel.ISupportInitialize)(this.detailGridView)).EndInit();
this.ResumeLayout(false);
}
#endregion
private BWP.WinFormControl.UDataGridView detailGridView;
private System.Windows.Forms.Button closeBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn D_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_WeightBill_Detail_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Tpye;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Time;
private System.Windows.Forms.DataGridViewButtonColumn D_Delete;
}
}

+ 58
- 0
ButcherWeight/RecordView.cs View File

@ -0,0 +1,58 @@
using BO.BO;
using BO.Utils.BillRpc;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ButcherWeight
{
public partial class RecordView : Form
{
bool changed = false;
List<WeightDetail> mRecords;
public RecordView(List<WeightDetail> records)
{
InitializeComponent();
detailGridView.AutoGenerateColumns = false;
mRecords = records;
BindGrid();
}
void BindGrid()
{
detailGridView.DataSource = null;
if (mRecords.Any())
detailGridView.DataSource = mRecords.Where(x => !x.Delete).ToList();
detailGridView.Refresh();
}
private void closeBtn_Click(object sender, EventArgs e)
{
if (changed)
DialogResult = DialogResult.OK;
this.Close();
}
private void detailGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
if (e.ColumnIndex != detailGridView.ColumnCount - 1)
return;
var entity = detailGridView.CurrentRow.DataBoundItem as WeightDetail;
if (entity.ID == 0)
mRecords.Remove(entity);
else
entity.Delete = true;
if (!changed)
changed = true;
BindGrid();
}
}
}

+ 138
- 0
ButcherWeight/RecordView.resx View File

@ -0,0 +1,138 @@
<?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="D_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_WeightBill_Detail_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Tpye.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Delete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 266
- 168
ButcherWeight/WeightForm.Designer.cs View File

@ -30,21 +30,25 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.enableCheckBox = new System.Windows.Forms.CheckBox();
this.weightSet = new System.Windows.Forms.Button();
@ -129,17 +133,6 @@
this.S_AbnormalItem_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.S_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.billGrid = new System.Windows.Forms.DataGridView();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.weightLabel = new System.Windows.Forms.Label();
this.weightSerialPort = new System.IO.Ports.SerialPort(this.components);
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.queryBtn = new System.Windows.Forms.Button();
this.qSupplierSelect = new BWP.WinFormControl.UComboBox();
this.qCarSelect = new BWP.WinFormControl.UComboBox();
this.M_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Car_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -151,6 +144,24 @@
this.M_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_SanctionNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.weightLabel = new System.Windows.Forms.Label();
this.weightSerialPort = new System.IO.Ports.SerialPort(this.components);
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.queryBtn = new System.Windows.Forms.Button();
this.qSupplierSelect = new BWP.WinFormControl.UComboBox();
this.qCarSelect = new BWP.WinFormControl.UComboBox();
this.farmerMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.farmerDelete = new System.Windows.Forms.ToolStripMenuItem();
this.viewDetailBtn = new System.Windows.Forms.Button();
this.jingjianInput = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.discontInput = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
@ -161,6 +172,7 @@
((System.ComponentModel.ISupportInitialize)(this.abnormalGrid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.billGrid)).BeginInit();
this.panel5.SuspendLayout();
this.farmerMenu.SuspendLayout();
this.SuspendLayout();
//
// panel1
@ -285,6 +297,10 @@
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.discontInput);
this.panel2.Controls.Add(this.label9);
this.panel2.Controls.Add(this.jingjianInput);
this.panel2.Controls.Add(this.label6);
this.panel2.Controls.Add(this.zoneSelect);
this.panel2.Controls.Add(this.hogGradeSelect);
this.panel2.Controls.Add(this.label2);
@ -551,6 +567,7 @@
this.penMoneyInput.Font = new System.Drawing.Font("宋体", 14F);
this.penMoneyInput.Location = new System.Drawing.Point(854, 89);
this.penMoneyInput.Name = "penMoneyInput";
this.penMoneyInput.ReadOnly = true;
this.penMoneyInput.Size = new System.Drawing.Size(135, 29);
this.penMoneyInput.TabIndex = 15;
//
@ -569,6 +586,7 @@
this.penPriceInput.Name = "penPriceInput";
this.penPriceInput.Size = new System.Drawing.Size(135, 29);
this.penPriceInput.TabIndex = 12;
this.penPriceInput.TextChanged += new System.EventHandler(this.penWeightPriceInput_TextChanged);
//
// testCardNumberInput
//
@ -585,6 +603,7 @@
this.penWeightInput.Name = "penWeightInput";
this.penWeightInput.Size = new System.Drawing.Size(135, 29);
this.penWeightInput.TabIndex = 0;
this.penWeightInput.TextChanged += new System.EventHandler(this.penWeightPriceInput_TextChanged);
//
// label14
//
@ -622,9 +641,9 @@
this.label11.Font = new System.Drawing.Font("宋体", 14F);
this.label11.Location = new System.Drawing.Point(757, 136);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(85, 19);
this.label11.Size = new System.Drawing.Size(47, 19);
this.label11.TabIndex = 4;
this.label11.Text = "备注说明";
this.label11.Text = "摘要";
//
// label10
//
@ -706,17 +725,17 @@
this.farmerGrid.AllowUserToDeleteRows = false;
this.farmerGrid.AllowUserToResizeColumns = false;
this.farmerGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle20.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle20;
this.farmerGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.farmerGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.farmerGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle21;
this.farmerGrid.ColumnHeadersHeight = 24;
this.farmerGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.farmerGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -732,12 +751,13 @@
this.farmerGrid.MultiSelect = false;
this.farmerGrid.Name = "farmerGrid";
this.farmerGrid.RowHeadersVisible = false;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle22.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle22;
this.farmerGrid.RowTemplate.Height = 23;
this.farmerGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.farmerGrid.Size = new System.Drawing.Size(400, 112);
this.farmerGrid.TabIndex = 8;
this.farmerGrid.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.farmerGrid_CellMouseDown);
//
// F_ID
//
@ -822,17 +842,17 @@
this.weightGrid.AllowUserToAddRows = false;
this.weightGrid.AllowUserToResizeColumns = false;
this.weightGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle23.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle23;
this.weightGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle24.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle24.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle24.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle24.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle24.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle24;
this.weightGrid.ColumnHeadersHeight = 24;
this.weightGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.weightGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -848,8 +868,8 @@
this.weightGrid.MultiSelect = false;
this.weightGrid.Name = "weightGrid";
this.weightGrid.RowHeadersVisible = false;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle28.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle28;
this.weightGrid.RowTemplate.Height = 23;
this.weightGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.weightGrid.Size = new System.Drawing.Size(400, 90);
@ -894,6 +914,8 @@
// D_MaoWeight
//
this.D_MaoWeight.DataPropertyName = "MaoWeight";
dataGridViewCellStyle25.Format = "#0.######";
this.D_MaoWeight.DefaultCellStyle = dataGridViewCellStyle25;
this.D_MaoWeight.HeaderText = "毛重";
this.D_MaoWeight.Name = "D_MaoWeight";
this.D_MaoWeight.ReadOnly = true;
@ -902,6 +924,8 @@
// D_PiWeight
//
this.D_PiWeight.DataPropertyName = "PiWeight";
dataGridViewCellStyle26.Format = "#0.######";
this.D_PiWeight.DefaultCellStyle = dataGridViewCellStyle26;
this.D_PiWeight.HeaderText = "皮重";
this.D_PiWeight.Name = "D_PiWeight";
this.D_PiWeight.ReadOnly = true;
@ -910,6 +934,8 @@
// D_Weight
//
this.D_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle27.Format = "#0.######";
this.D_Weight.DefaultCellStyle = dataGridViewCellStyle27;
this.D_Weight.HeaderText = "重量";
this.D_Weight.Name = "D_Weight";
this.D_Weight.ReadOnly = true;
@ -930,17 +956,17 @@
this.houseGird.AllowUserToDeleteRows = false;
this.houseGird.AllowUserToResizeColumns = false;
this.houseGird.AllowUserToResizeRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle29.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.houseGird.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle29;
this.houseGird.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle30.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle30.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle30.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle30.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle30.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.houseGird.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle30;
this.houseGird.ColumnHeadersHeight = 24;
this.houseGird.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.houseGird.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -955,8 +981,8 @@
this.houseGird.MultiSelect = false;
this.houseGird.Name = "houseGird";
this.houseGird.RowHeadersVisible = false;
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle31.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle31;
this.houseGird.RowTemplate.Height = 23;
this.houseGird.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.houseGird.Size = new System.Drawing.Size(400, 90);
@ -1019,17 +1045,17 @@
this.abnormalGrid.AllowUserToDeleteRows = false;
this.abnormalGrid.AllowUserToResizeColumns = false;
this.abnormalGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle32.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.abnormalGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle32;
this.abnormalGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle33.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle33.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle33.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle33.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle33.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle33.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.abnormalGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle33;
this.abnormalGrid.ColumnHeadersHeight = 24;
this.abnormalGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.abnormalGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -1045,8 +1071,8 @@
this.abnormalGrid.MultiSelect = false;
this.abnormalGrid.Name = "abnormalGrid";
this.abnormalGrid.RowHeadersVisible = false;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle12;
dataGridViewCellStyle34.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle34;
this.abnormalGrid.RowTemplate.Height = 23;
this.abnormalGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.abnormalGrid.Size = new System.Drawing.Size(400, 237);
@ -1115,17 +1141,17 @@
this.billGrid.AllowUserToDeleteRows = false;
this.billGrid.AllowUserToResizeColumns = false;
this.billGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle35.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.billGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle35;
this.billGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle36.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle36.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle36.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle36.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle36.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.billGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle36;
this.billGrid.ColumnHeadersHeight = 24;
this.billGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.billGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -1145,14 +1171,102 @@
this.billGrid.Name = "billGrid";
this.billGrid.ReadOnly = true;
this.billGrid.RowHeadersVisible = false;
dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle38.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle38;
this.billGrid.RowTemplate.Height = 23;
this.billGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.billGrid.Size = new System.Drawing.Size(1250, 230);
this.billGrid.TabIndex = 0;
this.billGrid.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.billGrid_CellDoubleClick);
//
// M_ID
//
this.M_ID.DataPropertyName = "ID";
this.M_ID.HeaderText = "ID";
this.M_ID.Name = "M_ID";
this.M_ID.ReadOnly = true;
this.M_ID.Visible = false;
//
// M_B3ID
//
this.M_B3ID.DataPropertyName = "B3ID";
this.M_B3ID.HeaderText = "过磅单号";
this.M_B3ID.Name = "M_B3ID";
this.M_B3ID.ReadOnly = true;
//
// M_Car_Name
//
this.M_Car_Name.DataPropertyName = "Car_Name";
this.M_Car_Name.HeaderText = "车辆";
this.M_Car_Name.Name = "M_Car_Name";
this.M_Car_Name.ReadOnly = true;
this.M_Car_Name.Width = 120;
//
// M_Supplier_Name
//
this.M_Supplier_Name.DataPropertyName = "Supplier_Name";
this.M_Supplier_Name.HeaderText = "供应商";
this.M_Supplier_Name.Name = "M_Supplier_Name";
this.M_Supplier_Name.ReadOnly = true;
this.M_Supplier_Name.Width = 120;
//
// M_Employee_Name
//
this.M_Employee_Name.DataPropertyName = "Employee_Name";
this.M_Employee_Name.HeaderText = "业务员";
this.M_Employee_Name.Name = "M_Employee_Name";
this.M_Employee_Name.ReadOnly = true;
this.M_Employee_Name.Width = 110;
//
// M_PurchaseType_Name
//
this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name";
this.M_PurchaseType_Name.HeaderText = "收购类型";
this.M_PurchaseType_Name.Name = "M_PurchaseType_Name";
this.M_PurchaseType_Name.ReadOnly = true;
this.M_PurchaseType_Name.Width = 110;
//
// M_Number
//
this.M_Number.DataPropertyName = "Number";
this.M_Number.HeaderText = "收购头数";
this.M_Number.Name = "M_Number";
this.M_Number.ReadOnly = true;
this.M_Number.Width = 110;
//
// M_Weight
//
this.M_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle37.Format = "#0.######";
this.M_Weight.DefaultCellStyle = dataGridViewCellStyle37;
this.M_Weight.HeaderText = "收购重量";
this.M_Weight.Name = "M_Weight";
this.M_Weight.ReadOnly = true;
this.M_Weight.Width = 120;
//
// M_HouseNames
//
this.M_HouseNames.DataPropertyName = "HouseNames";
this.M_HouseNames.HeaderText = "圈舍";
this.M_HouseNames.Name = "M_HouseNames";
this.M_HouseNames.ReadOnly = true;
this.M_HouseNames.Width = 180;
//
// M_SanctionNumber
//
this.M_SanctionNumber.DataPropertyName = "SanctionNumber";
this.M_SanctionNumber.HeaderText = "异常明细";
this.M_SanctionNumber.Name = "M_SanctionNumber";
this.M_SanctionNumber.ReadOnly = true;
//
// M_Remark
//
this.M_Remark.DataPropertyName = "Remark";
this.M_Remark.HeaderText = "摘要";
this.M_Remark.Name = "M_Remark";
this.M_Remark.ReadOnly = true;
this.M_Remark.Width = 130;
//
// label15
//
this.label15.AutoSize = true;
@ -1263,97 +1377,73 @@
this.qCarSelect.Size = new System.Drawing.Size(135, 27);
this.qCarSelect.TabIndex = 40;
//
// M_ID
// farmerMenu
//
this.M_ID.DataPropertyName = "ID";
this.M_ID.HeaderText = "ID";
this.M_ID.Name = "M_ID";
this.M_ID.ReadOnly = true;
this.M_ID.Visible = false;
//
// M_B3ID
//
this.M_B3ID.DataPropertyName = "B3ID";
this.M_B3ID.HeaderText = "过磅单号";
this.M_B3ID.Name = "M_B3ID";
this.M_B3ID.ReadOnly = true;
this.farmerMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.farmerDelete});
this.farmerMenu.Name = "farmerMenu";
this.farmerMenu.Size = new System.Drawing.Size(101, 26);
//
// M_Car_Name
// farmerDelete
//
this.M_Car_Name.DataPropertyName = "Car_Name";
this.M_Car_Name.HeaderText = "车辆";
this.M_Car_Name.Name = "M_Car_Name";
this.M_Car_Name.ReadOnly = true;
this.M_Car_Name.Width = 120;
//
// M_Supplier_Name
//
this.M_Supplier_Name.DataPropertyName = "Supplier_Name";
this.M_Supplier_Name.HeaderText = "供应商";
this.M_Supplier_Name.Name = "M_Supplier_Name";
this.M_Supplier_Name.ReadOnly = true;
this.M_Supplier_Name.Width = 120;
//
// M_Employee_Name
//
this.M_Employee_Name.DataPropertyName = "Employee_Name";
this.M_Employee_Name.HeaderText = "业务员";
this.M_Employee_Name.Name = "M_Employee_Name";
this.M_Employee_Name.ReadOnly = true;
this.M_Employee_Name.Width = 110;
//
// M_PurchaseType_Name
//
this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name";
this.M_PurchaseType_Name.HeaderText = "收购类型";
this.M_PurchaseType_Name.Name = "M_PurchaseType_Name";
this.M_PurchaseType_Name.ReadOnly = true;
this.M_PurchaseType_Name.Width = 110;
this.farmerDelete.Name = "farmerDelete";
this.farmerDelete.Size = new System.Drawing.Size(100, 22);
this.farmerDelete.Text = "删除";
this.farmerDelete.Click += new System.EventHandler(this.farmerDelete_Click);
//
// M_Number
// viewDetailBtn
//
this.M_Number.DataPropertyName = "Number";
this.M_Number.HeaderText = "收购头数";
this.M_Number.Name = "M_Number";
this.M_Number.ReadOnly = true;
this.M_Number.Width = 110;
this.viewDetailBtn.Font = new System.Drawing.Font("宋体", 15F);
this.viewDetailBtn.Location = new System.Drawing.Point(104, 287);
this.viewDetailBtn.Name = "viewDetailBtn";
this.viewDetailBtn.Size = new System.Drawing.Size(80, 30);
this.viewDetailBtn.TabIndex = 44;
this.viewDetailBtn.Text = "记录";
this.viewDetailBtn.UseVisualStyleBackColor = true;
this.viewDetailBtn.Click += new System.EventHandler(this.viewDetailBtn_Click);
//
// M_Weight
// jingjianInput
//
this.M_Weight.DataPropertyName = "Weight";
this.M_Weight.HeaderText = "收购重量";
this.M_Weight.Name = "M_Weight";
this.M_Weight.ReadOnly = true;
this.M_Weight.Width = 120;
this.jingjianInput.Font = new System.Drawing.Font("宋体", 14F);
this.jingjianInput.Location = new System.Drawing.Point(599, 9);
this.jingjianInput.Name = "jingjianInput";
this.jingjianInput.Size = new System.Drawing.Size(135, 29);
this.jingjianInput.TabIndex = 39;
//
// M_HouseNames
// label6
//
this.M_HouseNames.DataPropertyName = "HouseNames";
this.M_HouseNames.HeaderText = "圈舍";
this.M_HouseNames.Name = "M_HouseNames";
this.M_HouseNames.ReadOnly = true;
this.M_HouseNames.Width = 180;
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("宋体", 14F);
this.label6.Location = new System.Drawing.Point(501, 15);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(66, 19);
this.label6.TabIndex = 38;
this.label6.Text = "经检费";
//
// M_SanctionNumber
// discontInput
//
this.M_SanctionNumber.DataPropertyName = "SanctionNumber";
this.M_SanctionNumber.HeaderText = "异常明细";
this.M_SanctionNumber.Name = "M_SanctionNumber";
this.M_SanctionNumber.ReadOnly = true;
this.discontInput.Font = new System.Drawing.Font("宋体", 14F);
this.discontInput.Location = new System.Drawing.Point(599, 49);
this.discontInput.Name = "discontInput";
this.discontInput.Size = new System.Drawing.Size(135, 29);
this.discontInput.TabIndex = 41;
//
// M_Remark
// label9
//
this.M_Remark.DataPropertyName = "Remark";
this.M_Remark.HeaderText = "摘要";
this.M_Remark.Name = "M_Remark";
this.M_Remark.ReadOnly = true;
this.M_Remark.Width = 130;
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("宋体", 14F);
this.label9.Location = new System.Drawing.Point(501, 55);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(85, 19);
this.label9.TabIndex = 40;
this.label9.Text = "猪场扣款";
//
// WeightForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1276, 831);
this.Controls.Add(this.viewDetailBtn);
this.Controls.Add(this.queryBtn);
this.Controls.Add(this.qSupplierSelect);
this.Controls.Add(this.label5);
@ -1388,6 +1478,7 @@
((System.ComponentModel.ISupportInitialize)(this.billGrid)).EndInit();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.farmerMenu.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -1445,14 +1536,6 @@
private System.Windows.Forms.Label label1;
private BWP.WinFormControl.UComboBox farmerSelect;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.DataGridViewTextBoxColumn D_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_B3ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_WeightBill_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Index;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn D_MaoWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn D_PiWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_B3ID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_WeightBill_ID;
@ -1490,6 +1573,17 @@
private System.Windows.Forms.DataGridViewTextBoxColumn F_Farmer_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Weight;
private System.Windows.Forms.ContextMenuStrip farmerMenu;
private System.Windows.Forms.ToolStripMenuItem farmerDelete;
private System.Windows.Forms.Button viewDetailBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn D_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_B3ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_WeightBill_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Index;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn D_MaoWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn D_PiWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn M_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn M_B3ID;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Car_Name;
@ -1501,5 +1595,9 @@
private System.Windows.Forms.DataGridViewTextBoxColumn M_HouseNames;
private System.Windows.Forms.DataGridViewTextBoxColumn M_SanctionNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Remark;
private System.Windows.Forms.TextBox discontInput;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox jingjianInput;
private System.Windows.Forms.Label label6;
}
}

+ 152
- 57
ButcherWeight/WeightForm.cs View File

@ -43,7 +43,7 @@ namespace ButcherWeight
hogGradeSelect.Init("BaseInfoRpc/GetHogGradeList");
zoneSelect.Init("BaseInfoRpc/GetZoneList");
farmerSelect.Init("BaseInfoRpc/GetFarmerList");
qCarSelect.Init("BaseInfoRpc/GetCarList");
qSupplierSelect.Init("BaseInfoRpc/GetSupplierList");
farmerSelect.EnableTopItem = false;
@ -179,7 +179,8 @@ namespace ButcherWeight
private WeightBill Dmo = new WeightBill();
private List<WeightBill_FarmerDetail> _farmerDetails = new List<WeightBill_FarmerDetail>();
private List<WeightBill_Detail> _details = new List<WeightBill_Detail>();
private List<WeightBill_FarmerDetail> _fDelete = new List<WeightBill_FarmerDetail>();
private List<WeightDetail> weightRecord = new List<WeightDetail>();
private void exitBtn_Click(object sender, EventArgs e)
{
@ -193,16 +194,19 @@ namespace ButcherWeight
if (!_details.Any())
throw new Exception("没有称重记录");
//if (!_farmerDetails.Any())
//throw new Exception("没有养殖户信息");
//throw new Exception("没有养殖户信息");
GetFromUI();
Dmo.Details.Clear();
Dmo.Details.AddRange(_details.ToList());
Dmo.FarmerDetails.Clear();
Dmo.FarmerDetails.AddRange(_farmerDetails.ToList());
Dmo.FarmerDetails.AddRange(_fDelete.ToList());
var isNew = Dmo.ID == 0;
var result = WeightBillRpc.Send(Dmo);
var send = weightRecord.Where(x => x.Delete || x.ID == 0).ToList();
var result = WeightBillRpc.Send(Dmo, send);
weightRecord.Clear();
if (isNew)
dmoList.Add(Dmo);
BindWeightBill();
@ -228,8 +232,17 @@ namespace ButcherWeight
}
else
d = weightGrid.CurrentRow.DataBoundItem as WeightBill_Detail;
d.MaoWeight = WeightValue;
d.MaoWeight = (d.MaoWeight ?? 0) + (WeightValue ?? 0);
d.Weight = (d.MaoWeight ?? 0) - (d.PiWeight ?? 0);
var record = new WeightDetail();
record.Time = DateTime.Now;
record.Type = "毛重";
record.Weight = WeightValue ?? 0;
record.WeightBill_Detail_ID = d.ID;
weightRecord.Add(record);
weightGrid.DataSource = _details;
weightGrid.Refresh();
WeightValue = null;
@ -243,11 +256,16 @@ namespace ButcherWeight
return;
}
var target = weightGrid.CurrentRow.DataBoundItem as WeightBill_Detail;
target.PiWeight = WeightValue;
target.PiWeight = (target.PiWeight ?? 0) + (WeightValue ?? 0);
target.Weight = target.MaoWeight - target.PiWeight;
var record = new WeightDetail();
record.Time = DateTime.Now;
record.Type = "皮重";
record.Weight = WeightValue ?? 0;
record.WeightBill_Detail_ID = target.ID;
weightRecord.Add(record);
weightGrid.Refresh();
WeightValue = null;
}
private void farmerSelect_SelectedIndexChanged(object sender, EventArgs e)
@ -270,46 +288,23 @@ namespace ButcherWeight
void GetFromUI()
{
if (!employeeSelect.IsEmpty)
{
Dmo.Employee_ID = long.Parse(employeeSelect.Value);
Dmo.Employee_Name = employeeSelect.DisplayValue;
}
Dmo.Employee_ID = employeeSelect.LongValue;
Dmo.Employee_Name = employeeSelect.DisplayValue;
Dmo.WeighTime = weightTimeSelect.Date;
if (!supplierSelect.IsEmpty)
{
Dmo.Supplier_ID = long.Parse(supplierSelect.Value);
Dmo.Supplier_Name = supplierSelect.DisplayValue;
}
if (!zoneSelect.IsEmpty)
{
Dmo.Zone_ID = long.Parse(zoneSelect.Value);
Dmo.Zone_Name = zoneSelect.DisplayValue;
}
Dmo.Supplier_ID = supplierSelect.LongValue;
Dmo.Supplier_Name = supplierSelect.DisplayValue;
Dmo.Zone_ID = zoneSelect.LongValue;
Dmo.Zone_Name = zoneSelect.DisplayValue;
Dmo.PurchaseType_ID = null;
if (!purchaseTypeSelect.IsEmpty)
{
Dmo.PurchaseType_ID = short.Parse(purchaseTypeSelect.Value);
Dmo.PurchaseType_Name = purchaseTypeSelect.DisplayValue;
}
if (!carSelect.IsEmpty)
{
Dmo.Car_ID = long.Parse(carSelect.Value);
Dmo.Car_Name = carSelect.DisplayValue;
}
if (!liveVarietiesSelect.IsEmpty)
{
Dmo.LiveVarieties_ID = long.Parse(liveVarietiesSelect.Value);
Dmo.LiveVarieties_Name = liveVarietiesSelect.DisplayValue;
}
if (!hogGradeSelect.IsEmpty)
{
Dmo.HogGrade_ID = long.Parse(hogGradeSelect.Value);
Dmo.HogGrade_Name = hogGradeSelect.DisplayValue;
}
Dmo.PurchaseType_Name = purchaseTypeSelect.DisplayValue;
Dmo.Car_ID = carSelect.LongValue;
Dmo.Car_Name = carSelect.DisplayValue;
Dmo.LiveVarieties_ID = liveVarietiesSelect.LongValue;
Dmo.LiveVarieties_Name = liveVarietiesSelect.DisplayValue;
Dmo.HogGrade_ID = hogGradeSelect.LongValue;
Dmo.HogGrade_Name = hogGradeSelect.DisplayValue;
if (!string.IsNullOrEmpty(penWeightInput.Text))
{
@ -318,6 +313,8 @@ namespace ButcherWeight
throw new Exception("棚前重量输入错误");
Dmo.ShackWeight = pw;
}
else
Dmo.ShackWeight = null;
if (!string.IsNullOrEmpty(penPriceInput.Text))
{
decimal pp = 0;
@ -325,22 +322,35 @@ namespace ButcherWeight
throw new Exception("棚前单价输入错误");
Dmo.ShackPrice = pp;
}
if (!string.IsNullOrEmpty(testCardNumberInput.Text))
Dmo.AnimalTestNumber = testCardNumberInput.Text;
if (!string.IsNullOrEmpty(testTimeInput.Text))
Dmo.AnimalTestDate = testTimeInput.Date;
if (!string.IsNullOrEmpty(testManInput.Text))
Dmo.AnimalTestMan = testManInput.Text;
if (!string.IsNullOrEmpty(remarkInput.Text))
Dmo.Remark = remarkInput.Text;
else
Dmo.ShackPrice = null;
if (!string.IsNullOrEmpty(jingjianInput.Text))
{
decimal jjf = 0;
if (!decimal.TryParse(jingjianInput.Text.Trim(), out jjf))
throw new Exception("经检费输入错误");
Dmo.JingJianFee = jjf;
}
else
Dmo.JingJianFee = null;
if (!string.IsNullOrEmpty(discontInput.Text))
{
decimal dicont = 0;
if (!decimal.TryParse(discontInput.Text.Trim(), out dicont))
throw new Exception("猪场扣款输入错误");
Dmo.DiscontMoney = dicont;
}
else
Dmo.DiscontMoney = null;
Dmo.AnimalTestNumber = testCardNumberInput.Text;
Dmo.AnimalTestDate = testTimeInput.Date;
Dmo.AnimalTestMan = testManInput.Text;
Dmo.Remark = remarkInput.Text;
foreach (DataGridViewRow data in farmerGrid.Rows)
{
var detail = data.DataBoundItem as WeightBill_FarmerDetail;
var first =_farmerDetails.First(x => x.Index == detail.Index);
var first = _farmerDetails.First(x => x.Index == detail.Index);
first.Number = detail.Number;
first.Weight = detail.Weight;
}
@ -392,6 +402,12 @@ namespace ButcherWeight
if (Dmo.ShackMoney.HasValue)
penMoneyInput.Text = Dmo.ShackMoney.Value.ToString();
if (Dmo.JingJianFee.HasValue)
jingjianInput.Text = Dmo.JingJianFee.Value.ToString();
if (Dmo.DiscontMoney.HasValue)
discontInput.Text = Dmo.DiscontMoney.Value.ToString();
if (!string.IsNullOrEmpty(Dmo.AnimalTestNumber))
testCardNumberInput.Text = Dmo.AnimalTestNumber;
@ -404,8 +420,9 @@ namespace ButcherWeight
if (!string.IsNullOrEmpty(Dmo.Remark))
remarkInput.Text = Dmo.Remark;
_farmerDetails = Dmo.FarmerDetails.ToList();
_farmerDetails = Dmo.FarmerDetails.Where(x => !x.DeleteState).ToList();
_details = Dmo.Details.ToList();
weightRecord.Clear();
if (_farmerDetails.Any())
farmerGrid.DataSource = _farmerDetails;
@ -426,6 +443,8 @@ namespace ButcherWeight
penWeightInput.Text = null;
penPriceInput.Text = null;
penMoneyInput.Text = null;
jingjianInput.Text = null;
discontInput.Text = null;
testCardNumberInput.Text = null;
testTimeInput.Date = null;
testManInput.Text = null;
@ -467,5 +486,81 @@ namespace ButcherWeight
dmoList = WeightBillRpc.GetWeightBillList(qCarSelect.LongValue, qSupplierSelect.LongValue);
BindWeightBill();
}
private void farmerGrid_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
if (e.RowIndex >= 0)
{
//若行已是选中状态就不再进行设置
if (farmerGrid.Rows[e.RowIndex].Selected == false)
{
farmerGrid.ClearSelection();
farmerGrid.Rows[e.RowIndex].Selected = true;
}
////只选中一行时设置活动单元格
//if (weightGrid.SelectedRows.Count == 1)
//{
// weightGrid.CurrentCell = weightGrid.Rows[e.RowIndex].Cells[e.ColumnIndex];
//}
//弹出操作菜单
farmerMenu.Show(MousePosition.X, MousePosition.Y);
}
}
}
private void farmerDelete_Click(object sender, EventArgs e)
{
var d = farmerGrid.CurrentRow.DataBoundItem as WeightBill_FarmerDetail;
_farmerDetails.Remove(d);
for (var i = 0; i < _farmerDetails.Count; i++)
_farmerDetails[i].Index = i + 1;
if (d.ID != 0)
{
d.DeleteState = true;
_fDelete.Add(d);
}
farmerGrid.DataSource = null;
if (_farmerDetails.Any())
farmerGrid.DataSource = _farmerDetails;
farmerGrid.Refresh();
}
private void viewDetailBtn_Click(object sender, EventArgs e)
{
if (_details.Count == 0)
{
MessageBox.Show("没有过磅记录");
return;
}
var first = _details.First();
if (first.ID != 0)
{
var exist = WeightBillRpc.GetWeightRecord(first.ID).OrderByDescending(x => x.ID);
foreach (var item in exist)
{
if (!weightRecord.Any(x => x.ID == item.ID))
weightRecord.Insert(0, item);
}
}
if (new RecordView(weightRecord).ShowDialog() == DialogResult.OK)
{
first.MaoWeight = weightRecord.Where(x => x.Type == "毛重" && !x.Delete).Sum(x => x.Weight);
first.PiWeight = weightRecord.Where(x => x.Type == "皮重" && !x.Delete).Sum(x => x.Weight);
first.Weight = first.MaoWeight - first.PiWeight;
weightGrid.Refresh();
}
}
private void penWeightPriceInput_TextChanged(object sender, EventArgs e)
{
decimal w = 0;
decimal price= 0;
if (decimal.TryParse(penWeightInput.Text, out w) && decimal.TryParse(penPriceInput.Text, out price))
penMoneyInput.Text = (w * price).ToString("#0.######");
else
penMoneyInput.Text = "0";
}
}
}

+ 4
- 1
ButcherWeight/WeightForm.resx View File

@ -244,7 +244,10 @@
<value>True</value>
</metadata>
<metadata name="weightSerialPort.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<value>268, 5</value>
</metadata>
<metadata name="farmerMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>143, 5</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>26</value>


+ 213
- 189
WeighAndGrading/GradeFrom.Designer.cs View File

@ -31,10 +31,10 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.syncBtn = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
@ -49,51 +49,53 @@
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label12 = new System.Windows.Forms.Label();
this.queryPanel = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.endDataInput = new BWP.WinFormControl.UDatePicker();
this.beginDateInput = new BWP.WinFormControl.UDatePicker();
this.panel2 = new System.Windows.Forms.Panel();
this.maoRadio = new System.Windows.Forms.RadioButton();
this.tangRadio = new System.Windows.Forms.RadioButton();
this.allRadio = new System.Windows.Forms.RadioButton();
this.orderInput = new BWP.WinFormControl.UTextBoxWithPad();
this.label9 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.queryBtn = new System.Windows.Forms.Button();
this.saiXuanBtn = new System.Windows.Forms.Button();
this.historyGrid = new BWP.WinFormControl.UDataGridView();
this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.enableWeight = new System.Windows.Forms.CheckBox();
this.isPrintCheckBox = new System.Windows.Forms.CheckBox();
this.printBtn = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.lblChengZhong = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.orderInput = new BWP.WinFormControl.UTextBoxWithPad();
this.historyGrid = new BWP.WinFormControl.UDataGridView();
this.dataGridView = new BWP.WinFormControl.UDataGridView();
this.butcherTimeInput = new BWP.WinFormControl.UDatePicker();
this.beginDateInput = new BWP.WinFormControl.UDatePicker();
this.endDataInput = new BWP.WinFormControl.UDatePicker();
this.label3 = new System.Windows.Forms.Label();
this.closeBtn = new System.Windows.Forms.Button();
this.D_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Finish = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Technics_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Already = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.butcherTimeInput = new BWP.WinFormControl.UDatePicker();
this.closeBtn = new System.Windows.Forms.Button();
this.configBtn = new System.Windows.Forms.Button();
this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label5 = new System.Windows.Forms.Label();
this.wb = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.queryPanel.SuspendLayout();
this.panel2.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.historyGrid)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.SuspendLayout();
//
@ -243,6 +245,44 @@
this.queryPanel.Size = new System.Drawing.Size(391, 172);
this.queryPanel.TabIndex = 26;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 15F);
this.label3.Location = new System.Drawing.Point(13, 120);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(109, 20);
this.label3.TabIndex = 12;
this.label3.Text = "屠宰时间:";
//
// endDataInput
//
this.endDataInput.BackColor = System.Drawing.Color.White;
this.endDataInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.endDataInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.endDataInput.Font = new System.Drawing.Font("宋体", 15F);
this.endDataInput.Location = new System.Drawing.Point(265, 115);
this.endDataInput.Name = "endDataInput";
this.endDataInput.Size = new System.Drawing.Size(117, 30);
this.endDataInput.TabIndex = 11;
this.endDataInput.Text = "2017/9/5";
this.endDataInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.endDataInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// beginDateInput
//
this.beginDateInput.BackColor = System.Drawing.Color.White;
this.beginDateInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.beginDateInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.beginDateInput.Font = new System.Drawing.Font("宋体", 15F);
this.beginDateInput.Location = new System.Drawing.Point(124, 115);
this.beginDateInput.Name = "beginDateInput";
this.beginDateInput.Size = new System.Drawing.Size(117, 30);
this.beginDateInput.TabIndex = 10;
this.beginDateInput.Text = "2017/9/5";
this.beginDateInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.beginDateInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// panel2
//
this.panel2.Controls.Add(this.maoRadio);
@ -289,6 +329,15 @@
this.allRadio.Text = "全部";
this.allRadio.UseVisualStyleBackColor = true;
//
// orderInput
//
this.orderInput.Font = new System.Drawing.Font("宋体", 15F);
this.orderInput.Location = new System.Drawing.Point(124, 17);
this.orderInput.Name = "orderInput";
this.orderInput.Size = new System.Drawing.Size(117, 30);
this.orderInput.TabIndex = 1;
this.orderInput.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// label9
//
this.label9.AutoSize = true;
@ -341,6 +390,109 @@
this.saiXuanBtn.UseVisualStyleBackColor = true;
this.saiXuanBtn.Click += new System.EventHandler(this.saiXuanBtn_Click);
//
// historyGrid
//
this.historyGrid.AllowUserToAddRows = false;
this.historyGrid.AllowUserToDeleteRows = false;
this.historyGrid.AllowUserToResizeColumns = false;
this.historyGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.historyGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_ID,
this.H_Livestock_ID,
this.H_Index,
this.H_Order,
this.H_Technics,
this.H_Livestock_Name,
this.H_Weight,
this.H_Time});
this.historyGrid.Location = new System.Drawing.Point(6, 92);
this.historyGrid.MultiSelect = false;
this.historyGrid.Name = "historyGrid";
this.historyGrid.ReadOnly = true;
this.historyGrid.RowHeadersVisible = false;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.historyGrid.RowTemplate.Height = 40;
this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.historyGrid.Size = new System.Drawing.Size(426, 571);
this.historyGrid.TabIndex = 0;
//
// H_ID
//
this.H_ID.DataPropertyName = "ID";
this.H_ID.HeaderText = "ID";
this.H_ID.Name = "H_ID";
this.H_ID.ReadOnly = true;
this.H_ID.Visible = false;
//
// H_Livestock_ID
//
this.H_Livestock_ID.HeaderText = "Livestock_ID";
this.H_Livestock_ID.Name = "H_Livestock_ID";
this.H_Livestock_ID.ReadOnly = true;
this.H_Livestock_ID.Visible = false;
//
// H_Index
//
this.H_Index.DataPropertyName = "Index";
this.H_Index.HeaderText = "序号";
this.H_Index.Name = "H_Index";
this.H_Index.ReadOnly = true;
this.H_Index.Width = 65;
//
// H_Order
//
this.H_Order.DataPropertyName = "Order";
this.H_Order.HeaderText = "屠宰顺序";
this.H_Order.Name = "H_Order";
this.H_Order.ReadOnly = true;
this.H_Order.Width = 95;
//
// H_Technics
//
this.H_Technics.DataPropertyName = "Technics_Name";
this.H_Technics.HeaderText = "工艺";
this.H_Technics.Name = "H_Technics";
this.H_Technics.ReadOnly = true;
this.H_Technics.Width = 65;
//
// H_Livestock_Name
//
this.H_Livestock_Name.DataPropertyName = "Livestock_Name";
this.H_Livestock_Name.HeaderText = "级别";
this.H_Livestock_Name.Name = "H_Livestock_Name";
this.H_Livestock_Name.ReadOnly = true;
this.H_Livestock_Name.Width = 90;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle3.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 65;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// enableWeight
//
this.enableWeight.AutoCheck = false;
@ -406,54 +558,6 @@
this.label10.TabIndex = 32;
this.label10.Text = "烫褪";
//
// orderInput
//
this.orderInput.Font = new System.Drawing.Font("宋体", 15F);
this.orderInput.Location = new System.Drawing.Point(124, 17);
this.orderInput.Name = "orderInput";
this.orderInput.Size = new System.Drawing.Size(117, 30);
this.orderInput.TabIndex = 1;
this.orderInput.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// historyGrid
//
this.historyGrid.AllowUserToAddRows = false;
this.historyGrid.AllowUserToDeleteRows = false;
this.historyGrid.AllowUserToResizeColumns = false;
this.historyGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.historyGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_ID,
this.H_Livestock_ID,
this.H_Index,
this.H_Order,
this.H_Technics,
this.H_Livestock_Name,
this.H_Weight,
this.H_Time});
this.historyGrid.Location = new System.Drawing.Point(6, 92);
this.historyGrid.MultiSelect = false;
this.historyGrid.Name = "historyGrid";
this.historyGrid.ReadOnly = true;
this.historyGrid.RowHeadersVisible = false;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.historyGrid.RowTemplate.Height = 40;
this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.historyGrid.Size = new System.Drawing.Size(426, 571);
this.historyGrid.TabIndex = 0;
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
@ -480,6 +584,7 @@
this.D_Number,
this.D_Already});
this.dataGridView.Location = new System.Drawing.Point(12, 175);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
this.dataGridView.ReadOnly = true;
this.dataGridView.RowHeadersVisible = false;
@ -490,69 +595,6 @@
this.dataGridView.Size = new System.Drawing.Size(364, 517);
this.dataGridView.TabIndex = 4;
//
// butcherTimeInput
//
this.butcherTimeInput.BackColor = System.Drawing.Color.White;
this.butcherTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.butcherTimeInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.butcherTimeInput.Font = new System.Drawing.Font("宋体", 15F);
this.butcherTimeInput.Location = new System.Drawing.Point(116, 126);
this.butcherTimeInput.Name = "butcherTimeInput";
this.butcherTimeInput.Size = new System.Drawing.Size(133, 30);
this.butcherTimeInput.TabIndex = 2;
this.butcherTimeInput.Text = "2017/09/05";
this.butcherTimeInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.butcherTimeInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// beginDateInput
//
this.beginDateInput.BackColor = System.Drawing.Color.White;
this.beginDateInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.beginDateInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.beginDateInput.Font = new System.Drawing.Font("宋体", 15F);
this.beginDateInput.Location = new System.Drawing.Point(124, 115);
this.beginDateInput.Name = "beginDateInput";
this.beginDateInput.Size = new System.Drawing.Size(117, 30);
this.beginDateInput.TabIndex = 10;
this.beginDateInput.Text = "2017/9/5";
this.beginDateInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.beginDateInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// endDataInput
//
this.endDataInput.BackColor = System.Drawing.Color.White;
this.endDataInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.endDataInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.endDataInput.Font = new System.Drawing.Font("宋体", 15F);
this.endDataInput.Location = new System.Drawing.Point(265, 115);
this.endDataInput.Name = "endDataInput";
this.endDataInput.Size = new System.Drawing.Size(117, 30);
this.endDataInput.TabIndex = 11;
this.endDataInput.Text = "2017/9/5";
this.endDataInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.endDataInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 15F);
this.label3.Location = new System.Drawing.Point(13, 120);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(109, 20);
this.label3.TabIndex = 12;
this.label3.Text = "屠宰时间:";
//
// closeBtn
//
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.Location = new System.Drawing.Point(1156, 12);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(102, 43);
this.closeBtn.TabIndex = 33;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// D_OrderDetail_ID
//
this.D_OrderDetail_ID.DataPropertyName = "OrderDetail_ID";
@ -600,6 +642,31 @@
this.D_Already.ReadOnly = true;
this.D_Already.Width = 80;
//
// butcherTimeInput
//
this.butcherTimeInput.BackColor = System.Drawing.Color.White;
this.butcherTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.butcherTimeInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.butcherTimeInput.Font = new System.Drawing.Font("宋体", 15F);
this.butcherTimeInput.Location = new System.Drawing.Point(116, 126);
this.butcherTimeInput.Name = "butcherTimeInput";
this.butcherTimeInput.Size = new System.Drawing.Size(133, 30);
this.butcherTimeInput.TabIndex = 2;
this.butcherTimeInput.Text = "2017/09/05";
this.butcherTimeInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.butcherTimeInput.Type = BWP.WinFormControl.DateTimeType.Date;
//
// closeBtn
//
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.Location = new System.Drawing.Point(1156, 12);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(102, 43);
this.closeBtn.TabIndex = 33;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// configBtn
//
this.configBtn.Font = new System.Drawing.Font("宋体", 15F);
@ -611,75 +678,30 @@
this.configBtn.UseVisualStyleBackColor = true;
this.configBtn.Click += new System.EventHandler(this.configBtn_Click);
//
// H_ID
//
this.H_ID.DataPropertyName = "ID";
this.H_ID.HeaderText = "ID";
this.H_ID.Name = "H_ID";
this.H_ID.ReadOnly = true;
this.H_ID.Visible = false;
// label5
//
// H_Livestock_ID
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(435, 37);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(113, 12);
this.label5.TabIndex = 35;
this.label5.Text = "重量显示(测试用)";
//
this.H_Livestock_ID.HeaderText = "Livestock_ID";
this.H_Livestock_ID.Name = "H_Livestock_ID";
this.H_Livestock_ID.ReadOnly = true;
this.H_Livestock_ID.Visible = false;
// wb
//
// H_Index
//
this.H_Index.DataPropertyName = "Index";
this.H_Index.HeaderText = "序号";
this.H_Index.Name = "H_Index";
this.H_Index.ReadOnly = true;
this.H_Index.Width = 65;
//
// H_Order
//
this.H_Order.DataPropertyName = "Order";
this.H_Order.HeaderText = "屠宰顺序";
this.H_Order.Name = "H_Order";
this.H_Order.ReadOnly = true;
this.H_Order.Width = 95;
//
// H_Technics
//
this.H_Technics.DataPropertyName = "Technics_Name";
this.H_Technics.HeaderText = "工艺";
this.H_Technics.Name = "H_Technics";
this.H_Technics.ReadOnly = true;
this.H_Technics.Width = 65;
//
// H_Livestock_Name
//
this.H_Livestock_Name.DataPropertyName = "Livestock_Name";
this.H_Livestock_Name.HeaderText = "级别";
this.H_Livestock_Name.Name = "H_Livestock_Name";
this.H_Livestock_Name.ReadOnly = true;
this.H_Livestock_Name.Width = 90;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle3.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 65;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
this.wb.AutoSize = true;
this.wb.Location = new System.Drawing.Point(565, 37);
this.wb.Name = "wb";
this.wb.Size = new System.Drawing.Size(0, 12);
this.wb.TabIndex = 36;
//
// GradeFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1276, 865);
this.Controls.Add(this.wb);
this.Controls.Add(this.label5);
this.Controls.Add(this.configBtn);
this.Controls.Add(this.closeBtn);
this.Controls.Add(this.label10);
@ -713,9 +735,9 @@
this.queryPanel.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.historyGrid)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.historyGrid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -776,5 +798,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Time;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label wb;
}
}

+ 5
- 0
WeighAndGrading/GradeFrom.cs View File

@ -52,6 +52,7 @@ namespace WeighAndGrading
private const int WmUpdDisplayMessage = 0x0500 + 2;
private string _displayValue;
private int _mainHandle;
string lbShow = "";
#endregion
int MainHandle
@ -423,7 +424,10 @@ namespace WeighAndGrading
str = "0";
_displayValue = string.Format(format, decimal.Parse(str));
if (str != "0")
{
_weightQueue.Enqueue(decimal.Parse(_displayValue));
lbShow += (string.Format(",{0}", str));
}
WinApiSendMessage.SendMessage(MainHandle, WmUpdDisplayMessage, 0, 0);
}
}
@ -488,6 +492,7 @@ namespace WeighAndGrading
{
case WmUpdDisplayMessage:
lblChengZhong.Text = _displayValue;
wb.Text = lbShow;
break;
default:


Loading…
Cancel
Save