From d108f648b7ea398a3400db0871415bc63e7fe39c Mon Sep 17 00:00:00 2001 From: luanhui <1029149336@qq.com> Date: Wed, 15 Nov 2017 17:08:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/BO.csproj | 1 - Distribution/Distribution.csproj | 7 +- Distribution/DistributionForm.Designer.cs | 76 ++++++- Distribution/DistributionForm.cs | 25 ++- Distribution/DistributionForm.resx | 15 ++ .../{LocalSaleOutStore.cs => SaleOutStore.cs} | 0 .../SaleOutStoreRpc.cs | 47 +++- .../SegmentationWeightForm.Designer.cs | 206 +++++++++--------- 8 files changed, 252 insertions(+), 125 deletions(-) rename Distribution/LocalBo/{LocalSaleOutStore.cs => SaleOutStore.cs} (100%) rename {BO/Utils/BillRpc => Distribution}/SaleOutStoreRpc.cs (62%) diff --git a/BO/BO.csproj b/BO/BO.csproj index c526abb..aa6efc8 100644 --- a/BO/BO.csproj +++ b/BO/BO.csproj @@ -103,7 +103,6 @@ - diff --git a/Distribution/Distribution.csproj b/Distribution/Distribution.csproj index 68d4036..4700449 100644 --- a/Distribution/Distribution.csproj +++ b/Distribution/Distribution.csproj @@ -39,6 +39,10 @@ False C:\Users\luanhui\source\repos\WinFormPrintTest\WinFormPrintTest\bin\Debug\Forks.Utils.dll + + False + ..\..\..\tsref\Debug\Newtonsoft.Json.dll + @@ -61,8 +65,9 @@ DistributionForm.cs - + + diff --git a/Distribution/DistributionForm.Designer.cs b/Distribution/DistributionForm.Designer.cs index 812dd6d..a7d39f0 100644 --- a/Distribution/DistributionForm.Designer.cs +++ b/Distribution/DistributionForm.Designer.cs @@ -80,6 +80,11 @@ this.label8 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.outstore单号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.outstore客户名称 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.outstore发货时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.outstore状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.outstore送货线路 = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -116,7 +121,7 @@ // this.splitContainer1.Panel2.Controls.Add(this.flowLayoutPanel1); this.splitContainer1.Size = new System.Drawing.Size(1347, 728); - this.splitContainer1.SplitterDistance = 1076; + this.splitContainer1.SplitterDistance = 1080; this.splitContainer1.SplitterWidth = 2; this.splitContainer1.TabIndex = 0; // @@ -144,7 +149,7 @@ this.splitContainer2.Panel2.Controls.Add(this.groupBox2); this.splitContainer2.Panel2.Controls.Add(this.groupBox1); this.splitContainer2.Panel2.Controls.Add(this.panel5); - this.splitContainer2.Size = new System.Drawing.Size(1076, 728); + this.splitContainer2.Size = new System.Drawing.Size(1080, 728); this.splitContainer2.SplitterDistance = 478; this.splitContainer2.SplitterWidth = 2; this.splitContainer2.TabIndex = 0; @@ -214,6 +219,12 @@ dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.dataGridViewSaleOutStore.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dataGridViewSaleOutStore.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridViewSaleOutStore.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.outstore单号, + this.outstore客户名称, + this.outstore发货时间, + this.outstore状态, + this.outstore送货线路}); this.dataGridViewSaleOutStore.Location = new System.Drawing.Point(4, 241); this.dataGridViewSaleOutStore.MultiSelect = false; this.dataGridViewSaleOutStore.Name = "dataGridViewSaleOutStore"; @@ -245,7 +256,6 @@ // // cbxSelectCustomer // - this.cbxSelectCustomer.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.cbxSelectCustomer.EnableTopItem = true; this.cbxSelectCustomer.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -258,7 +268,6 @@ // // cbxSelectXianLu // - this.cbxSelectXianLu.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.cbxSelectXianLu.EnableTopItem = true; this.cbxSelectXianLu.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -462,14 +471,18 @@ // // panel6 // + this.panel6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel6.Location = new System.Drawing.Point(1, 459); + this.panel6.Location = new System.Drawing.Point(3, 459); this.panel6.Name = "panel6"; - this.panel6.Size = new System.Drawing.Size(590, 49); + this.panel6.Size = new System.Drawing.Size(594, 49); this.panel6.TabIndex = 2; // // groupBox2 // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.groupBox2.Controls.Add(this.dataGridViewFaHuo); this.groupBox2.Location = new System.Drawing.Point(5, 514); this.groupBox2.Name = "groupBox2"; @@ -517,7 +530,7 @@ this.groupBox1.Controls.Add(this.dataGridViewDingHuo); this.groupBox1.Location = new System.Drawing.Point(4, 143); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(589, 310); + this.groupBox1.Size = new System.Drawing.Size(597, 310); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; this.groupBox1.Text = "订货明细"; @@ -551,7 +564,7 @@ this.dataGridViewDingHuo.RowsDefaultCellStyle = dataGridViewCellStyle9; this.dataGridViewDingHuo.RowTemplate.Height = 23; this.dataGridViewDingHuo.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridViewDingHuo.Size = new System.Drawing.Size(583, 290); + this.dataGridViewDingHuo.Size = new System.Drawing.Size(591, 290); this.dataGridViewDingHuo.TabIndex = 0; // // panel5 @@ -570,7 +583,7 @@ this.panel5.Controls.Add(this.label4); this.panel5.Location = new System.Drawing.Point(4, 4); this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(590, 132); + this.panel5.Size = new System.Drawing.Size(598, 132); this.panel5.TabIndex = 0; // // linkLabel2 @@ -673,9 +686,47 @@ this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(267, 726); + this.flowLayoutPanel1.Size = new System.Drawing.Size(263, 726); this.flowLayoutPanel1.TabIndex = 0; // + // outstore单号 + // + this.outstore单号.DataPropertyName = "SaleOutStore_ID"; + this.outstore单号.FillWeight = 80F; + this.outstore单号.HeaderText = "单号"; + this.outstore单号.Name = "outstore单号"; + this.outstore单号.ReadOnly = true; + this.outstore单号.Width = 80; + // + // outstore客户名称 + // + this.outstore客户名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.outstore客户名称.DataPropertyName = "Customer_Name"; + this.outstore客户名称.HeaderText = "客户名称"; + this.outstore客户名称.Name = "outstore客户名称"; + this.outstore客户名称.ReadOnly = true; + // + // outstore发货时间 + // + this.outstore发货时间.DataPropertyName = "LoadTime"; + this.outstore发货时间.HeaderText = "发货时间"; + this.outstore发货时间.Name = "outstore发货时间"; + this.outstore发货时间.ReadOnly = true; + // + // outstore状态 + // + this.outstore状态.DataPropertyName = "BillState"; + this.outstore状态.HeaderText = "状态"; + this.outstore状态.Name = "outstore状态"; + this.outstore状态.ReadOnly = true; + // + // outstore送货线路 + // + this.outstore送货线路.DataPropertyName = "DeliverGoodsLine_Name"; + this.outstore送货线路.HeaderText = "送货线路"; + this.outstore送货线路.Name = "outstore送货线路"; + this.outstore送货线路.ReadOnly = true; + // // DistributionForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -760,5 +811,10 @@ private BWP.WinFormControl.UDataGridView dataGridViewFaHuo; private BWP.WinFormControl.UDataGridView dataGridViewDingHuo; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.DataGridViewTextBoxColumn outstore单号; + private System.Windows.Forms.DataGridViewTextBoxColumn outstore客户名称; + private System.Windows.Forms.DataGridViewTextBoxColumn outstore发货时间; + private System.Windows.Forms.DataGridViewTextBoxColumn outstore状态; + private System.Windows.Forms.DataGridViewTextBoxColumn outstore送货线路; } } \ No newline at end of file diff --git a/Distribution/DistributionForm.cs b/Distribution/DistributionForm.cs index 640ae7b..0e2c26f 100644 --- a/Distribution/DistributionForm.cs +++ b/Distribution/DistributionForm.cs @@ -25,9 +25,11 @@ namespace Distribution private bool mIsCustomerSynced, mIsDeliverGoodsLineSynced; + private bool mIsFirstSearch = true; private BackgroundWorker mBackgroundWorkerSyncBaseInfo; private BindingList mSaleOutStoreList; + private BindingList mSaleOutStoreAllList; public DistributionForm() { InitializeComponent(); @@ -44,19 +46,20 @@ namespace Distribution mBackgroundWorkerSyncBaseInfo.RunWorkerCompleted += backgroundWorkerSyncBaseInfo_RunWorkerCompleted; mBackgroundWorkerSyncBaseInfo.RunWorkerAsync(); + } private void backgroundWorkerSyncBaseInfo_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { mIsCustomerSynced = true; mIsDeliverGoodsLineSynced = true; - } + } private void backgroundWorkerSyncBaseInfo_DoWork(object sender, DoWorkEventArgs e) { CustomerRpc.SyncList(); DeliverGoodsLineRpc.SyncList(); - } + } private void DistributionForm_Load(object sender, EventArgs e) { @@ -65,9 +68,23 @@ namespace Distribution private void btnSearch_Click(object sender, EventArgs e) { - + mSaleOutStoreAllList = SaleOutStoreRpc.SyncList(dateInput.Date.Value, cbxSelectCustomer.Text, cbxSelectXianLu.Text, "", mIsFirstSearch); + SetSaleOutStoreList(); + dataGridViewSaleOutStore.DataSource = mSaleOutStoreList; + mIsFirstSearch = false; } - + void SetSaleOutStoreList() + { + mSaleOutStoreList=new BindingList(); + foreach (var grouping in mSaleOutStoreAllList.GroupBy(x=>x.SaleOutStore_ID)) + { + var fd = grouping.FirstOrDefault(); + if (fd != null) + { + mSaleOutStoreList.Add(fd); + } + } + } } } diff --git a/Distribution/DistributionForm.resx b/Distribution/DistributionForm.resx index 1af7de1..d88aaaf 100644 --- a/Distribution/DistributionForm.resx +++ b/Distribution/DistributionForm.resx @@ -117,4 +117,19 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + + + True + + + True + + + True + \ No newline at end of file diff --git a/Distribution/LocalBo/LocalSaleOutStore.cs b/Distribution/LocalBo/SaleOutStore.cs similarity index 100% rename from Distribution/LocalBo/LocalSaleOutStore.cs rename to Distribution/LocalBo/SaleOutStore.cs diff --git a/BO/Utils/BillRpc/SaleOutStoreRpc.cs b/Distribution/SaleOutStoreRpc.cs similarity index 62% rename from BO/Utils/BillRpc/SaleOutStoreRpc.cs rename to Distribution/SaleOutStoreRpc.cs index 5b8e3bf..3276559 100644 --- a/BO/Utils/BillRpc/SaleOutStoreRpc.cs +++ b/Distribution/SaleOutStoreRpc.cs @@ -2,18 +2,19 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using BWP.B3ClientService.BO; +using BO; +using BO.Utils; +using Distribution.LocalBo; +using Forks.EnterpriseServices.DomainObjects2; using Forks.EnterpriseServices.DomainObjects2.DQuery; using Forks.JsonRpc.Client; using Newtonsoft.Json; -using Customer = BO.BO.BaseInfo.Customer; -namespace BO.Utils.BillRpc +namespace Distribution { public class SaleOutStoreRpc { + //已天为单位更新 public static BindingList SyncList(DateTime date, string customerName,string sendLineName,string billstate,bool updateLocalDb) { var resList=new BindingList(); @@ -23,7 +24,8 @@ namespace BO.Utils.BillRpc var list = JsonConvert.DeserializeObject>(json); if (updateLocalDb) { -// AddLocalSaleOutStore(list); + //销售出库本地只添加,不做更新操作 特别是已配货数量这块 已本地为主 + AddLocalSaleOutStore(list); } foreach (SaleOutStore store in list) { @@ -59,5 +61,38 @@ namespace BO.Utils.BillRpc } return resList; } + + private static void AddLocalSaleOutStore(List list) + { + if (list.Count == 0) + { + return; + } + using (var session=LocalDmoSession.New()) + { + foreach (SaleOutStore store in list) + { + if (!IsExist(session, store.SaleOutStoreDetail_ID)) + { + session.Insert(store); + } + } + session.Commit(); + } + } + + static bool IsExist(IDmoSession session, long detailid) + { + var query=new DQueryDom(new JoinAlias(typeof(SaleOutStore))); + query.Where.Conditions.Add(DQCondition.EQ("SaleOutStoreDetail_ID",detailid)); + query.Columns.Add(DQSelectColumn.Field("SaleOutStoreDetail_ID")); + var res = session.ExecuteScalar(query); + if (res is DBNull || res == null) + { + return false; + } + return true; + } + } } diff --git a/SegmentationWeight/SegmentationWeightForm.Designer.cs b/SegmentationWeight/SegmentationWeightForm.Designer.cs index bddcb3a..a6d61c4 100644 --- a/SegmentationWeight/SegmentationWeightForm.Designer.cs +++ b/SegmentationWeight/SegmentationWeightForm.Designer.cs @@ -28,9 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.panel1 = new System.Windows.Forms.Panel(); this.btnGoodsSet = new System.Windows.Forms.Button(); @@ -41,12 +41,6 @@ this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.flpGoods = new System.Windows.Forms.FlowLayoutPanel(); this.flpClass = new System.Windows.Forms.FlowLayoutPanel(); - this.uDataGridView1 = new BWP.WinFormControl.UDataGridView(); - this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.条码 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.产品 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.净重 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.毛重 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); @@ -54,6 +48,12 @@ this.lblGoodsName = new System.Windows.Forms.Label(); this.lblNumber = new System.Windows.Forms.Label(); this.lblWeight = new System.Windows.Forms.Label(); + this.uDataGridView1 = new BWP.WinFormControl.UDataGridView(); + this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.条码 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.产品 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.净重 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.毛重 = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -64,8 +64,8 @@ this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit(); this.tableLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit(); this.SuspendLayout(); // // splitContainer1 @@ -198,86 +198,6 @@ this.flpClass.Size = new System.Drawing.Size(547, 76); this.flpClass.TabIndex = 0; // - // uDataGridView1 - // - this.uDataGridView1.AllowUserToAddRows = false; - this.uDataGridView1.AllowUserToDeleteRows = false; - this.uDataGridView1.AllowUserToResizeColumns = false; - this.uDataGridView1.AllowUserToResizeRows = false; - dataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle19; - this.uDataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.uDataGridView1.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle20; - this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.序号, - this.条码, - this.产品, - this.净重, - this.毛重}); - this.uDataGridView1.Location = new System.Drawing.Point(3, 108); - this.uDataGridView1.MultiSelect = false; - this.uDataGridView1.Name = "uDataGridView1"; - this.uDataGridView1.ReadOnly = true; - this.uDataGridView1.RowHeadersVisible = false; - dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle21.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle21; - this.uDataGridView1.RowTemplate.Height = 23; - this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.uDataGridView1.Size = new System.Drawing.Size(483, 374); - this.uDataGridView1.TabIndex = 1; - // - // 序号 - // - this.序号.DataPropertyName = "ID"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Width = 80; - // - // 条码 - // - this.条码.DataPropertyName = "BarCode"; - this.条码.HeaderText = "条码"; - this.条码.Name = "条码"; - this.条码.ReadOnly = true; - // - // 产品 - // - this.产品.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.产品.DataPropertyName = "Goods_Name"; - this.产品.HeaderText = "产品"; - this.产品.MinimumWidth = 100; - this.产品.Name = "产品"; - this.产品.ReadOnly = true; - // - // 净重 - // - this.净重.DataPropertyName = "JingWeight"; - this.净重.HeaderText = "净重"; - this.净重.Name = "净重"; - this.净重.ReadOnly = true; - this.净重.Width = 80; - // - // 毛重 - // - this.毛重.DataPropertyName = "MaoWeight"; - this.毛重.HeaderText = "毛重"; - this.毛重.Name = "毛重"; - this.毛重.ReadOnly = true; - this.毛重.Width = 80; - // // tableLayoutPanel1 // this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -286,7 +206,7 @@ this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 65.90909F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 34.09091F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 88F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 96F)); this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); this.tableLayoutPanel1.Controls.Add(this.label2, 1, 0); this.tableLayoutPanel1.Controls.Add(this.label3, 2, 0); @@ -298,7 +218,7 @@ this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 53.57143F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 46.42857F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(479, 98); + this.tableLayoutPanel1.Size = new System.Drawing.Size(482, 98); this.tableLayoutPanel1.TabIndex = 0; // // label1 @@ -308,7 +228,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.label1.Location = new System.Drawing.Point(4, 1); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(249, 50); + this.label1.Size = new System.Drawing.Size(245, 50); this.label1.TabIndex = 0; this.label1.Text = "产品"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -318,9 +238,9 @@ this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.label2.Location = new System.Drawing.Point(260, 1); + this.label2.Location = new System.Drawing.Point(256, 1); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(125, 50); + this.label2.Size = new System.Drawing.Size(124, 50); this.label2.TabIndex = 0; this.label2.Text = "数量"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -330,9 +250,9 @@ this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.label3.Location = new System.Drawing.Point(392, 1); + this.label3.Location = new System.Drawing.Point(387, 1); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(83, 50); + this.label3.Size = new System.Drawing.Size(91, 50); this.label3.TabIndex = 0; this.label3.Text = "重量"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -344,7 +264,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.lblGoodsName.Location = new System.Drawing.Point(4, 52); this.lblGoodsName.Name = "lblGoodsName"; - this.lblGoodsName.Size = new System.Drawing.Size(249, 45); + this.lblGoodsName.Size = new System.Drawing.Size(245, 45); this.lblGoodsName.TabIndex = 0; this.lblGoodsName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // @@ -353,9 +273,9 @@ this.lblNumber.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.lblNumber.Location = new System.Drawing.Point(260, 52); + this.lblNumber.Location = new System.Drawing.Point(256, 52); this.lblNumber.Name = "lblNumber"; - this.lblNumber.Size = new System.Drawing.Size(125, 45); + this.lblNumber.Size = new System.Drawing.Size(124, 45); this.lblNumber.TabIndex = 0; this.lblNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // @@ -364,12 +284,92 @@ this.lblWeight.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.lblWeight.Location = new System.Drawing.Point(392, 52); + this.lblWeight.Location = new System.Drawing.Point(387, 52); this.lblWeight.Name = "lblWeight"; - this.lblWeight.Size = new System.Drawing.Size(83, 45); + this.lblWeight.Size = new System.Drawing.Size(91, 45); this.lblWeight.TabIndex = 0; this.lblWeight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // + // uDataGridView1 + // + this.uDataGridView1.AllowUserToAddRows = false; + this.uDataGridView1.AllowUserToDeleteRows = false; + this.uDataGridView1.AllowUserToResizeColumns = false; + this.uDataGridView1.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.uDataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.uDataGridView1.BackgroundColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.序号, + this.条码, + this.产品, + this.净重, + this.毛重}); + this.uDataGridView1.Location = new System.Drawing.Point(3, 108); + this.uDataGridView1.MultiSelect = false; + this.uDataGridView1.Name = "uDataGridView1"; + this.uDataGridView1.ReadOnly = true; + this.uDataGridView1.RowHeadersVisible = false; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle3; + this.uDataGridView1.RowTemplate.Height = 23; + this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.uDataGridView1.Size = new System.Drawing.Size(486, 374); + this.uDataGridView1.TabIndex = 1; + // + // 序号 + // + this.序号.DataPropertyName = "ID"; + this.序号.HeaderText = "序号"; + this.序号.Name = "序号"; + this.序号.ReadOnly = true; + this.序号.Width = 80; + // + // 条码 + // + this.条码.DataPropertyName = "BarCode"; + this.条码.HeaderText = "条码"; + this.条码.Name = "条码"; + this.条码.ReadOnly = true; + // + // 产品 + // + this.产品.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.产品.DataPropertyName = "Goods_Name"; + this.产品.HeaderText = "产品"; + this.产品.MinimumWidth = 100; + this.产品.Name = "产品"; + this.产品.ReadOnly = true; + // + // 净重 + // + this.净重.DataPropertyName = "JingWeight"; + this.净重.HeaderText = "净重"; + this.净重.Name = "净重"; + this.净重.ReadOnly = true; + this.净重.Width = 80; + // + // 毛重 + // + this.毛重.DataPropertyName = "MaoWeight"; + this.毛重.HeaderText = "毛重"; + this.毛重.Name = "毛重"; + this.毛重.ReadOnly = true; + this.毛重.Width = 80; + // // SegmentationWeightForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -394,8 +394,8 @@ this.splitContainer2.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit(); this.tableLayoutPanel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit(); this.ResumeLayout(false); }