Browse Source

修改,没处理完

master
yibo 8 years ago
parent
commit
c5184311e0
17 changed files with 552 additions and 1856 deletions
  1. +1
    -0
      BO/BO.csproj
  2. +42
    -0
      BO/BO/Bill/GradeAndWeight/OrderGradeFinishRelate.cs
  3. +22
    -22
      BO/Utils/AfterLoginUtil.cs
  4. +71
    -113
      BO/Utils/BillRpc/GradeAndWeightRpc.cs
  5. +1
    -1
      ButcherManageClient/Login.cs
  6. +0
    -337
      WeighAndGrading/AbnormalModifyForm.Designer.cs
  7. +0
    -242
      WeighAndGrading/AbnormalModifyForm.cs
  8. +0
    -141
      WeighAndGrading/AbnormalModifyForm.resx
  9. +41
    -31
      WeighAndGrading/DataConfirm.Designer.cs
  10. +37
    -13
      WeighAndGrading/DataConfirm.cs
  11. +0
    -2
      WeighAndGrading/GradeContext.cs
  12. +253
    -240
      WeighAndGrading/GradeFrom.Designer.cs
  13. +79
    -655
      WeighAndGrading/GradeFrom.cs
  14. +2
    -8
      WeighAndGrading/GradeFrom.resx
  15. +3
    -29
      WeighAndGrading/GradeSettingFrom.Designer.cs
  16. +0
    -13
      WeighAndGrading/GradeSettingFrom.cs
  17. +0
    -9
      WeighAndGrading/WeighAndGrading.csproj

+ 1
- 0
BO/BO.csproj View File

@ -74,6 +74,7 @@
<Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight.cs" />
<Compile Include="BO\Bill\GradeAndWeight\DetailLastIndex.cs" />
<Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight_Detail.cs" />
<Compile Include="BO\Bill\GradeAndWeight\OrderGradeFinishRelate.cs" />
<Compile Include="BO\Bill\GradeAndWeight\WeightData.cs" />
<Compile Include="BO\Bill\OrderDetail\DropPigOrderList.cs" />
<Compile Include="BO\Bill\OrderDetail\HurryRecord.cs" />


+ 42
- 0
BO/BO/Bill/GradeAndWeight/OrderGradeFinishRelate.cs View File

@ -0,0 +1,42 @@
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BO.BO.Bill
{
[MapToTable("OrderGradeFinishRelate")]
public class OrderGradeFinishRelate
{
public OrderGradeFinishRelate(int order, DateTime date, short technics)
{
Order = order;
Date = date;
Technics = technics;
}
public int Order { get; set; }
public DateTime Date { get; set; }
public short Technics { get; set; }
}
/*USE [LocalClientService]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OrderGradeFinishRelate](
[Date] [smalldatetime] NOT NULL,
[Technics] [smallint] NOT NULL,
[Order] [int] NOT NULL,
)
GO*/
}

+ 22
- 22
BO/Utils/AfterLoginUtil.cs View File

@ -18,27 +18,27 @@ namespace BO.Utils
public static class AfterLoginUtil
{
//
// static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>(){new Tuple<string,string>("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"),
// new Tuple<string,string>("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"),
// new Tuple<string,string>("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"),
// new Tuple<string,string>("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"),
// new Tuple<string,string>("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"),
// new Tuple<string,string>("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"),
// new Tuple<string,string>("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution")
//
// };
static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>()
{
new Tuple<string,string>("排宰员",@"\ButcherOrder"),
new Tuple<string,string>("过磅员",@"ButcherWeight"),
new Tuple<string,string>("验质员",@"QualityAndOrder"),
new Tuple<string,string>("定级员",@"WeighAndGrading"),
new Tuple<string,string>("窒晕员",@"OrderConfirm"),
new Tuple<string,string>("掉猪处理员",@"DropPigReOrder"),
// new Tuple<string,string>("定级员",@"C:\B3\src\B3ButcherManageClient\CarcassStateWeight\bin\Debug\CarcassStateWeight")
};
static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>(){new Tuple<string,string>("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"),
new Tuple<string,string>("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"),
new Tuple<string,string>("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"),
new Tuple<string,string>("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"),
new Tuple<string,string>("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"),
new Tuple<string,string>("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"),
new Tuple<string,string>("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution")
};
//static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>()
// {
// new Tuple<string,string>("排宰员",@"\ButcherOrder"),
// new Tuple<string,string>("过磅员",@"ButcherWeight"),
// new Tuple<string,string>("验质员",@"QualityAndOrder"),
// new Tuple<string,string>("定级员",@"WeighAndGrading"),
// new Tuple<string,string>("窒晕员",@"OrderConfirm"),
// new Tuple<string,string>("掉猪处理员",@"DropPigReOrder"),
//// new Tuple<string,string>("定级员",@"C:\B3\src\B3ButcherManageClient\CarcassStateWeight\bin\Debug\CarcassStateWeight")
// };
@ -48,10 +48,10 @@ namespace BO.Utils
if (first == null)
throw new Exception("未注册的角色");
//#if debug
// var filePath = string.Format("{0}.dll", first.Item2);
var filePath = string.Format("{0}.dll", first.Item2);
//#endif
//#if !debug
var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2));
//var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2));
//#endif
if (!File.Exists(filePath))
throw new Exception("相关模块不存在");


+ 71
- 113
BO/Utils/BillRpc/GradeAndWeightRpc.cs View File

@ -28,17 +28,36 @@ namespace BO.Utils.BillRpc
short type = 1;
if (isTang)
type = 0;
var sum = GetSumNumber(date, type);
var sum = GetAlreadyNumber(date, type);
var finish = GetFinishRelate(date, type);
foreach (var item in list)
{
var first = sum.FirstOrDefault(x => x.Item1 == item.Order);
if (first != null)
item.Already = first.Item2;
item.Finish = finish.Contains(item.Order);
}
return list;
}
static List<Tuple<int, int>> GetSumNumber(DateTime date, short type)
static List<int> GetFinishRelate(DateTime date, short type)
{
var query = new DQueryDom(new JoinAlias(typeof(OrderGradeFinishRelate)));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Date", date), DQCondition.EQ("Technics", type)));
query.Columns.Add(DQSelectColumn.Field("Order"));
var list = new List<int>();
using (var session = LocalDmoSession.New())
{
using (var reader = session.ExecuteReader(query))
{
while (reader.Read())
list.Add((int)reader[0]);
}
}
return list;
}
static List<Tuple<int, int>> GetAlreadyNumber(DateTime date, short type)
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("Date", date), DQCondition.EQ("Technics", type), DQCondition.IsNotNull(DQExpression.Field("Order"))));
@ -57,12 +76,6 @@ namespace BO.Utils.BillRpc
}
}
public static void SetGradeFinish(long orderDetailID, short technics)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/SetGradeFinish";
RpcFacade.Call<int>(method, orderDetailID, technics);
}
public static List<BodyDiscontItem> GetBodyDiscontItem()
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/GetBodyDiscontItemSetting";
@ -88,38 +101,31 @@ namespace BO.Utils.BillRpc
{
static JavaScriptSerializer serializer = new JavaScriptSerializer();
public static void ClearWeightBySID(long sid)
public static void SetGradeFinish(int order, DateTime date, short technics)
{
var updateDom = new DQUpdateDom(typeof(GradeAndWeight_Detail));
updateDom.Where.Conditions.Add(DQCondition.EQ("SID", sid));
updateDom.Columns.Add(new DQUpdateColumn("Weight", DQExpression.NULL));
updateDom.Columns.Add(new DQUpdateColumn("Sync", false));
using (var session = LocalDmoSession.New())
{
session.ExecuteNonQuery(updateDom);
if (Finished(session, date, order, technics))
return;
session.Insert(new OrderGradeFinishRelate(order, date, technics));
session.Commit();
}
}
public static void DeleteBySID(long sid)
static bool Finished(IDmoSession session, DateTime date, int order, short technics)
{
var updateDom = new DQUpdateDom(typeof(GradeAndWeight_Detail));
updateDom.Where.Conditions.Add(DQCondition.EQ("SID", sid));
updateDom.Columns.Add(new DQUpdateColumn("IsDeleted", true));
updateDom.Columns.Add(new DQUpdateColumn("Sync", false));
using (var session = LocalDmoSession.New())
{
session.ExecuteNonQuery(updateDom);
session.Commit();
}
var query = new DQueryDom(new JoinAlias(typeof(OrderGradeFinishRelate)));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Order", order), DQCondition.EQ("Date", date), DQCondition.EQ("Technics", technics)));
query.Columns.Add(DQSelectColumn.Create(DQExpression.Field("1"), "c"));
return session.ExecuteScalar(query) != null;
}
public static void UpdateLosted(long sid)
public static void DeleteBySID(long sid)
{
var updateDom = new DQUpdateDom(typeof(GradeAndWeight_Detail));
updateDom.Where.Conditions.Add(DQCondition.EQ("SID", sid));
updateDom.Columns.Add(new DQUpdateColumn("IsLostWeight", true));
updateDom.Columns.Add(new DQUpdateColumn("IsDeleted", true));
updateDom.Columns.Add(new DQUpdateColumn("Sync", false));
using (var session = LocalDmoSession.New())
{
session.ExecuteNonQuery(updateDom);
@ -130,7 +136,6 @@ namespace BO.Utils.BillRpc
public static BindingList<GradeAndWeight_Detail> GetDetails(DateTime date, int top = 15)
{
var bindList = new BindingList<GradeAndWeight_Detail>();
// var bindList=new BlockingCollection<GradeAndWeight_Detail>();
var list = new List<GradeAndWeight_Detail>();
var query = new DmoQuery(typeof(GradeAndWeight_Detail));
@ -148,28 +153,6 @@ namespace BO.Utils.BillRpc
return bindList;
}
public static int GetSumNumber(DateTime date, short type)
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("Technics", type), DQCondition.EQ("Date", date)));
query.Columns.Add(DQSelectColumn.Count());
using (var session = LocalDmoSession.New())
{
return Convert.ToInt32(session.ExecuteScalar(query));
}
}
//public static int GetSumNumber(long orderID, short type)
//{
// var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
// query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("Technics", type), DQCondition.EQ("OrderDetail_ID", orderID)));
// query.Columns.Add(DQSelectColumn.Count());
// using (var session = LocalDmoSession.New())
// {
// return Convert.ToInt32(session.ExecuteScalar(query));
// }
//}
public static List<Tuple<short, int, decimal>> GetSumNumber(DateTime date, int? order, short? type)
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
@ -199,30 +182,6 @@ namespace BO.Utils.BillRpc
}
}
public static decimal GetSumWeight(DateTime date)
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("Date", date)));
query.Columns.Add(DQSelectColumn.Sum("Weight"));
using (var session = LocalDmoSession.New())
{
return Convert.ToDecimal(session.ExecuteScalar(query));
}
}
public static List<GradeAndWeight_Detail> GetLostWeightDetails(DateTime date)
{
var query = new DmoQuery(typeof(GradeAndWeight_Detail));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("IsLostWeight", true), DQCondition.EQ("Date", date)));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("Index", true));
using (var session = LocalDmoSession.New())
{
return session.ExecuteList(query).Cast<GradeAndWeight_Detail>().ToList();
}
}
public static void Insert(GradeAndWeight_Detail detail)
{
using (var session = LocalDmoSession.New())
@ -236,7 +195,6 @@ namespace BO.Utils.BillRpc
public static void Update(GradeAndWeight_Detail detail, params string[] properties)
{
var type = typeof(GradeAndWeight_Detail);
using (var session = LocalDmoSession.New())
{
if (detail.SID == 0)
@ -245,16 +203,14 @@ namespace BO.Utils.BillRpc
throw new Exception("ID不能通过该方法维护");
if (properties.Length == 0)
throw new Exception("Update时要给出属性数组");
var type = typeof(GradeAndWeight_Detail);
var update = new DQUpdateDom(type);
update.Where.Conditions.Add(DQCondition.EQ("SID", detail.SID));
foreach (var p in properties)
{
// if (p == "Sync" && detail.Sync)
// detail.Sync = false;
update.Columns.Add(new DQUpdateColumn(p, type.GetProperty(p).GetValue(detail)));
}
//只要修改就设置 Sync为False
update.Columns.Add(new DQUpdateColumn("Sync", false));
session.ExecuteNonQuery(update);
@ -340,16 +296,6 @@ namespace BO.Utils.BillRpc
}
}
public static void SaveWeightData(decimal weight)
{
using (var session = LocalDmoSession.New())
{
var record = new WeightData { Weight = weight, Time = DateTime.Now };
session.Insert(record);
session.Commit();
}
}
public static int GetTodayTotalCount(DateTime date)
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
@ -370,7 +316,7 @@ namespace BO.Utils.BillRpc
if (index.HasValue)
query.Where.Conditions.Add(DQCondition.EQ("Index", index));
if (type.HasValue)
query.Where.Conditions.Add(DQCondition.EQ("Technics", type));
query.Where.Conditions.Add(DQCondition.Or(DQCondition.IsNull(DQExpression.Field("Technics")), DQCondition.EQ("Technics", type)));
using (var session = LocalDmoSession.New())
{
return session.ExecuteList(query).Cast<GradeAndWeight_Detail>().ToList();
@ -379,34 +325,46 @@ namespace BO.Utils.BillRpc
public static void InsertOrUpdate(GradeAndWeight_Detail entity)
{
using (var session = LocalDmoSession.New())
if (entity.Technics_Name == "烫褪")
entity.Technics = 0;
else
entity.Technics = 1;
if (entity.SID == 0)
{
if (entity.Technics_Name == "烫褪")
entity.Technics = 0;
else
entity.Technics = 1;
if (entity.SID == 0)
using (var session = LocalDmoSession.New())
{
session.Insert(entity);
session.Commit();
}
else
{
entity.Sync = false;
var update = new DQUpdateDom(typeof(GradeAndWeight_Detail));
update.Columns.Add(new DQUpdateColumn("Technics", entity.Technics));
update.Columns.Add(new DQUpdateColumn("Technics_Name", entity.Technics_Name));
update.Columns.Add(new DQUpdateColumn("Index", entity.Index));
update.Columns.Add(new DQUpdateColumn("Order", entity.Order));
update.Columns.Add(new DQUpdateColumn("Sync", entity.Sync));
update.Columns.Add(new DQUpdateColumn("Weight", entity.Weight));
update.Columns.Add(new DQUpdateColumn("Livestock_ID", entity.Livestock_ID));
update.Columns.Add(new DQUpdateColumn("Livestock_ID", entity.Livestock_ID));
update.Where.Conditions.Add(DQCondition.EQ("SID", entity.SID));
session.ExecuteNonQuery(update);
}
session.Commit();
}
else
Update(entity, "Technics", "Technics_Name", "Index", "Order", "Weight", "Livestock_ID", "Livestock_Name");
}
//static T GetPartT<T>(IDmoSession session, string property, object value, params string[] fields)
// where T : new()
//{
// var t = new T();
// if (fields.Count() == 0)
// return t;
// var type = typeof(T);
// var query = new DQueryDom(new JoinAlias(type));
// foreach (var item in fields)
// query.Columns.Add(DQSelectColumn.Field(item));
// query.Where.Conditions.Add(DQCondition.EQ(property, value));
// using (var reader = session.ExecuteReader(query))
// {
// while (reader.Read())
// {
// var idx = 0;
// foreach (var item in fields)
// {
// type.GetProperty(item).SetValue(t, reader[idx], null);
// idx++;
// }
// }
// }
// return t;
//}
}
}

+ 1
- 1
ButcherManageClient/Login.cs View File

@ -141,7 +141,7 @@ namespace ButcherManageClient
private void Login_Load(object sender, EventArgs e)
{
AutoUpdate();
//AutoUpdate();
}
}
}

+ 0
- 337
WeighAndGrading/AbnormalModifyForm.Designer.cs View File

@ -1,337 +0,0 @@
namespace WeighAndGrading
{
partial class AbnormalModifyForm
{
/// <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 dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = 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();
this.panel4 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.flpKeyPanel = new System.Windows.Forms.FlowLayoutPanel();
this.uDataGridView1 = new BWP.WinFormControl.UDataGridView();
this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Index = 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.label1 = new System.Windows.Forms.Label();
this.lblPaiZaiTT = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lblPaiZaiMB = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.lblWeightTT = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.lblWeightMB = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.lblWeightWeight = new System.Windows.Forms.Label();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit();
this.SuspendLayout();
//
// panel4
//
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel4.Controls.Add(this.button1);
this.panel4.Controls.Add(this.flpKeyPanel);
this.panel4.Location = new System.Drawing.Point(504, 13);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(454, 510);
this.panel4.TabIndex = 61;
//
// button1
//
this.button1.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(161, 434);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(129, 54);
this.button1.TabIndex = 45;
this.button1.Text = "全部修改";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// flpKeyPanel
//
this.flpKeyPanel.Location = new System.Drawing.Point(3, 22);
this.flpKeyPanel.Name = "flpKeyPanel";
this.flpKeyPanel.Padding = new System.Windows.Forms.Padding(25, 0, 0, 0);
this.flpKeyPanel.Size = new System.Drawing.Size(446, 406);
this.flpKeyPanel.TabIndex = 43;
//
// uDataGridView1
//
this.uDataGridView1.AllowUserToAddRows = false;
this.uDataGridView1.AllowUserToDeleteRows = false;
this.uDataGridView1.AllowUserToResizeColumns = false;
this.uDataGridView1.AllowUserToResizeRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
this.uDataGridView1.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_SID,
this.H_Livestock_ID,
this.H_Index,
this.H_Technics,
this.H_Livestock_Name,
this.H_Weight,
this.H_Time});
this.uDataGridView1.Location = new System.Drawing.Point(12, 12);
this.uDataGridView1.MultiSelect = false;
this.uDataGridView1.Name = "uDataGridView1";
this.uDataGridView1.ReadOnly = true;
this.uDataGridView1.RowHeadersVisible = false;
dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle10;
this.uDataGridView1.RowTemplate.Height = 40;
this.uDataGridView1.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.uDataGridView1.Size = new System.Drawing.Size(423, 511);
this.uDataGridView1.TabIndex = 44;
this.uDataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.uDataGridView1_CellClick);
//
// H_SID
//
this.H_SID.DataPropertyName = "SID";
this.H_SID.HeaderText = "SID";
this.H_SID.Name = "H_SID";
this.H_SID.ReadOnly = true;
this.H_SID.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_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";
dataGridViewCellStyle8.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle8;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 70;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
dataGridViewCellStyle9.Format = "HH:mm:ss";
dataGridViewCellStyle9.NullValue = null;
this.H_Time.DefaultCellStyle = dataGridViewCellStyle9;
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(39, 547);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(76, 22);
this.label1.TabIndex = 62;
this.label1.Text = "烫褪:";
//
// lblPaiZaiTT
//
this.lblPaiZaiTT.AutoSize = true;
this.lblPaiZaiTT.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPaiZaiTT.Location = new System.Drawing.Point(105, 547);
this.lblPaiZaiTT.Name = "lblPaiZaiTT";
this.lblPaiZaiTT.Size = new System.Drawing.Size(0, 22);
this.lblPaiZaiTT.TabIndex = 62;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(198, 547);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(76, 22);
this.label3.TabIndex = 62;
this.label3.Text = "毛剥:";
//
// lblPaiZaiMB
//
this.lblPaiZaiMB.AutoSize = true;
this.lblPaiZaiMB.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPaiZaiMB.Location = new System.Drawing.Point(266, 547);
this.lblPaiZaiMB.Name = "lblPaiZaiMB";
this.lblPaiZaiMB.Size = new System.Drawing.Size(0, 22);
this.lblPaiZaiMB.TabIndex = 62;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(502, 547);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(76, 22);
this.label5.TabIndex = 62;
this.label5.Text = "烫褪:";
//
// lblWeightTT
//
this.lblWeightTT.AutoSize = true;
this.lblWeightTT.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeightTT.Location = new System.Drawing.Point(566, 547);
this.lblWeightTT.Name = "lblWeightTT";
this.lblWeightTT.Size = new System.Drawing.Size(0, 22);
this.lblWeightTT.TabIndex = 62;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(641, 547);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(76, 22);
this.label7.TabIndex = 62;
this.label7.Text = "毛剥:";
//
// lblWeightMB
//
this.lblWeightMB.AutoSize = true;
this.lblWeightMB.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeightMB.Location = new System.Drawing.Point(707, 547);
this.lblWeightMB.Name = "lblWeightMB";
this.lblWeightMB.Size = new System.Drawing.Size(0, 22);
this.lblWeightMB.TabIndex = 62;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(778, 547);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(76, 22);
this.label9.TabIndex = 62;
this.label9.Text = "重量:";
//
// lblWeightWeight
//
this.lblWeightWeight.AutoSize = true;
this.lblWeightWeight.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeightWeight.Location = new System.Drawing.Point(855, 547);
this.lblWeightWeight.Name = "lblWeightWeight";
this.lblWeightWeight.Size = new System.Drawing.Size(0, 22);
this.lblWeightWeight.TabIndex = 62;
//
// AbnormalModifyForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(970, 590);
this.Controls.Add(this.lblWeightWeight);
this.Controls.Add(this.label9);
this.Controls.Add(this.lblWeightMB);
this.Controls.Add(this.label7);
this.Controls.Add(this.lblPaiZaiMB);
this.Controls.Add(this.lblWeightTT);
this.Controls.Add(this.label3);
this.Controls.Add(this.label5);
this.Controls.Add(this.lblPaiZaiTT);
this.Controls.Add(this.label1);
this.Controls.Add(this.uDataGridView1);
this.Controls.Add(this.panel4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AbnormalModifyForm";
this.Text = "异常修改";
this.Load += new System.EventHandler(this.AbnormalModifyForm_Load);
this.panel4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.FlowLayoutPanel flpKeyPanel;
private BWP.WinFormControl.UDataGridView uDataGridView1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.DataGridViewTextBoxColumn H_SID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Index;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics;
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 label1;
private System.Windows.Forms.Label lblPaiZaiTT;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lblPaiZaiMB;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label lblWeightTT;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label lblWeightMB;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label lblWeightWeight;
}
}

+ 0
- 242
WeighAndGrading/AbnormalModifyForm.cs View File

@ -1,242 +0,0 @@
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;
using BO.BO.Bill;
using BO.Utils.BillRpc;
namespace WeighAndGrading
{
public partial class AbnormalModifyForm : Form
{
List<GradeAndWeight_Detail> details;
private DateTime mDate;
GradeAndWeight_Detail mCurrentSlectItem;
public AbnormalModifyForm(DateTime date)
{
InitializeComponent();
mDate = date;
uDataGridView1.AutoGenerateColumns = false;
}
private void AbnormalModifyForm_Load(object sender, EventArgs e)
{
BindGridView();
AddKeyPad();
if (uDataGridView1.Rows.Count > 0)
{
uDataGridView1.Rows[0].Selected = true;
var currentRow = uDataGridView1.Rows[0].DataBoundItem as GradeAndWeight_Detail;
mCurrentSlectItem = currentRow;
}
var tangtuiList = GradeAndWeightRpc.GetGradeAndWeightList(mDate, true);
var maoboList = GradeAndWeightRpc.GetGradeAndWeightList(mDate, false);
lblPaiZaiTT.Text = tangtuiList.Sum(x => x.Number).ToString();
lblPaiZaiMB.Text = maoboList.Sum(x => x.Number).ToString();
var tangtui = LocalGradeAndWeightBL.GetSumNumber(mDate,0);
var maobo = LocalGradeAndWeightBL.GetSumNumber(mDate, 1);
var weight = LocalGradeAndWeightBL.GetSumWeight(mDate);
lblWeightTT.Text = tangtui.ToString();
lblWeightMB.Text = maobo.ToString();
lblWeightWeight.Text = weight.ToString("f2");
}
private void BindGridView()
{
details = LocalGradeAndWeightBL.GetLostWeightDetails(mDate);
if (details.Any())
{
foreach (GradeAndWeight_Detail detail in details)
{
if (detail.Weight.HasValue && detail.Weight == 0)
{
detail.Weight = null;
}
}
uDataGridView1.DataSource = details;
}
}
private void AddKeyPad()
{
for (var i = 1; i < 10; i++)
{
var btn = new Button() { Name = "_3" + i, Text = i.ToString(), Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) };
btn.Click += (sender, e) =>
{
ModifyWeight(btn.Text);
};
flpKeyPanel.Controls.Add(btn);
}
var zero = new Button() { Name = "_30", Text = "0", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) };
zero.Click += (sender, e) =>
{
ModifyWeight(zero.Text);
};
flpKeyPanel.Controls.Add(zero);
var dian = new Button() { Name = "_40", Text = ".", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) };
dian.Click += (sender, e) =>
{
ModifyWeight(dian.Text);
};
flpKeyPanel.Controls.Add(dian);
var back = new Button() { Name = "_3back", Text = "←", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) };
back.Click += (sender, e) =>
{
ModifyWeight(back.Text);
};
flpKeyPanel.Controls.Add(back);
var clear = new Button() { Name = "_3clear", Text = "清空", Size = new Size(80, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) };
clear.Click += (sender, e) =>
{
ModifyWeight(clear.Text);
};
flpKeyPanel.Controls.Add(clear);
}
// private decimal? lastWeght;
private void ModifyWeight(string input)
{
if (mCurrentSlectItem == null)
throw new Exception("请选择一条记录");
var destring = DecimalToString(mCurrentSlectItem.Weight);
var value = GetAfterNumber(destring, input);
mCurrentSlectItem.Weight = StringToDecimal(value);
uDataGridView1.Refresh();
}
decimal? StringToDecimal(string value)
{
if (string.IsNullOrWhiteSpace(value))
{
return null;
}
value = value.Replace("..", ".");
if (value.Length > 1)
{
var last = value.Substring(value.Length - 1);
if (last == ".")
{
value += "0";
}
}
try
{
return decimal.Parse(value);
}
catch
{
return null;
}
}
string DecimalToString(decimal? value)
{
if (value == null)
{
return "";
}
try
{
var newvalue = value.ToString();
if (newvalue.Length > 2)
{
var lasttwo = newvalue.Substring(newvalue.Length - 2);
if (lasttwo == ".0")
{
var intvalue = Convert.ToInt32(value);
return intvalue.ToString() + ".";
}
}
return value.ToString() + "";
}
catch
{
return value.ToString();
}
}
string GetAfterNumber(string oldValue, string input)
{
bool hasValue = !string.IsNullOrWhiteSpace(oldValue);
switch (input)
{
case ".":
if (hasValue)
return (oldValue + ".");
return null;
case "0":
if (hasValue)
return (oldValue + "0");
return null;
case "←":
if (hasValue)
{
var s = oldValue.ToString();
s = s.Substring(0, s.Length - 1);
if (string.IsNullOrEmpty(s))
return null;
return (s);
}
return null;
case "清空":
return null;
default:
var sn = "";
if (hasValue)
sn = oldValue.ToString();
sn += input;
return (sn);
}
}
private void button1_Click(object sender, EventArgs e)
{
foreach (GradeAndWeight_Detail detail in details.Where(x => x.Weight.HasValue))
{
detail.IsLostWeight = false;
LocalGradeAndWeightBL.Update(detail, "Weight", "IsLostWeight");
}
details = LocalGradeAndWeightBL.GetLostWeightDetails(mDate);
uDataGridView1.Refresh();
MessageBox.Show("保存成功");
DialogResult = DialogResult.OK;
Close();
}
private void uDataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
return;
var currentRow = uDataGridView1.CurrentRow.DataBoundItem as GradeAndWeight_Detail;
mCurrentSlectItem = currentRow;
}
}
}

+ 0
- 141
WeighAndGrading/AbnormalModifyForm.resx View File

@ -1,141 +0,0 @@
<?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="H_SID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Livestock_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Technics.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Livestock_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 41
- 31
WeighAndGrading/DataConfirm.Designer.cs View File

@ -52,7 +52,7 @@
this.L_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.L_HotFadeNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.L_MaoNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.vScrollBar1 = new System.Windows.Forms.VScrollBar();
this.rightVScrollBar = new System.Windows.Forms.VScrollBar();
this.ttPanel = new System.Windows.Forms.FlowLayoutPanel();
this.mbPanel = new System.Windows.Forms.FlowLayoutPanel();
this.weightGrid = new BWP.WinFormControl.UDataGridView();
@ -76,6 +76,7 @@
this.maoW = new System.Windows.Forms.Label();
this.tangBtn = new System.Windows.Forms.Button();
this.maoBtn = new System.Windows.Forms.Button();
this.leftVScrollBar = new System.Windows.Forms.VScrollBar();
((System.ComponentModel.ISupportInitialize)(this.orderGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.weightGrid)).BeginInit();
this.SuspendLayout();
@ -137,7 +138,7 @@
// rightOrder
//
this.rightOrder.Font = new System.Drawing.Font("宋体", 20F);
this.rightOrder.Location = new System.Drawing.Point(867, 18);
this.rightOrder.Location = new System.Drawing.Point(936, 18);
this.rightOrder.Name = "rightOrder";
this.rightOrder.Size = new System.Drawing.Size(100, 38);
this.rightOrder.TabIndex = 10;
@ -147,7 +148,7 @@
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 15F);
this.label3.Location = new System.Drawing.Point(772, 27);
this.label3.Location = new System.Drawing.Point(841, 27);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(89, 20);
this.label3.TabIndex = 9;
@ -156,7 +157,7 @@
// rightBtn
//
this.rightBtn.Font = new System.Drawing.Font("宋体", 15F);
this.rightBtn.Location = new System.Drawing.Point(1191, 15);
this.rightBtn.Location = new System.Drawing.Point(1294, 15);
this.rightBtn.Name = "rightBtn";
this.rightBtn.Size = new System.Drawing.Size(149, 41);
this.rightBtn.TabIndex = 8;
@ -167,7 +168,7 @@
// rightIndex
//
this.rightIndex.Font = new System.Drawing.Font("宋体", 20F);
this.rightIndex.Location = new System.Drawing.Point(1068, 18);
this.rightIndex.Location = new System.Drawing.Point(1154, 18);
this.rightIndex.Name = "rightIndex";
this.rightIndex.Size = new System.Drawing.Size(100, 38);
this.rightIndex.TabIndex = 12;
@ -177,7 +178,7 @@
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 15F);
this.label4.Location = new System.Drawing.Point(986, 27);
this.label4.Location = new System.Drawing.Point(1072, 27);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(69, 20);
this.label4.TabIndex = 11;
@ -219,7 +220,7 @@
this.orderGridView.RowTemplate.Height = 60;
this.orderGridView.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.orderGridView.Size = new System.Drawing.Size(368, 591);
this.orderGridView.Size = new System.Drawing.Size(368, 617);
this.orderGridView.TabIndex = 13;
this.orderGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGridView_CellClick);
//
@ -255,23 +256,23 @@
this.L_MaoNumber.ReadOnly = true;
this.L_MaoNumber.Width = 90;
//
// vScrollBar1
// rightVScrollBar
//
this.vScrollBar1.Location = new System.Drawing.Point(1300, 185);
this.vScrollBar1.Name = "vScrollBar1";
this.vScrollBar1.Size = new System.Drawing.Size(40, 499);
this.vScrollBar1.TabIndex = 52;
this.rightVScrollBar.Location = new System.Drawing.Point(1403, 185);
this.rightVScrollBar.Name = "rightVScrollBar";
this.rightVScrollBar.Size = new System.Drawing.Size(40, 525);
this.rightVScrollBar.TabIndex = 52;
//
// ttPanel
//
this.ttPanel.Location = new System.Drawing.Point(393, 116);
this.ttPanel.Location = new System.Drawing.Point(461, 116);
this.ttPanel.Name = "ttPanel";
this.ttPanel.Size = new System.Drawing.Size(337, 276);
this.ttPanel.TabIndex = 53;
//
// mbPanel
//
this.mbPanel.Location = new System.Drawing.Point(393, 406);
this.mbPanel.Location = new System.Drawing.Point(461, 432);
this.mbPanel.Name = "mbPanel";
this.mbPanel.Size = new System.Drawing.Size(337, 278);
this.mbPanel.TabIndex = 54;
@ -303,7 +304,7 @@
this.H_Weight,
this.H_Time,
this.H_Save});
this.weightGrid.Location = new System.Drawing.Point(740, 185);
this.weightGrid.Location = new System.Drawing.Point(843, 185);
this.weightGrid.MultiSelect = false;
this.weightGrid.Name = "weightGrid";
this.weightGrid.ReadOnly = true;
@ -314,7 +315,7 @@
this.weightGrid.RowTemplate.Height = 65;
this.weightGrid.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.weightGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.weightGrid.Size = new System.Drawing.Size(557, 499);
this.weightGrid.Size = new System.Drawing.Size(557, 525);
this.weightGrid.TabIndex = 55;
this.weightGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.weightGrid_CellClick);
this.weightGrid.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.weightGrid_CellContentClick);
@ -394,7 +395,7 @@
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("宋体", 15F);
this.label5.Location = new System.Drawing.Point(755, 76);
this.label5.Location = new System.Drawing.Point(841, 75);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(69, 20);
this.label5.TabIndex = 56;
@ -404,7 +405,7 @@
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("宋体", 15F);
this.label6.Location = new System.Drawing.Point(887, 78);
this.label6.Location = new System.Drawing.Point(1036, 78);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(69, 20);
this.label6.TabIndex = 57;
@ -415,7 +416,7 @@
this.tangNumber.AutoSize = true;
this.tangNumber.Font = new System.Drawing.Font("宋体", 18F);
this.tangNumber.ForeColor = System.Drawing.Color.Red;
this.tangNumber.Location = new System.Drawing.Point(820, 74);
this.tangNumber.Location = new System.Drawing.Point(911, 74);
this.tangNumber.Name = "tangNumber";
this.tangNumber.Size = new System.Drawing.Size(22, 24);
this.tangNumber.TabIndex = 58;
@ -426,7 +427,7 @@
this.maoNumber.AutoSize = true;
this.maoNumber.Font = new System.Drawing.Font("宋体", 18F);
this.maoNumber.ForeColor = System.Drawing.Color.Red;
this.maoNumber.Location = new System.Drawing.Point(952, 75);
this.maoNumber.Location = new System.Drawing.Point(1101, 75);
this.maoNumber.Name = "maoNumber";
this.maoNumber.Size = new System.Drawing.Size(22, 24);
this.maoNumber.TabIndex = 59;
@ -437,7 +438,7 @@
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 15F);
this.label7.ForeColor = System.Drawing.Color.Red;
this.label7.Location = new System.Drawing.Point(390, 95);
this.label7.Location = new System.Drawing.Point(465, 91);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(69, 20);
this.label7.TabIndex = 60;
@ -448,7 +449,7 @@
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("宋体", 15F);
this.label8.ForeColor = System.Drawing.Color.Red;
this.label8.Location = new System.Drawing.Point(390, 383);
this.label8.Location = new System.Drawing.Point(465, 407);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(69, 20);
this.label8.TabIndex = 61;
@ -457,7 +458,7 @@
// AddBtn
//
this.AddBtn.Font = new System.Drawing.Font("宋体", 15F);
this.AddBtn.Location = new System.Drawing.Point(1191, 73);
this.AddBtn.Location = new System.Drawing.Point(1294, 73);
this.AddBtn.Name = "AddBtn";
this.AddBtn.Size = new System.Drawing.Size(149, 39);
this.AddBtn.TabIndex = 62;
@ -468,7 +469,7 @@
// deleteBtn
//
this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F);
this.deleteBtn.Location = new System.Drawing.Point(1019, 73);
this.deleteBtn.Location = new System.Drawing.Point(1294, 128);
this.deleteBtn.Name = "deleteBtn";
this.deleteBtn.Size = new System.Drawing.Size(149, 39);
this.deleteBtn.TabIndex = 63;
@ -481,7 +482,7 @@
this.tangW.AutoSize = true;
this.tangW.Font = new System.Drawing.Font("宋体", 18F);
this.tangW.ForeColor = System.Drawing.Color.Red;
this.tangW.Location = new System.Drawing.Point(799, 108);
this.tangW.Location = new System.Drawing.Point(888, 108);
this.tangW.Name = "tangW";
this.tangW.Size = new System.Drawing.Size(22, 24);
this.tangW.TabIndex = 66;
@ -492,7 +493,7 @@
this.maoW.AutoSize = true;
this.maoW.Font = new System.Drawing.Font("宋体", 18F);
this.maoW.ForeColor = System.Drawing.Color.Red;
this.maoW.Location = new System.Drawing.Point(926, 108);
this.maoW.Location = new System.Drawing.Point(1073, 108);
this.maoW.Name = "maoW";
this.maoW.Size = new System.Drawing.Size(22, 24);
this.maoW.TabIndex = 67;
@ -501,7 +502,7 @@
// tangBtn
//
this.tangBtn.Font = new System.Drawing.Font("宋体", 15F);
this.tangBtn.Location = new System.Drawing.Point(824, 140);
this.tangBtn.Location = new System.Drawing.Point(842, 140);
this.tangBtn.Name = "tangBtn";
this.tangBtn.Size = new System.Drawing.Size(149, 39);
this.tangBtn.TabIndex = 68;
@ -512,7 +513,7 @@
// maoBtn
//
this.maoBtn.Font = new System.Drawing.Font("宋体", 15F);
this.maoBtn.Location = new System.Drawing.Point(1019, 140);
this.maoBtn.Location = new System.Drawing.Point(1037, 140);
this.maoBtn.Name = "maoBtn";
this.maoBtn.Size = new System.Drawing.Size(149, 39);
this.maoBtn.TabIndex = 69;
@ -520,11 +521,19 @@
this.maoBtn.UseVisualStyleBackColor = true;
this.maoBtn.Click += new System.EventHandler(this.maoBtn_Click);
//
// leftVScrollBar
//
this.leftVScrollBar.Location = new System.Drawing.Point(384, 93);
this.leftVScrollBar.Name = "leftVScrollBar";
this.leftVScrollBar.Size = new System.Drawing.Size(40, 617);
this.leftVScrollBar.TabIndex = 70;
//
// DataConfirm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1362, 741);
this.ClientSize = new System.Drawing.Size(1471, 741);
this.Controls.Add(this.leftVScrollBar);
this.Controls.Add(this.maoBtn);
this.Controls.Add(this.tangBtn);
this.Controls.Add(this.maoW);
@ -537,7 +546,7 @@
this.Controls.Add(this.tangNumber);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.vScrollBar1);
this.Controls.Add(this.rightVScrollBar);
this.Controls.Add(this.weightGrid);
this.Controls.Add(this.mbPanel);
this.Controls.Add(this.ttPanel);
@ -577,7 +586,7 @@
private BWP.WinFormControl.UTextBoxWithPad rightIndex;
private System.Windows.Forms.Label label4;
private BWP.WinFormControl.UDataGridView orderGridView;
private System.Windows.Forms.VScrollBar vScrollBar1;
private System.Windows.Forms.VScrollBar rightVScrollBar;
private System.Windows.Forms.FlowLayoutPanel ttPanel;
private System.Windows.Forms.FlowLayoutPanel mbPanel;
private BWP.WinFormControl.UDataGridView weightGrid;
@ -605,5 +614,6 @@
private System.Windows.Forms.Label maoW;
private System.Windows.Forms.Button tangBtn;
private System.Windows.Forms.Button maoBtn;
private System.Windows.Forms.VScrollBar leftVScrollBar;
}
}

+ 37
- 13
WeighAndGrading/DataConfirm.cs View File

@ -38,6 +38,16 @@ namespace WeighAndGrading
order = int.Parse(leftOrder.Text);
leftList = GradeAndWeightRpc.GetDataConfirmList(uDatePicker1.Date.Value, order);
orderGridView.DataSource = leftList;
InitLeftScrollBar();
try
{
if (leftRollIdx != -1)
orderGridView.FirstDisplayedScrollingRowIndex = leftRollIdx;
}
catch
{
leftRollIdx = -1;
}
orderGridView.Refresh();
}
@ -57,15 +67,15 @@ namespace WeighAndGrading
idx = int.Parse(rightIndex.Text);
weightList = LocalGradeAndWeightBL.GetGradeAndWeightDetails(uDatePicker1.Date.Value, order, idx, type);
weightGrid.DataSource = weightList;
InitTangScrollBar();
InitRightScrollBar();
try
{
if (rollIdx != -1)
weightGrid.FirstDisplayedScrollingRowIndex = rollIdx;
if (rightRollIdx != -1)
weightGrid.FirstDisplayedScrollingRowIndex = rightRollIdx;
}
catch
{
rollIdx = -1;
rightRollIdx = -1;
}
weightGrid.Refresh();
var number = LocalGradeAndWeightBL.GetSumNumber(uDatePicker1.Date.Value, order, null);
@ -209,17 +219,31 @@ namespace WeighAndGrading
rightBtn_Click(sender, EventArgs.Empty);
}
int rollIdx = -1;
private void InitTangScrollBar()
int rightRollIdx = -1;
private void InitRightScrollBar()
{
rightVScrollBar.Maximum = (weightGrid.RowCount - weightGrid.DisplayedRowCount(false) + 30) * weightGrid.RowTemplate.Height;
rightVScrollBar.Minimum = 0;
rightVScrollBar.SmallChange = weightGrid.RowTemplate.Height;
rightVScrollBar.LargeChange = weightGrid.RowTemplate.Height * 30;
this.rightVScrollBar.Scroll += (sender, e) =>
{
rightRollIdx = e.NewValue / weightGrid.RowTemplate.Height;
weightGrid.FirstDisplayedScrollingRowIndex = rightRollIdx;
};
}
int leftRollIdx = -1;
private void InitLeftScrollBar()
{
vScrollBar1.Maximum = (weightGrid.RowCount - weightGrid.DisplayedRowCount(false) + 30) * weightGrid.RowTemplate.Height;
vScrollBar1.Minimum = 0;
vScrollBar1.SmallChange = weightGrid.RowTemplate.Height;
vScrollBar1.LargeChange = weightGrid.RowTemplate.Height * 30;
this.vScrollBar1.Scroll += (sender, e) =>
leftVScrollBar.Maximum = (orderGridView.RowCount - orderGridView.DisplayedRowCount(false) + 30) * orderGridView.RowTemplate.Height;
leftVScrollBar.Minimum = 0;
leftVScrollBar.SmallChange = orderGridView.RowTemplate.Height;
leftVScrollBar.LargeChange = orderGridView.RowTemplate.Height * 30;
this.leftVScrollBar.Scroll += (sender, e) =>
{
rollIdx = e.NewValue / weightGrid.RowTemplate.Height;
weightGrid.FirstDisplayedScrollingRowIndex = rollIdx;
leftRollIdx = e.NewValue / orderGridView.RowTemplate.Height;
orderGridView.FirstDisplayedScrollingRowIndex = leftRollIdx;
};
}


+ 0
- 2
WeighAndGrading/GradeContext.cs View File

@ -77,7 +77,5 @@ namespace WeighAndGrading
public decimal MinWeight { get; set; }
public decimal MaxWeight { get; set; }
public decimal AllowInterval{ get; set; }//当固定值发送数据的时候 设置称 多少秒接受数据
}
}

+ 253
- 240
WeighAndGrading/GradeFrom.Designer.cs View File

@ -28,19 +28,19 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle53 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle54 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle56 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle55 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle57 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle58 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle60 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle59 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle61 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle62 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle65 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle63 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle64 = new System.Windows.Forms.DataGridViewCellStyle();
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 dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = 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 dataGridViewCellStyle13 = 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();
this.label1 = new System.Windows.Forms.Label();
this.syncBtn = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
@ -70,23 +70,9 @@
this.mbPanel = new System.Windows.Forms.FlowLayoutPanel();
this.lblMaoBo = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.lblHeJi = new System.Windows.Forms.Label();
this.vScrollBar2 = new System.Windows.Forms.VScrollBar();
this.label12 = new System.Windows.Forms.Label();
this.historyGrid = new BWP.WinFormControl.UDataGridView();
this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsLostWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_ReadWeight = new System.Windows.Forms.DataGridViewCheckBoxColumn();
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.H_OrderDetail_ID = 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();
@ -101,11 +87,26 @@
this.statePic = new System.Windows.Forms.PictureBox();
this.btnDeleteSelected = new System.Windows.Forms.Button();
this.lblSucessed = new System.Windows.Forms.Label();
this.btnClearWeight = new System.Windows.Forms.Button();
this.dropPigBtn = new System.Windows.Forms.Button();
this.btnStartWeight = new System.Windows.Forms.Button();
this.btnStopWeight = new System.Windows.Forms.Button();
this.dataConfirmBtn = new System.Windows.Forms.Button();
this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics_Name = 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.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit();
this.groupBox2.SuspendLayout();
@ -221,17 +222,17 @@
this.tangGridView.AllowUserToDeleteRows = false;
this.tangGridView.AllowUserToResizeColumns = false;
this.tangGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle53.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle53;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.tangGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle54.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle54.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle54.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle54.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle54.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle54.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle54;
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.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.tangGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.tangGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.T_OrderDetail_ID,
@ -245,11 +246,11 @@
this.tangGridView.Name = "tangGridView";
this.tangGridView.ReadOnly = true;
this.tangGridView.RowHeadersVisible = false;
dataGridViewCellStyle56.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle56.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle56.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle56.SelectionForeColor = System.Drawing.Color.Black;
this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle56;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.Black;
this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.tangGridView.RowTemplate.Height = 65;
this.tangGridView.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.tangGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -299,9 +300,9 @@
//
// T_FinishBtn
//
dataGridViewCellStyle55.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle55.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.T_FinishBtn.DefaultCellStyle = dataGridViewCellStyle55;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.T_FinishBtn.DefaultCellStyle = dataGridViewCellStyle3;
this.T_FinishBtn.HeaderText = "完毕";
this.T_FinishBtn.Name = "T_FinishBtn";
this.T_FinishBtn.ReadOnly = true;
@ -333,17 +334,17 @@
this.maoGridView.AllowUserToDeleteRows = false;
this.maoGridView.AllowUserToResizeColumns = false;
this.maoGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle57.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle57;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
this.maoGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle58.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle58.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle58.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle58.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle58.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle58.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle58.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle58;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
this.maoGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.maoGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.M_OrderDetail_ID,
@ -357,11 +358,11 @@
this.maoGridView.Name = "maoGridView";
this.maoGridView.ReadOnly = true;
this.maoGridView.RowHeadersVisible = false;
dataGridViewCellStyle60.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle60.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle60.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle60.SelectionForeColor = System.Drawing.Color.Black;
this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle60;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.Black;
this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle8;
this.maoGridView.RowTemplate.Height = 65;
this.maoGridView.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
this.maoGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -411,9 +412,9 @@
//
// M_FinishBtn
//
dataGridViewCellStyle59.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle59.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.M_FinishBtn.DefaultCellStyle = dataGridViewCellStyle59;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle7.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.M_FinishBtn.DefaultCellStyle = dataGridViewCellStyle7;
this.M_FinishBtn.HeaderText = "完毕";
this.M_FinishBtn.Name = "M_FinishBtn";
this.M_FinishBtn.ReadOnly = true;
@ -439,7 +440,6 @@
//
// groupBox3
//
this.groupBox3.Controls.Add(this.lblHeJi);
this.groupBox3.Controls.Add(this.vScrollBar2);
this.groupBox3.Controls.Add(this.label12);
this.groupBox3.Controls.Add(this.historyGrid);
@ -450,22 +450,11 @@
this.groupBox3.TabStop = false;
this.groupBox3.Text = "记录";
//
// lblHeJi
//
this.lblHeJi.AutoSize = true;
this.lblHeJi.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblHeJi.Location = new System.Drawing.Point(6, 624);
this.lblHeJi.Name = "lblHeJi";
this.lblHeJi.Size = new System.Drawing.Size(82, 24);
this.lblHeJi.TabIndex = 53;
this.lblHeJi.Text = "合计:";
this.lblHeJi.Visible = false;
//
// vScrollBar2
//
this.vScrollBar2.Location = new System.Drawing.Point(479, 36);
this.vScrollBar2.Name = "vScrollBar2";
this.vScrollBar2.Size = new System.Drawing.Size(40, 566);
this.vScrollBar2.Size = new System.Drawing.Size(40, 610);
this.vScrollBar2.TabIndex = 52;
//
// label12
@ -484,159 +473,44 @@
this.historyGrid.AllowUserToDeleteRows = false;
this.historyGrid.AllowUserToResizeColumns = false;
this.historyGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle61.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle61;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
this.historyGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle62.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle62.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle62.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle62.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle62.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle62.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle62.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle62;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_SID,
this.H_Livestock_ID,
this.IsLostWeight,
this.H_IsDrop,
this.H_ReadWeight,
this.H_Technics,
this.H_Index,
this.H_Order,
this.H_Technics,
this.H_Technics_Name,
this.H_Livestock_Name,
this.H_Weight,
this.H_Time,
this.H_OrderDetail_ID});
this.H_Time});
this.historyGrid.Location = new System.Drawing.Point(1, 36);
this.historyGrid.MultiSelect = false;
this.historyGrid.Name = "historyGrid";
this.historyGrid.ReadOnly = true;
this.historyGrid.RowHeadersVisible = false;
dataGridViewCellStyle65.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle65.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle65;
dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle13;
this.historyGrid.RowTemplate.Height = 40;
this.historyGrid.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.historyGrid.Size = new System.Drawing.Size(478, 566);
this.historyGrid.Size = new System.Drawing.Size(478, 610);
this.historyGrid.TabIndex = 0;
this.historyGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.historyGrid_CellClick);
//
// H_SID
//
this.H_SID.DataPropertyName = "SID";
this.H_SID.HeaderText = "SID";
this.H_SID.Name = "H_SID";
this.H_SID.ReadOnly = true;
this.H_SID.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;
//
// IsLostWeight
//
this.IsLostWeight.DataPropertyName = "IsLostWeight";
this.IsLostWeight.HeaderText = "IsLostWeight";
this.IsLostWeight.Name = "IsLostWeight";
this.IsLostWeight.ReadOnly = true;
this.IsLostWeight.Visible = false;
//
// H_IsDrop
//
this.H_IsDrop.DataPropertyName = "IsDrop";
this.H_IsDrop.HeaderText = "IsDrop";
this.H_IsDrop.Name = "H_IsDrop";
this.H_IsDrop.ReadOnly = true;
this.H_IsDrop.Visible = false;
//
// H_ReadWeight
//
this.H_ReadWeight.DataPropertyName = "ReadWeight";
this.H_ReadWeight.HeaderText = "";
this.H_ReadWeight.Name = "H_ReadWeight";
this.H_ReadWeight.ReadOnly = true;
this.H_ReadWeight.Width = 30;
//
// 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 = 65;
//
// 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";
dataGridViewCellStyle63.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle63;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 70;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
dataGridViewCellStyle64.Format = "HH:mm:ss";
dataGridViewCellStyle64.NullValue = null;
this.H_Time.DefaultCellStyle = dataGridViewCellStyle64;
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// H_OrderDetail_ID
//
this.H_OrderDetail_ID.DataPropertyName = "OrderDetail_ID";
this.H_OrderDetail_ID.HeaderText = "OrderDetail_ID";
this.H_OrderDetail_ID.Name = "H_OrderDetail_ID";
this.H_OrderDetail_ID.ReadOnly = true;
this.H_OrderDetail_ID.Visible = false;
//
// enableWeight
//
this.enableWeight.AutoCheck = false;
this.enableWeight.AutoSize = true;
this.enableWeight.Font = new System.Drawing.Font("宋体", 18F);
this.enableWeight.Location = new System.Drawing.Point(427, -2);
this.enableWeight.Name = "enableWeight";
this.enableWeight.Size = new System.Drawing.Size(125, 28);
this.enableWeight.TabIndex = 31;
this.enableWeight.Text = "启用称重";
this.enableWeight.UseVisualStyleBackColor = true;
this.enableWeight.Visible = false;
this.enableWeight.Click += new System.EventHandler(this.enableWeight_Click);
//
// isPrintCheckBox
//
this.isPrintCheckBox.AutoSize = true;
@ -696,7 +570,7 @@
// configBtn
//
this.configBtn.Font = new System.Drawing.Font("宋体", 15F);
this.configBtn.Location = new System.Drawing.Point(417, 38);
this.configBtn.Location = new System.Drawing.Point(400, 2);
this.configBtn.Name = "configBtn";
this.configBtn.Size = new System.Drawing.Size(102, 42);
this.configBtn.TabIndex = 34;
@ -741,7 +615,7 @@
// discontBtn
//
this.discontBtn.Font = new System.Drawing.Font("宋体", 15F);
this.discontBtn.Location = new System.Drawing.Point(541, 38);
this.discontBtn.Location = new System.Drawing.Point(400, 50);
this.discontBtn.Name = "discontBtn";
this.discontBtn.Size = new System.Drawing.Size(102, 42);
this.discontBtn.TabIndex = 37;
@ -760,7 +634,7 @@
//
this.statePic.ErrorImage = null;
this.statePic.InitialImage = null;
this.statePic.Location = new System.Drawing.Point(219, 89);
this.statePic.Location = new System.Drawing.Point(274, 93);
this.statePic.Name = "statePic";
this.statePic.Size = new System.Drawing.Size(30, 30);
this.statePic.TabIndex = 38;
@ -769,7 +643,7 @@
// btnDeleteSelected
//
this.btnDeleteSelected.Font = new System.Drawing.Font("宋体", 15F);
this.btnDeleteSelected.Location = new System.Drawing.Point(1102, 6);
this.btnDeleteSelected.Location = new System.Drawing.Point(1197, 14);
this.btnDeleteSelected.Name = "btnDeleteSelected";
this.btnDeleteSelected.Size = new System.Drawing.Size(102, 54);
this.btnDeleteSelected.TabIndex = 34;
@ -782,7 +656,7 @@
this.lblSucessed.BackColor = System.Drawing.Color.Lime;
this.lblSucessed.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblSucessed.ForeColor = System.Drawing.Color.Red;
this.lblSucessed.Location = new System.Drawing.Point(691, 70);
this.lblSucessed.Location = new System.Drawing.Point(785, 70);
this.lblSucessed.Name = "lblSucessed";
this.lblSucessed.Size = new System.Drawing.Size(267, 39);
this.lblSucessed.TabIndex = 39;
@ -790,21 +664,10 @@
this.lblSucessed.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblSucessed.Visible = false;
//
// btnClearWeight
//
this.btnClearWeight.Font = new System.Drawing.Font("宋体", 15F);
this.btnClearWeight.Location = new System.Drawing.Point(971, 6);
this.btnClearWeight.Name = "btnClearWeight";
this.btnClearWeight.Size = new System.Drawing.Size(102, 54);
this.btnClearWeight.TabIndex = 34;
this.btnClearWeight.Text = "删除称重";
this.btnClearWeight.UseVisualStyleBackColor = true;
this.btnClearWeight.Click += new System.EventHandler(this.btnClearLastWeight_Click);
//
// dropPigBtn
//
this.dropPigBtn.Font = new System.Drawing.Font("宋体", 15F);
this.dropPigBtn.Location = new System.Drawing.Point(845, 6);
this.dropPigBtn.Location = new System.Drawing.Point(1071, 14);
this.dropPigBtn.Name = "dropPigBtn";
this.dropPigBtn.Size = new System.Drawing.Size(102, 54);
this.dropPigBtn.TabIndex = 40;
@ -814,9 +677,10 @@
//
// btnStartWeight
//
this.btnStartWeight.Font = new System.Drawing.Font("宋体", 15F);
this.btnStartWeight.Location = new System.Drawing.Point(12, 85);
this.btnStartWeight.Name = "btnStartWeight";
this.btnStartWeight.Size = new System.Drawing.Size(82, 39);
this.btnStartWeight.Size = new System.Drawing.Size(109, 42);
this.btnStartWeight.TabIndex = 41;
this.btnStartWeight.Text = "启用称重";
this.btnStartWeight.UseVisualStyleBackColor = true;
@ -825,9 +689,10 @@
// btnStopWeight
//
this.btnStopWeight.Enabled = false;
this.btnStopWeight.Location = new System.Drawing.Point(116, 84);
this.btnStopWeight.Font = new System.Drawing.Font("宋体", 15F);
this.btnStopWeight.Location = new System.Drawing.Point(140, 85);
this.btnStopWeight.Name = "btnStopWeight";
this.btnStopWeight.Size = new System.Drawing.Size(85, 39);
this.btnStopWeight.Size = new System.Drawing.Size(109, 42);
this.btnStopWeight.TabIndex = 41;
this.btnStopWeight.Text = "停止称重";
this.btnStopWeight.UseVisualStyleBackColor = true;
@ -836,7 +701,7 @@
// dataConfirmBtn
//
this.dataConfirmBtn.Font = new System.Drawing.Font("宋体", 15F);
this.dataConfirmBtn.Location = new System.Drawing.Point(1226, 6);
this.dataConfirmBtn.Location = new System.Drawing.Point(1321, 14);
this.dataConfirmBtn.Name = "dataConfirmBtn";
this.dataConfirmBtn.Size = new System.Drawing.Size(102, 54);
this.dataConfirmBtn.TabIndex = 42;
@ -844,13 +709,162 @@
this.dataConfirmBtn.UseVisualStyleBackColor = true;
this.dataConfirmBtn.Click += new System.EventHandler(this.dataConfirmBtn_Click);
//
// H_SID
//
this.H_SID.DataPropertyName = "SID";
this.H_SID.HeaderText = "SID";
this.H_SID.Name = "H_SID";
this.H_SID.ReadOnly = true;
this.H_SID.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_IsDrop
//
this.H_IsDrop.DataPropertyName = "IsDrop";
this.H_IsDrop.HeaderText = "IsDrop";
this.H_IsDrop.Name = "H_IsDrop";
this.H_IsDrop.ReadOnly = true;
this.H_IsDrop.Visible = false;
//
// H_Technics
//
this.H_Technics.DataPropertyName = "Technics";
this.H_Technics.HeaderText = "Technics";
this.H_Technics.Name = "H_Technics";
this.H_Technics.ReadOnly = true;
this.H_Technics.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 = 65;
//
// H_Technics_Name
//
this.H_Technics_Name.DataPropertyName = "Technics_Name";
this.H_Technics_Name.HeaderText = "工艺";
this.H_Technics_Name.Name = "H_Technics_Name";
this.H_Technics_Name.ReadOnly = true;
this.H_Technics_Name.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 = 110;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle11.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle11;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 70;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
dataGridViewCellStyle12.Format = "HH:mm:ss";
dataGridViewCellStyle12.NullValue = null;
this.H_Time.DefaultCellStyle = dataGridViewCellStyle12;
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("宋体", 15F);
this.label5.Location = new System.Drawing.Point(524, 8);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(69, 20);
this.label5.TabIndex = 45;
this.label5.Text = "烫褪:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("宋体", 15F);
this.label6.Location = new System.Drawing.Point(524, 45);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(69, 20);
this.label6.TabIndex = 46;
this.label6.Text = "毛剥:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 15F);
this.label7.Location = new System.Drawing.Point(583, 10);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(179, 20);
this.label7.TabIndex = 47;
this.label7.Text = "5000 头 500000 KG";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("宋体", 15F);
this.label9.Location = new System.Drawing.Point(524, 81);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(69, 20);
this.label9.TabIndex = 49;
this.label9.Text = "合计:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 15F);
this.label3.Location = new System.Drawing.Point(583, 47);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(179, 20);
this.label3.TabIndex = 50;
this.label3.Text = "5000 头 500000 KG";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("宋体", 15F);
this.label8.Location = new System.Drawing.Point(583, 85);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(179, 20);
this.label8.TabIndex = 51;
this.label8.Text = "5000 头 500000 KG";
//
// GradeFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1438, 845);
this.Controls.Add(this.label8);
this.Controls.Add(this.label3);
this.Controls.Add(this.label9);
this.Controls.Add(this.label7);
this.Controls.Add(this.dataConfirmBtn);
this.Controls.Add(this.label6);
this.Controls.Add(this.btnStopWeight);
this.Controls.Add(this.label5);
this.Controls.Add(this.btnStartWeight);
this.Controls.Add(this.dropPigBtn);
this.Controls.Add(this.lblSucessed);
@ -859,10 +873,8 @@
this.Controls.Add(this.lblMaoBo);
this.Controls.Add(this.discontBtn);
this.Controls.Add(this.modifyPanel);
this.Controls.Add(this.btnClearWeight);
this.Controls.Add(this.btnDeleteSelected);
this.Controls.Add(this.configBtn);
this.Controls.Add(this.enableWeight);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.isPrintCheckBox);
this.Controls.Add(this.groupBox2);
@ -915,7 +927,6 @@
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.FlowLayoutPanel mbPanel;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.CheckBox enableWeight;
private System.Windows.Forms.CheckBox isPrintCheckBox;
private System.Windows.Forms.Button printBtn;
private System.Windows.Forms.Panel panel1;
@ -948,24 +959,26 @@
private System.Windows.Forms.DataGridViewTextBoxColumn M_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Already;
private System.Windows.Forms.DataGridViewButtonColumn M_FinishBtn;
private System.Windows.Forms.Label lblHeJi;
private System.Windows.Forms.Label lblSucessed;
private System.Windows.Forms.Button btnClearWeight;
private System.Windows.Forms.Button dropPigBtn;
private System.Windows.Forms.Button btnStartWeight;
private System.Windows.Forms.Button btnStopWeight;
private System.Windows.Forms.Button dataConfirmBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn H_SID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn IsLostWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_IsDrop;
private System.Windows.Forms.DataGridViewCheckBoxColumn H_ReadWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Index;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Order;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics_Name;
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.DataGridViewTextBoxColumn H_OrderDetail_ID;
private System.Windows.Forms.Button dataConfirmBtn;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label8;
}
}

+ 79
- 655
WeighAndGrading/GradeFrom.cs
File diff suppressed because it is too large
View File


+ 2
- 8
WeighAndGrading/GradeFrom.resx View File

@ -159,13 +159,10 @@
<metadata name="H_Livestock_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="IsLostWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_IsDrop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_ReadWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_Technics.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@ -174,7 +171,7 @@
<metadata name="H_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Technics.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_Technics_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Livestock_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@ -186,7 +183,4 @@
<metadata name="H_Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_OrderDetail_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 3
- 29
WeighAndGrading/GradeSettingFrom.Designer.cs View File

@ -47,8 +47,6 @@
this.label8 = new System.Windows.Forms.Label();
this.minInput = new BWP.WinFormControl.UTextBoxWithPad();
this.maxInput = new BWP.WinFormControl.UTextBoxWithPad();
this.label9 = new System.Windows.Forms.Label();
this.utxtAllowInterval = new BWP.WinFormControl.UTextBoxWithPad();
this.SuspendLayout();
//
// label5
@ -64,7 +62,7 @@
// closeBtn
//
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.Location = new System.Drawing.Point(173, 461);
this.closeBtn.Location = new System.Drawing.Point(173, 416);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(75, 35);
this.closeBtn.TabIndex = 19;
@ -75,7 +73,7 @@
// saveBtn
//
this.saveBtn.Font = new System.Drawing.Font("宋体", 15F);
this.saveBtn.Location = new System.Drawing.Point(67, 461);
this.saveBtn.Location = new System.Drawing.Point(67, 416);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(75, 35);
this.saveBtn.TabIndex = 18;
@ -234,38 +232,17 @@
this.maxInput.TabIndex = 29;
this.maxInput.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("宋体", 15F);
this.label9.Location = new System.Drawing.Point(51, 409);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(109, 20);
this.label9.TabIndex = 27;
this.label9.Text = "有效间隔:";
//
// utxtAllowInterval
//
this.utxtAllowInterval.Font = new System.Drawing.Font("宋体", 14F);
this.utxtAllowInterval.Location = new System.Drawing.Point(173, 407);
this.utxtAllowInterval.Name = "utxtAllowInterval";
this.utxtAllowInterval.Size = new System.Drawing.Size(121, 29);
this.utxtAllowInterval.TabIndex = 24;
this.utxtAllowInterval.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// GradeSettingFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(354, 543);
this.ClientSize = new System.Drawing.Size(354, 473);
this.ControlBox = false;
this.Controls.Add(this.maxInput);
this.Controls.Add(this.minInput);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.weightReadType);
this.Controls.Add(this.label7);
this.Controls.Add(this.utxtAllowInterval);
this.Controls.Add(this.discont);
this.Controls.Add(this.format);
this.Controls.Add(this.label6);
@ -284,7 +261,6 @@
this.Name = "GradeSettingFrom";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "称重设置";
this.Load += new System.EventHandler(this.GradeSettingFrom_Load);
this.ResumeLayout(false);
this.PerformLayout();
@ -311,7 +287,5 @@
private System.Windows.Forms.Label label8;
private BWP.WinFormControl.UTextBoxWithPad minInput;
private BWP.WinFormControl.UTextBoxWithPad maxInput;
private System.Windows.Forms.Label label9;
private BWP.WinFormControl.UTextBoxWithPad utxtAllowInterval;
}
}

+ 0
- 13
WeighAndGrading/GradeSettingFrom.cs View File

@ -52,8 +52,6 @@ namespace WeighAndGrading
weightReadType.SelectedIndex = GradeContext.Config.WeightType;
minInput.Text = GradeContext.Config.MinWeight.ToString();
maxInput.Text = GradeContext.Config.MaxWeight.ToString();
utxtAllowInterval.Text = GradeContext.Config.AllowInterval.ToString();
}
private void saveBtn_Click(object sender, EventArgs e)
@ -86,12 +84,6 @@ namespace WeighAndGrading
else
GradeContext.Config.Discont = 0;
decimal allowInterval;
if (decimal.TryParse(utxtAllowInterval.Text.Trim(), out allowInterval))
{
GradeContext.Config.AllowInterval = allowInterval;
}
GradeContext.Save();
MessageBox.Show("保存成功!");
}
@ -100,10 +92,5 @@ namespace WeighAndGrading
{
this.Close();
}
private void GradeSettingFrom_Load(object sender, EventArgs e)
{
}
}
}

+ 0
- 9
WeighAndGrading/WeighAndGrading.csproj View File

@ -49,12 +49,6 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="AbnormalModifyForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AbnormalModifyForm.Designer.cs">
<DependentUpon>AbnormalModifyForm.cs</DependentUpon>
</Compile>
<Compile Include="BodyDiscontSetting.cs">
<SubType>Form</SubType>
</Compile>
@ -89,9 +83,6 @@
<Compile Include="WeightGradePrint.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AbnormalModifyForm.resx">
<DependentUpon>AbnormalModifyForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BodyDiscontSetting.resx">
<DependentUpon>BodyDiscontSetting.cs</DependentUpon>
</EmbeddedResource>


Loading…
Cancel
Save