Browse Source

优化。

master
yibo 7 years ago
parent
commit
4a38f97198
16 changed files with 218 additions and 148 deletions
  1. +6
    -1
      ButcherFactory.BO/Base/BaseInfo.cs
  2. +1
    -7
      ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs
  3. +0
    -1
      ButcherFactory.BO/BaseInfo/Goods.cs
  4. +2
    -2
      ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs
  5. +7
    -4
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  6. +1
    -1
      ButcherFactory.BO/LocalBL/SegmentSaleOutBL.cs
  7. +72
    -22
      ButcherFactory.BO/Rpcs/BaseInfoSyncRpc.cs
  8. +1
    -1
      ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs
  9. +1
    -1
      ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.cs
  10. +1
    -1
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs
  11. +1
    -1
      ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.cs
  12. +1
    -1
      ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs
  13. +1
    -1
      ButcherFactory.Form/SegmentPickUp_/SegmentPickUpForm.cs
  14. +107
    -93
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs
  15. +15
    -10
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs
  16. +1
    -1
      ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs

+ 6
- 1
ButcherFactory.BO/Base/BaseInfo.cs View File

@ -1,4 +1,5 @@
using System;
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@ -6,10 +7,14 @@ using System.Threading.Tasks;
namespace ButcherFactory.BO namespace ButcherFactory.BO
{ {
[KeyField("ID", KeyGenType.assigned)]
public abstract class BaseInfo public abstract class BaseInfo
{ {
public long ID { get; set; } public long ID { get; set; }
public string Name { get; set; } public string Name { get; set; }
[DbColumn(DefaultValue = 0)]
public int RowVersion { get; set; }
} }
} }

+ 1
- 7
ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs View File

@ -13,16 +13,10 @@ namespace ButcherFactory.BO
private List<ClientGoodsSet_Detail> mDetails = new List<ClientGoodsSet_Detail>(); private List<ClientGoodsSet_Detail> mDetails = new List<ClientGoodsSet_Detail>();
[NonDmoProperty] [NonDmoProperty]
public List<ClientGoodsSet_Detail> Details { get { return mDetails; } } public List<ClientGoodsSet_Detail> Details { get { return mDetails; } }
private List<Goods> mGoods = new List<Goods>();
[NonDmoProperty]
public List<Goods> Goods { get { return mGoods; } }
[NonDmoProperty]
public bool Stopped { get; set; }
} }
[MapToTable("Butcher_ClientGoodsSet_Detail")] [MapToTable("Butcher_ClientGoodsSet_Detail")]
[KeyField("ID", KeyGenType.assigned)]
public class ClientGoodsSet_Detail public class ClientGoodsSet_Detail
{ {
public long ClientGoodsSet_ID { get; set; } public long ClientGoodsSet_ID { get; set; }


+ 0
- 1
ButcherFactory.BO/BaseInfo/Goods.cs View File

@ -8,7 +8,6 @@ using System.Threading.Tasks;
namespace ButcherFactory.BO namespace ButcherFactory.BO
{ {
[MapToTable("Butcher_Goods")] [MapToTable("Butcher_Goods")]
[KeyField("ID", KeyGenType.assigned)]
public class Goods : BaseInfo public class Goods : BaseInfo
{ {
public string Code { get; set; } public string Code { get; set; }


+ 2
- 2
ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs View File

@ -188,9 +188,9 @@ namespace ButcherFactory.BO.LocalBL
return goodsCodeInfo[code]; return goodsCodeInfo[code];
} }
public static List<ProductBatch> GetBatchFromEMS()
public static List<ProductBatch> GetBatchFromEMS(int type)
{ {
var json = ButcherFactoryUtil.SecondUrlCall<string>(MESPath + "SyncBaseInfoRpc/GetProductBatch", 9);
var json = ButcherFactoryUtil.SecondUrlCall<string>(MESPath + "SyncBaseInfoRpc/GetProductBatchByType", 9, type);
return JsonConvert.DeserializeObject<List<ProductBatch>>(json); return JsonConvert.DeserializeObject<List<ProductBatch>>(json);
} }


+ 7
- 4
ButcherFactory.BO/LocalBL/SegmentProductionBL.cs View File

@ -76,7 +76,7 @@ namespace ButcherFactory.BO.LocalBL
} }
} }
public static SegmentProduction InsertAndSetGroupID(long goodsID, decimal weight, long? workUnitID, long productBatchID, DateTime batchDate)
public static SegmentProduction InsertAndSetGroupID(long goodsID, decimal weight, long? workUnitID, long productBatchID, DateTime batchDate,bool test)
{ {
using (var session = DmoSession.New()) using (var session = DmoSession.New())
{ {
@ -89,9 +89,12 @@ namespace ButcherFactory.BO.LocalBL
entity.RowIndex = GenerateRowIndex(productBatchID, session); entity.RowIndex = GenerateRowIndex(productBatchID, session);
entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1}{2:00000}", batchDate, AppContext.ConnectInfo.ClientCode, entity.RowIndex); entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1}{2:00000}", batchDate, AppContext.ConnectInfo.ClientCode, entity.RowIndex);
entity.Submited = true; entity.Submited = true;
session.Insert(entity);
FillGroupIDAsID(session, entity.ID);
session.Commit();
if (!test)
{
session.Insert(entity);
FillGroupIDAsID(session, entity.ID);
session.Commit();
}
return entity; return entity;
} }
} }


+ 1
- 1
ButcherFactory.BO/LocalBL/SegmentSaleOutBL.cs View File

@ -59,7 +59,7 @@ namespace ButcherFactory.BO.LocalBL
public static List<ProductBatch> GetBatchFromEMS() public static List<ProductBatch> GetBatchFromEMS()
{ {
return CarcassSaleOutBL.GetBatchFromEMS();
return CarcassSaleOutBL.GetBatchFromEMS(1);
} }
static void SubmitDetails(IEnumerable<SegmentSaleOut_Detail> details, SaleOutStore_Detail detail, int flag) static void SubmitDetails(IEnumerable<SegmentSaleOut_Detail> details, SaleOutStore_Detail detail, int flag)


+ 72
- 22
ButcherFactory.BO/Rpcs/BaseInfoSyncRpc.cs View File

@ -1,6 +1,7 @@
using ButcherFactory.BO.Utils; using ButcherFactory.BO.Utils;
using Forks.EnterpriseServices.DomainObjects2; using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery; using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using Forks.JsonRpc.Client; using Forks.JsonRpc.Client;
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
@ -15,47 +16,91 @@ namespace ButcherFactory.BO.Rpcs
{ {
const string baseInfoRpcPath = @"/MainSystem/B3ClientService/Rpcs/SyncBaseInfoRpc/"; const string baseInfoRpcPath = @"/MainSystem/B3ClientService/Rpcs/SyncBaseInfoRpc/";
static void TruncateTable(Type type, IDmoSession session)
{
var table = DmoInfo.Get(type).MappedDBObject;
var sql = string.Format("truncate table [{0}]", table);
session.ExecuteSqlNonQuery(sql);
}
public static void SyncBaseInfo<T>(string methodName = null) public static void SyncBaseInfo<T>(string methodName = null)
where T : BaseInfo where T : BaseInfo
{ {
var type = typeof(T); var type = typeof(T);
if (string.IsNullOrEmpty(methodName)) if (string.IsNullOrEmpty(methodName))
methodName = "Sync" + type.Name; methodName = "Sync" + type.Name;
var json = RpcFacade.Call<string>(baseInfoRpcPath + methodName);
var list = JsonConvert.DeserializeObject<List<T>>(json);
using (var session = DmoSession.New()) using (var session = DmoSession.New())
{ {
TruncateTable(type, session);
foreach (var item in list)
var localVersion = GetLocalVersion<T>(session);
var json = RpcFacade.Call<string>(baseInfoRpcPath + methodName, JsonConvert.SerializeObject(localVersion));
var result = JsonConvert.DeserializeObject<Tuple<List<T>, List<T>, List<long>>>(json);//insert,update,delete
foreach (var item in result.Item1)
session.Insert(item); session.Insert(item);
foreach (var item in result.Item2)
session.Update(item);
if (result.Item3.Any())
Delete<T>(session, result.Item3);
session.Commit();
}
}
static void Delete<T>(IDmoSession session, List<long> ids)
where T : BaseInfo
{
var delete = new DQDeleteDom(typeof(T));
delete.Where.Conditions.Add(DQCondition.InList(DQExpression.Field("ID"), ids.Select(x => DQExpression.Value(x)).ToArray()));
session.ExecuteNonQuery(delete);
}
static List<Tuple<long, int>> GetLocalVersion<T>(IDmoSession session)
where T : BaseInfo
{
var query = new DQueryDom(new JoinAlias(typeof(T)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("RowVersion"));
return query.EExecuteList<long, int>(session);
}
public static void SyncProductBatch(int batchType)
{
using (var session = DmoSession.New())
{
var local = GetLocalVersion<ProductBatch>(session);
var json = RpcFacade.Call<string>(baseInfoRpcPath + "SyncProductBatchByType", batchType, JsonConvert.SerializeObject(local));
var result = JsonConvert.DeserializeObject<Tuple<List<ProductBatch>, List<ProductBatch>, List<long>>>(json);//insert,update,delete
foreach (var item in result.Item1)
session.Insert(item);
foreach (var item in result.Item2)
session.Update(item);
if (result.Item3.Any())
Delete<ProductBatch>(session, result.Item3);
session.Commit(); session.Commit();
} }
} }
public static void SyncGoodsByTag(ApplyClient applyClient) public static void SyncGoodsByTag(ApplyClient applyClient)
{ {
var json = RpcFacade.Call<string>(baseInfoRpcPath + "SyncClientGoodsSetByClient", (short)applyClient);
var list = JsonConvert.DeserializeObject<List<ClientGoodsSet>>(json);
using (var session = DmoSession.New()) using (var session = DmoSession.New())
{ {
foreach (var item in list)
{
DeleteOld(item.ID, session);
if (!item.Stopped)
Insert(item, session);
}
var local = GetLocalVersion<ClientGoodsSet>(session);
var g2 = GetLocalVersion<Goods>(session);
var json = RpcFacade.Call<string>(baseInfoRpcPath + "SyncClientGoodsSetByClient", (short)applyClient, JsonConvert.SerializeObject(local), JsonConvert.SerializeObject(g2));
var result = JsonConvert.DeserializeObject<Tuple<List<ClientGoodsSet>, List<ClientGoodsSet>, List<long>, List<Goods>, List<Goods>, List<long>>>(json);//insert,update,delete
foreach (var item in result.Item1)
Insert(item, session);
foreach (var item in result.Item2)
Update(item, session);
foreach (var item in result.Item3)
DeleteClientSet(item, session);
foreach (var item in result.Item4)
session.Insert(item);
foreach (var item in result.Item5)
session.Update(item);
if (result.Item6.Any())
Delete<Goods>(session, result.Item6);
session.Commit(); session.Commit();
} }
} }
static void DeleteOld(long id, IDmoSession session)
static void DeleteClientSet(long id, IDmoSession session)
{ {
var detail = new DQDeleteDom(typeof(ClientGoodsSet_Detail)); var detail = new DQDeleteDom(typeof(ClientGoodsSet_Detail));
detail.Where.Conditions.Add(DQCondition.EQ("ClientGoodsSet_ID", id)); detail.Where.Conditions.Add(DQCondition.EQ("ClientGoodsSet_ID", id));
@ -71,8 +116,13 @@ namespace ButcherFactory.BO.Rpcs
session.Insert(entity); session.Insert(entity);
foreach (var detail in entity.Details) foreach (var detail in entity.Details)
session.Insert(detail); session.Insert(detail);
foreach (var goods in entity.Goods)
session.AddUpdateOrInsert(goods);
}
static void Update(ClientGoodsSet entity, IDmoSession session)
{
session.Update(entity);
foreach (var detail in entity.Details)
session.AddUpdateOrInsert(detail);
} }
} }
} }

+ 1
- 1
ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs View File

@ -115,7 +115,7 @@ namespace ButcherFactory.CarcassInStore_
{ {
BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.); BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.);
BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>(); BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>();
BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
BaseInfoSyncRpc.SyncProductBatch(0);
} }
productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date"); productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date");
var config = XmlUtil.DeserializeFromFile<CarcassInStoreFormConfig>(); var config = XmlUtil.DeserializeFromFile<CarcassInStoreFormConfig>();


+ 1
- 1
ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.cs View File

@ -111,7 +111,7 @@ namespace ButcherFactory.CarcassSaleOut2_
private void BindProductBatch() private void BindProductBatch()
{ {
var batchs = CarcassSaleOutBL.GetBatchFromEMS();
var batchs = CarcassSaleOutBL.GetBatchFromEMS(0);
productBatchSelect.DisplayMember = "Name"; productBatchSelect.DisplayMember = "Name";
productBatchSelect.ValueMember = "ID"; productBatchSelect.ValueMember = "ID";


+ 1
- 1
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs View File

@ -110,7 +110,7 @@ namespace ButcherFactory.CarcassSaleOut_
private void BindProductBatch() private void BindProductBatch()
{ {
var batchs = CarcassSaleOutBL.GetBatchFromEMS();
var batchs = CarcassSaleOutBL.GetBatchFromEMS(0);
productBatchSelect.DisplayMember = "Name"; productBatchSelect.DisplayMember = "Name";
productBatchSelect.ValueMember = "ID"; productBatchSelect.ValueMember = "ID";


+ 1
- 1
ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.cs View File

@ -92,7 +92,7 @@ namespace ButcherFactory.CarcassTakeOut_
{ {
BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.); BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.);
BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>(); BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>();
BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
BaseInfoSyncRpc.SyncProductBatch(0);
} }
productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date"); productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date");


+ 1
- 1
ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs View File

@ -75,7 +75,7 @@ namespace ButcherFactory.SegmentInStore_
if (netStateWatch1.NetState) if (netStateWatch1.NetState)
{ {
BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>(); BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>();
BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
BaseInfoSyncRpc.SyncProductBatch(1);
BaseInfoSyncRpc.SyncBaseInfo<Store>(); BaseInfoSyncRpc.SyncBaseInfo<Store>();
} }
var config = XmlUtil.DeserializeFromFile<SegmentInStoreFormConfig>(); var config = XmlUtil.DeserializeFromFile<SegmentInStoreFormConfig>();


+ 1
- 1
ButcherFactory.Form/SegmentPickUp_/SegmentPickUpForm.cs View File

@ -92,7 +92,7 @@ namespace ButcherFactory.SegmentPickUp_
{ {
BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.); BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.);
BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>(); BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>();
BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
BaseInfoSyncRpc.SyncProductBatch(1);
} }
productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date"); productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date");


+ 107
- 93
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs View File

@ -28,16 +28,16 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
this.uLabel3 = new WinFormControl.ULabel(); this.uLabel3 = new WinFormControl.ULabel();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.taskDataGrid = new WinFormControl.UDataGridView(); this.taskDataGrid = new WinFormControl.UDataGridView();
@ -47,6 +47,8 @@
this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsLabel = new WinFormControl.ULabel(); this.GoodsLabel = new WinFormControl.ULabel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.closeBtn = new ButcherFactory.Controls.ColorButton();
this.uWeightControl1 = new ButcherFactory.Controls.WeightControl();
this.barPrintCheck = new System.Windows.Forms.CheckBox(); this.barPrintCheck = new System.Windows.Forms.CheckBox();
this.uTimerLabel1 = new WinFormControl.UTimerLabel(); this.uTimerLabel1 = new WinFormControl.UTimerLabel();
this.productBatchSelect = new System.Windows.Forms.ComboBox(); this.productBatchSelect = new System.Windows.Forms.ComboBox();
@ -55,8 +57,10 @@
this.uLabel2 = new WinFormControl.ULabel(); this.uLabel2 = new WinFormControl.ULabel();
this.netStateWatch1 = new WinFormControl.NetStateWatch(); this.netStateWatch1 = new WinFormControl.NetStateWatch();
this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.goodsSetBtn = new ButcherFactory.Controls.ColorButton();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.rePrintBtn = new ButcherFactory.Controls.ColorButton();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.historyDataGrid = new WinFormControl.UDataGridView(); this.historyDataGrid = new WinFormControl.UDataGridView();
this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -64,10 +68,7 @@
this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.closeBtn = new ButcherFactory.Controls.ColorButton();
this.uWeightControl1 = new ButcherFactory.Controls.WeightControl();
this.goodsSetBtn = new ButcherFactory.Controls.ColorButton();
this.rePrintBtn = new ButcherFactory.Controls.ColorButton();
this.testCkBox = new System.Windows.Forms.CheckBox();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@ -110,15 +111,15 @@
this.taskDataGrid.AllowUserToDeleteRows = false; this.taskDataGrid.AllowUserToDeleteRows = false;
this.taskDataGrid.AllowUserToResizeColumns = false; this.taskDataGrid.AllowUserToResizeColumns = false;
this.taskDataGrid.AllowUserToResizeRows = false; this.taskDataGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21;
this.taskDataGrid.BackgroundColor = System.Drawing.Color.White; this.taskDataGrid.BackgroundColor = System.Drawing.Color.White;
this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle22.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22;
this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.T_Item, this.T_Item,
@ -131,9 +132,9 @@
this.taskDataGrid.Name = "taskDataGrid"; this.taskDataGrid.Name = "taskDataGrid";
this.taskDataGrid.ReadOnly = true; this.taskDataGrid.ReadOnly = true;
this.taskDataGrid.RowHeadersVisible = false; this.taskDataGrid.RowHeadersVisible = false;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle26.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle26.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle26;
this.taskDataGrid.RowTemplate.Height = 23; this.taskDataGrid.RowTemplate.Height = 23;
this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.taskDataGrid.Size = new System.Drawing.Size(442, 96); this.taskDataGrid.Size = new System.Drawing.Size(442, 96);
@ -150,8 +151,8 @@
// //
this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Need.DataPropertyName = "Need"; this.T_Need.DataPropertyName = "Need";
dataGridViewCellStyle3.Format = "#0.######";
this.T_Need.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle23.Format = "#0.######";
this.T_Need.DefaultCellStyle = dataGridViewCellStyle23;
this.T_Need.HeaderText = "订货"; this.T_Need.HeaderText = "订货";
this.T_Need.Name = "T_Need"; this.T_Need.Name = "T_Need";
this.T_Need.ReadOnly = true; this.T_Need.ReadOnly = true;
@ -160,8 +161,8 @@
// //
this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Done.DataPropertyName = "Done"; this.T_Done.DataPropertyName = "Done";
dataGridViewCellStyle4.Format = "#0.######";
this.T_Done.DefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle24.Format = "#0.######";
this.T_Done.DefaultCellStyle = dataGridViewCellStyle24;
this.T_Done.HeaderText = "完工"; this.T_Done.HeaderText = "完工";
this.T_Done.Name = "T_Done"; this.T_Done.Name = "T_Done";
this.T_Done.ReadOnly = true; this.T_Done.ReadOnly = true;
@ -170,8 +171,8 @@
// //
this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Last.DataPropertyName = "Last"; this.T_Last.DataPropertyName = "Last";
dataGridViewCellStyle5.Format = "#0.######";
this.T_Last.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle25.Format = "#0.######";
this.T_Last.DefaultCellStyle = dataGridViewCellStyle25;
this.T_Last.HeaderText = "剩余"; this.T_Last.HeaderText = "剩余";
this.T_Last.Name = "T_Last"; this.T_Last.Name = "T_Last";
this.T_Last.ReadOnly = true; this.T_Last.ReadOnly = true;
@ -202,6 +203,7 @@
// //
this.splitContainer1.Panel1.Controls.Add(this.closeBtn); this.splitContainer1.Panel1.Controls.Add(this.closeBtn);
this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1); this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1);
this.splitContainer1.Panel1.Controls.Add(this.testCkBox);
this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck); this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck);
this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1); this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1);
this.splitContainer1.Panel1.Controls.Add(this.productBatchSelect); this.splitContainer1.Panel1.Controls.Add(this.productBatchSelect);
@ -217,6 +219,30 @@
this.splitContainer1.SplitterDistance = 87; this.splitContainer1.SplitterDistance = 87;
this.splitContainer1.TabIndex = 1; this.splitContainer1.TabIndex = 1;
// //
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25)))));
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.White;
this.closeBtn.Location = new System.Drawing.Point(1109, 7);
this.closeBtn.Name = "closeBtn";
this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.closeBtn.Size = new System.Drawing.Size(111, 41);
this.closeBtn.TabIndex = 18;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = false;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// uWeightControl1
//
this.uWeightControl1.BackColor = System.Drawing.Color.Transparent;
this.uWeightControl1.Location = new System.Drawing.Point(12, 7);
this.uWeightControl1.Name = "uWeightControl1";
this.uWeightControl1.Size = new System.Drawing.Size(262, 74);
this.uWeightControl1.TabIndex = 17;
this.uWeightControl1.WeightFalg = null;
//
// barPrintCheck // barPrintCheck
// //
this.barPrintCheck.AutoSize = true; this.barPrintCheck.AutoSize = true;
@ -316,6 +342,21 @@
this.splitContainer2.SplitterDistance = 761; this.splitContainer2.SplitterDistance = 761;
this.splitContainer2.TabIndex = 0; this.splitContainer2.TabIndex = 0;
// //
// goodsSetBtn
//
this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.goodsSetBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F);
this.goodsSetBtn.ForeColor = System.Drawing.Color.White;
this.goodsSetBtn.Location = new System.Drawing.Point(645, 3);
this.goodsSetBtn.Name = "goodsSetBtn";
this.goodsSetBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.goodsSetBtn.Size = new System.Drawing.Size(111, 62);
this.goodsSetBtn.TabIndex = 19;
this.goodsSetBtn.Text = "产品设置";
this.goodsSetBtn.UseVisualStyleBackColor = false;
this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click);
//
// flowLayoutPanel2 // flowLayoutPanel2
// //
this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -338,6 +379,20 @@
this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70); this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70);
this.flowLayoutPanel1.TabIndex = 22; this.flowLayoutPanel1.TabIndex = 22;
// //
// rePrintBtn
//
this.rePrintBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222)))));
this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F);
this.rePrintBtn.ForeColor = System.Drawing.Color.White;
this.rePrintBtn.Location = new System.Drawing.Point(338, 129);
this.rePrintBtn.Name = "rePrintBtn";
this.rePrintBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.rePrintBtn.Size = new System.Drawing.Size(111, 41);
this.rePrintBtn.TabIndex = 22;
this.rePrintBtn.Text = "补打";
this.rePrintBtn.UseVisualStyleBackColor = false;
this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click);
//
// groupBox1 // groupBox1
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -357,15 +412,15 @@
this.historyDataGrid.AllowUserToDeleteRows = false; this.historyDataGrid.AllowUserToDeleteRows = false;
this.historyDataGrid.AllowUserToResizeColumns = false; this.historyDataGrid.AllowUserToResizeColumns = false;
this.historyDataGrid.AllowUserToResizeRows = false; this.historyDataGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle27;
this.historyDataGrid.BackgroundColor = System.Drawing.Color.White; this.historyDataGrid.BackgroundColor = System.Drawing.Color.White;
this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle28.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle28.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28;
this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_ID, this.H_ID,
@ -379,9 +434,9 @@
this.historyDataGrid.Name = "historyDataGrid"; this.historyDataGrid.Name = "historyDataGrid";
this.historyDataGrid.ReadOnly = true; this.historyDataGrid.ReadOnly = true;
this.historyDataGrid.RowHeadersVisible = false; this.historyDataGrid.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.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle30.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle30.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle30;
this.historyDataGrid.RowTemplate.Height = 23; this.historyDataGrid.RowTemplate.Height = 23;
this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.historyDataGrid.Size = new System.Drawing.Size(437, 308); this.historyDataGrid.Size = new System.Drawing.Size(437, 308);
@ -422,64 +477,22 @@
// H_Weight // H_Weight
// //
this.H_Weight.DataPropertyName = "Weight"; this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle9.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle29.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle29;
this.H_Weight.HeaderText = "重量"; this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight"; this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true; this.H_Weight.ReadOnly = true;
// //
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25)))));
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.White;
this.closeBtn.Location = new System.Drawing.Point(1109, 7);
this.closeBtn.Name = "closeBtn";
this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.closeBtn.Size = new System.Drawing.Size(111, 41);
this.closeBtn.TabIndex = 18;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = false;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// uWeightControl1
//
this.uWeightControl1.BackColor = System.Drawing.Color.Transparent;
this.uWeightControl1.Location = new System.Drawing.Point(12, 7);
this.uWeightControl1.Name = "uWeightControl1";
this.uWeightControl1.Size = new System.Drawing.Size(262, 74);
this.uWeightControl1.TabIndex = 17;
this.uWeightControl1.WeightFalg = null;
//
// goodsSetBtn
//
this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.goodsSetBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F);
this.goodsSetBtn.ForeColor = System.Drawing.Color.White;
this.goodsSetBtn.Location = new System.Drawing.Point(645, 3);
this.goodsSetBtn.Name = "goodsSetBtn";
this.goodsSetBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.goodsSetBtn.Size = new System.Drawing.Size(111, 62);
this.goodsSetBtn.TabIndex = 19;
this.goodsSetBtn.Text = "产品设置";
this.goodsSetBtn.UseVisualStyleBackColor = false;
this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click);
//
// rePrintBtn
// testCkBox
// //
this.rePrintBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222)))));
this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F);
this.rePrintBtn.ForeColor = System.Drawing.Color.White;
this.rePrintBtn.Location = new System.Drawing.Point(338, 129);
this.rePrintBtn.Name = "rePrintBtn";
this.rePrintBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.rePrintBtn.Size = new System.Drawing.Size(111, 41);
this.rePrintBtn.TabIndex = 22;
this.rePrintBtn.Text = "补打";
this.rePrintBtn.UseVisualStyleBackColor = false;
this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click);
this.testCkBox.AutoSize = true;
this.testCkBox.Font = new System.Drawing.Font("宋体", 15F);
this.testCkBox.Location = new System.Drawing.Point(648, 13);
this.testCkBox.Name = "testCkBox";
this.testCkBox.Size = new System.Drawing.Size(108, 24);
this.testCkBox.TabIndex = 16;
this.testCkBox.Text = "生产测试";
this.testCkBox.UseVisualStyleBackColor = true;
// //
// SegmentProductionAutoForm // SegmentProductionAutoForm
// //
@ -542,5 +555,6 @@
private Controls.ColorButton rePrintBtn; private Controls.ColorButton rePrintBtn;
private Controls.ColorButton closeBtn; private Controls.ColorButton closeBtn;
private Controls.ColorButton goodsSetBtn; private Controls.ColorButton goodsSetBtn;
private System.Windows.Forms.CheckBox testCkBox;
} }
} }

+ 15
- 10
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs View File

@ -96,7 +96,7 @@ namespace ButcherFactory.SegmentProductionAuto_
{ {
BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.); BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.);
BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>(); BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>();
BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
BaseInfoSyncRpc.SyncProductBatch(1);
} }
productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date"); productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date");
var config = XmlUtil.DeserializeFromFile<NotAuto.SegmentProductionFormConfig>(); var config = XmlUtil.DeserializeFromFile<NotAuto.SegmentProductionFormConfig>();
@ -149,21 +149,26 @@ namespace ButcherFactory.SegmentProductionAuto_
throw new Exception(string.Format("重量必须在{0:#0.######}-{1:#0.######}之间", detail.StandardWeightLow, detail.StandardWeightUp)); throw new Exception(string.Format("重量必须在{0:#0.######}-{1:#0.######}之间", detail.StandardWeightLow, detail.StandardWeightUp));
weight = detail.StandardWeight.Value; weight = detail.StandardWeight.Value;
} }
var entity = SegmentProductionBL.InsertAndSetGroupID(detail.Goods_ID, weight, workUnitID, batchID.Value, batchDate.Value);
var entity = SegmentProductionBL.InsertAndSetGroupID(detail.Goods_ID, weight, workUnitID, batchID.Value, batchDate.Value,testCkBox.Checked);
entity.Goods_Code = detail.Goods_Code; entity.Goods_Code = detail.Goods_Code;
entity.Goods_Name = detail.Goods_Name; entity.Goods_Name = detail.Goods_Name;
entity.Goods_Spec = detail.Goods_Spec; entity.Goods_Spec = detail.Goods_Spec;
GoodsLabel.Text = entity.Goods_Name; GoodsLabel.Text = entity.Goods_Name;
historyList.Insert(0, entity);
if (historyList.Count > 100)
historyList.RemoveAt(100);
historyDataGrid.FirstDisplayedScrollingRowIndex = 0;
historyDataGrid.Refresh();
if (!testCkBox.Checked)
{
historyList.Insert(0, entity);
if (historyList.Count > 100)
historyList.RemoveAt(100);
historyDataGrid.FirstDisplayedScrollingRowIndex = 0;
historyDataGrid.Refresh();
}
if (barPrintCheck.Checked) if (barPrintCheck.Checked)
NotAuto.SegmentProductionPrint.Print(entity, batchDate); NotAuto.SegmentProductionPrint.Print(entity, batchDate);
taskDataGrid.DataSource= SegmentProductionBL.GetProductTask(batchDate ?? DateTime.Today, entity);
taskDataGrid.Refresh();
if (!testCkBox.Checked)
{
taskDataGrid.DataSource = SegmentProductionBL.GetProductTask(batchDate ?? DateTime.Today, entity);
taskDataGrid.Refresh();
}
} }
void BindGrid() void BindGrid()


+ 1
- 1
ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs View File

@ -96,7 +96,7 @@ namespace ButcherFactory.SegmentProduction_
{ {
BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.); BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.);
BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>(); BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>();
BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
BaseInfoSyncRpc.SyncProductBatch(1);
} }
productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date"); productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date");
var config = XmlUtil.DeserializeFromFile<SegmentProductionFormConfig>(); var config = XmlUtil.DeserializeFromFile<SegmentProductionFormConfig>();


Loading…
Cancel
Save