From d65cdfe17a1d83d17c92affccacefdfbef5cc799 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Sat, 7 Jul 2018 15:23:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A9=E4=B8=80=E4=BD=93=E6=9C=BA?= =?UTF-8?q?=EF=BC=8C=E4=BB=A5=E5=8F=8A=E5=88=86=E5=89=B2=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ButcherFactory.BO/Bill/SegmentInStore.cs | 3 + ButcherFactory.BO/LocalBL/CarcassInStoreBL.cs | 11 + ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs | 39 ++ .../ButcherFactory.Form.csproj | 9 + .../CarcassInStoreForm.Designer.cs | 31 +- .../CarcassInStore_/CarcassInStoreForm.cs | 12 + .../CarcassInStore_/CarcassInStoreForm.resx | 8 + .../InStoreSummaryView.Designer.cs | 180 +++++++ .../SegmentInStore_/InStoreSummaryView.cs | 36 ++ .../SegmentInStore_/InStoreSummaryView.resx | 129 +++++ .../SegmentInStoreForm.Designer.cs | 494 +++++++++--------- .../SegmentInStore_/SegmentInStoreForm.cs | 5 + .../ButcherFactorySolution.vdproj | 26 + SelfHelpClient/BL/WeightBillBL.cs | 11 + SelfHelpClient/BO/CarStandardConfig.cs | 17 + SelfHelpClient/BO/WashCarPrint.cs | 29 + SelfHelpClient/CarPaperPrint.html | 36 +- SelfHelpClient/MainForm.cs | 3 + SelfHelpClient/SelfHelpClient.csproj | 7 + SelfHelpClient/SelfHelpForm.Designer.cs | 3 + SelfHelpClient/SelfHelpForm.cs | 31 +- SelfHelpClient/Utils/XmlUtil.cs | 27 + SelfHelpClient/WeightForm.Designer.cs | 107 ++-- SelfHelpClient/WeightForm.cs | 9 +- 24 files changed, 959 insertions(+), 304 deletions(-) create mode 100644 ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.Designer.cs create mode 100644 ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.cs create mode 100644 ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.resx create mode 100644 SelfHelpClient/BO/CarStandardConfig.cs create mode 100644 SelfHelpClient/BO/WashCarPrint.cs create mode 100644 SelfHelpClient/Utils/XmlUtil.cs diff --git a/ButcherFactory.BO/Bill/SegmentInStore.cs b/ButcherFactory.BO/Bill/SegmentInStore.cs index ca02ca6..ffe091e 100644 --- a/ButcherFactory.BO/Bill/SegmentInStore.cs +++ b/ButcherFactory.BO/Bill/SegmentInStore.cs @@ -30,6 +30,9 @@ namespace ButcherFactory.BO public long? Store_ID { get; set; } + [NonDmoProperty] + public int? Number { get; set; } + public decimal? Weight { get; set; } public string Goods_Code { get; set; } diff --git a/ButcherFactory.BO/LocalBL/CarcassInStoreBL.cs b/ButcherFactory.BO/LocalBL/CarcassInStoreBL.cs index 367363f..cd23664 100644 --- a/ButcherFactory.BO/LocalBL/CarcassInStoreBL.cs +++ b/ButcherFactory.BO/LocalBL/CarcassInStoreBL.cs @@ -228,6 +228,17 @@ namespace ButcherFactory.BO.LocalBL update.Columns.Add(new DQUpdateColumn("Sync", true)); session.ExecuteNonQuery(update); } + + public static void DeleteUnSubmit(long id) + { + using (var session = DmoSession.New()) + { + var delete = new DQDeleteDom(typeof(CarcassInStore)); + delete.Where.Conditions.Add(DQCondition.EQ("ID", id)); + session.ExecuteNonQuery(delete); + session.Commit(); + } + } } class CarcassInStoreObj diff --git a/ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs b/ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs index 516715e..be45a51 100644 --- a/ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs @@ -283,6 +283,45 @@ namespace ButcherFactory.BO.LocalBL } } + public static BindingList GetInStoreSummary() + { + var query = new DQueryDom(new JoinAlias("_main", typeof(SegmentInStore))); + query.Columns.Add(DQSelectColumn.Field("Goods_Code")); + query.Columns.Add(DQSelectColumn.Field("Goods_Name")); + query.Columns.Add(DQSelectColumn.Field("Goods_Spec")); + query.Columns.Add(DQSelectColumn.Count()); + query.Columns.Add(DQSelectColumn.Sum("Weight")); + query.GroupBy.Expressions.Add(DQExpression.Field("Goods_Code")); + query.GroupBy.Expressions.Add(DQExpression.Field("Goods_Name")); + query.GroupBy.Expressions.Add(DQExpression.Field("Goods_Spec")); + + query.Where.Conditions.Add(DQCondition.EQ(DQExpression.Snippet("CAST([_main].[InStoreTime] AS DATE)"), DQExpression.Value(DateTime.Today))); + query.Where.Conditions.Add(DQCondition.EQ("Delete", false)); + + query.OrderBy.Expressions.Add(DQOrderByExpression.Create("Goods_Code")); + var list = new BindingList(); + using (var session = DmoSession.New()) + { + using (var reader = session.ExecuteReader(query)) + { + var idx = 1; + while (reader.Read()) + { + var entity = new SegmentInStore(); + entity.RowIndex = idx; + entity.Goods_Code = (string)reader[0]; + entity.Goods_Name = (string)reader[1]; + entity.Goods_Spec = (string)reader[2]; + entity.Number = Convert.ToInt32(reader[3]); + entity.Weight = (decimal?)reader[4]; + list.Add(entity); + idx++; + } + } + } + return list; + } + public static void UploadSegmentInstoreInfo() { try diff --git a/ButcherFactory.Form/ButcherFactory.Form.csproj b/ButcherFactory.Form/ButcherFactory.Form.csproj index 0bd2f69..048b8fa 100644 --- a/ButcherFactory.Form/ButcherFactory.Form.csproj +++ b/ButcherFactory.Form/ButcherFactory.Form.csproj @@ -128,6 +128,12 @@ CarcassTakeOutForm.cs + + Form + + + InStoreSummaryView.cs + Form @@ -197,6 +203,9 @@ WeightRecordDialog.cs + + InStoreSummaryView.cs + SegmentInStoreForm.cs diff --git a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs index f4afa37..40ccfb4 100644 --- a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs +++ b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.Designer.cs @@ -28,7 +28,6 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarcassInStoreForm)); 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(); @@ -39,6 +38,7 @@ 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarcassInStoreForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.noCodeBtn = new WinFormControl.UButton(); this.noWeightBtn = new WinFormControl.UButton(); @@ -70,6 +70,7 @@ this.U_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.uLabel3 = new WinFormControl.ULabel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.deleteSelectBtn = new WinFormControl.UButton(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -98,6 +99,7 @@ // splitContainer1.Panel1 // this.splitContainer1.Panel1.BackColor = System.Drawing.Color.Transparent; + this.splitContainer1.Panel1.Controls.Add(this.deleteSelectBtn); this.splitContainer1.Panel1.Controls.Add(this.noCodeBtn); this.splitContainer1.Panel1.Controls.Add(this.noWeightBtn); this.splitContainer1.Panel1.Controls.Add(this.closeBtn); @@ -128,7 +130,7 @@ this.noCodeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.noCodeBtn.Font = new System.Drawing.Font("宋体", 15F); this.noCodeBtn.ForeColor = System.Drawing.Color.Black; - this.noCodeBtn.Location = new System.Drawing.Point(646, 44); + this.noCodeBtn.Location = new System.Drawing.Point(646, 46); this.noCodeBtn.Name = "noCodeBtn"; this.noCodeBtn.PlaySound = false; this.noCodeBtn.SelfControlEnable = false; @@ -150,7 +152,7 @@ this.noWeightBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.noWeightBtn.Font = new System.Drawing.Font("宋体", 15F); this.noWeightBtn.ForeColor = System.Drawing.Color.Black; - this.noWeightBtn.Location = new System.Drawing.Point(358, 44); + this.noWeightBtn.Location = new System.Drawing.Point(358, 46); this.noWeightBtn.Name = "noWeightBtn"; this.noWeightBtn.PlaySound = false; this.noWeightBtn.SelfControlEnable = false; @@ -516,6 +518,28 @@ this.flowLayoutPanel1.Size = new System.Drawing.Size(662, 519); this.flowLayoutPanel1.TabIndex = 0; // + // deleteSelectBtn + // + this.deleteSelectBtn.AsClicked = false; + this.deleteSelectBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("deleteSelectBtn.BackgroundImage"))); + this.deleteSelectBtn.EnableGroup = false; + this.deleteSelectBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.deleteSelectBtn.FlatAppearance.BorderSize = 0; + this.deleteSelectBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.deleteSelectBtn.Font = new System.Drawing.Font("宋体", 15F); + this.deleteSelectBtn.ForeColor = System.Drawing.Color.Black; + this.deleteSelectBtn.Location = new System.Drawing.Point(507, 46); + this.deleteSelectBtn.Name = "deleteSelectBtn"; + this.deleteSelectBtn.PlaySound = false; + this.deleteSelectBtn.SelfControlEnable = false; + this.deleteSelectBtn.Size = new System.Drawing.Size(111, 34); + this.deleteSelectBtn.SoundType = WinFormControl.SoundType.Click; + this.deleteSelectBtn.TabIndex = 13; + this.deleteSelectBtn.Text = "删除选中"; + this.deleteSelectBtn.UseVisualStyleBackColor = true; + this.deleteSelectBtn.WithStataHode = false; + this.deleteSelectBtn.Click += new System.EventHandler(this.deleteSelectBtn_Click); + // // CarcassInStoreForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -580,6 +604,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn H_BeforeWeight; private System.Windows.Forms.DataGridViewTextBoxColumn H_Discont; private WinFormControl.UButton noCodeBtn; + private WinFormControl.UButton deleteSelectBtn; } diff --git a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs index 2508312..e53b808 100644 --- a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs +++ b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs @@ -305,6 +305,18 @@ namespace ButcherFactory.CarcassInStore_ else changeID = v; } + + private void deleteSelectBtn_Click(object sender, EventArgs e) + { + if (MessageBox.Show("确定删除选中记录?", "删除确认", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK) + return; + if (needSubmitGrid.CurrentRow == null) + return; + var id = (long)needSubmitGrid.CurrentRow.Cells["U_ID"].Value; + CarcassInStoreBL.DeleteUnSubmit(id); + needSubmitedList.Remove(needSubmitedList.First(x => x.ID == id)); + needSubmitGrid.Refresh(); + } } } diff --git a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.resx b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.resx index ac4c9b5..8950d6b 100644 --- a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.resx +++ b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.resx @@ -118,6 +118,14 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= + + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO diff --git a/ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.Designer.cs b/ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.Designer.cs new file mode 100644 index 0000000..91024f9 --- /dev/null +++ b/ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.Designer.cs @@ -0,0 +1,180 @@ +namespace ButcherFactory.SegmentInStore_ +{ + partial class InStoreSummaryView + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + this.inStoreGrid = new WinFormControl.UDataGridView(); + this.closeBtn = new WinFormControl.NButton(); + this.I_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_Goods_Code = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_Goods_Spec = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.I_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.inStoreGrid)).BeginInit(); + this.SuspendLayout(); + // + // inStoreGrid + // + this.inStoreGrid.AllowUserToAddRows = false; + this.inStoreGrid.AllowUserToDeleteRows = false; + this.inStoreGrid.AllowUserToResizeColumns = false; + this.inStoreGrid.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.inStoreGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.inStoreGrid.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.inStoreGrid.BackgroundColor = System.Drawing.Color.White; + this.inStoreGrid.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.inStoreGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.inStoreGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.inStoreGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.I_RowIndex, + this.I_Goods_Code, + this.I_Goods_Name, + this.I_Goods_Spec, + this.I_Number, + this.I_Weight}); + this.inStoreGrid.Location = new System.Drawing.Point(12, 53); + this.inStoreGrid.MultiSelect = false; + this.inStoreGrid.Name = "inStoreGrid"; + this.inStoreGrid.ReadOnly = true; + this.inStoreGrid.RowHeadersVisible = false; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.inStoreGrid.RowsDefaultCellStyle = dataGridViewCellStyle4; + this.inStoreGrid.RowTemplate.Height = 23; + this.inStoreGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.inStoreGrid.Size = new System.Drawing.Size(858, 539); + this.inStoreGrid.TabIndex = 10; + // + // 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)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.closeBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.ForeColor = System.Drawing.Color.White; + this.closeBtn.Location = new System.Drawing.Point(780, 2); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.PlaySound = false; + this.closeBtn.Size = new System.Drawing.Size(90, 45); + this.closeBtn.SoundType = WinFormControl.SoundType.Click; + this.closeBtn.TabIndex = 11; + this.closeBtn.Text = "关闭"; + this.closeBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.closeBtn.UseVisualStyleBackColor = false; + this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); + // + // I_RowIndex + // + this.I_RowIndex.DataPropertyName = "RowIndex"; + this.I_RowIndex.HeaderText = "序号"; + this.I_RowIndex.Name = "I_RowIndex"; + this.I_RowIndex.ReadOnly = true; + this.I_RowIndex.Width = 70; + // + // I_Goods_Code + // + this.I_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.I_Goods_Code.DataPropertyName = "Goods_Code"; + this.I_Goods_Code.FillWeight = 90F; + this.I_Goods_Code.HeaderText = "产品编号"; + this.I_Goods_Code.Name = "I_Goods_Code"; + this.I_Goods_Code.ReadOnly = true; + // + // I_Goods_Name + // + this.I_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.I_Goods_Name.DataPropertyName = "Goods_Name"; + this.I_Goods_Name.FillWeight = 150F; + this.I_Goods_Name.HeaderText = "产品名称"; + this.I_Goods_Name.Name = "I_Goods_Name"; + this.I_Goods_Name.ReadOnly = true; + // + // I_Goods_Spec + // + this.I_Goods_Spec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.I_Goods_Spec.DataPropertyName = "Spec"; + this.I_Goods_Spec.FillWeight = 90F; + this.I_Goods_Spec.HeaderText = "规格"; + this.I_Goods_Spec.Name = "I_Goods_Spec"; + this.I_Goods_Spec.ReadOnly = true; + // + // I_Number + // + this.I_Number.DataPropertyName = "Number"; + this.I_Number.HeaderText = "件数"; + this.I_Number.Name = "I_Number"; + this.I_Number.ReadOnly = true; + // + // I_Weight + // + this.I_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle3.Format = "#0.######"; + this.I_Weight.DefaultCellStyle = dataGridViewCellStyle3; + this.I_Weight.HeaderText = "重量"; + this.I_Weight.Name = "I_Weight"; + this.I_Weight.ReadOnly = true; + // + // InStoreSummaryView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(882, 604); + this.Controls.Add(this.closeBtn); + this.Controls.Add(this.inStoreGrid); + this.Name = "InStoreSummaryView"; + this.Text = "入库表"; + ((System.ComponentModel.ISupportInitialize)(this.inStoreGrid)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private WinFormControl.UDataGridView inStoreGrid; + private WinFormControl.NButton closeBtn; + private System.Windows.Forms.DataGridViewTextBoxColumn I_RowIndex; + private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Code; + private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Spec; + private System.Windows.Forms.DataGridViewTextBoxColumn I_Number; + private System.Windows.Forms.DataGridViewTextBoxColumn I_Weight; + } +} \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.cs b/ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.cs new file mode 100644 index 0000000..0726d62 --- /dev/null +++ b/ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.cs @@ -0,0 +1,36 @@ +using ButcherFactory.BO; +using ButcherFactory.BO.LocalBL; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ButcherFactory.SegmentInStore_ +{ + public partial class InStoreSummaryView : Form + { + BindingList list; + public InStoreSummaryView() + { + InitializeComponent(); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + list = SegmentInStoreBL.GetInStoreSummary(); + inStoreGrid.DataSource = list; + inStoreGrid.Refresh(); + } + + private void closeBtn_Click(object sender, EventArgs e) + { + this.Close(); + } + } +} diff --git a/ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.resx b/ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.resx new file mode 100644 index 0000000..623f4ba --- /dev/null +++ b/ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.Designer.cs b/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.Designer.cs index 7446ad9..ce22fc2 100644 --- a/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.Designer.cs +++ b/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.Designer.cs @@ -31,46 +31,29 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = 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 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(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = 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 dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); + this.inStoreViewBtn = new WinFormControl.NButton(); this.netStateWatch1 = new WinFormControl.NetStateWatch(); this.storeSelect = new System.Windows.Forms.ComboBox(); this.uLabel3 = new WinFormControl.ULabel(); this.uScanPanel1 = new WinFormControl.UScanPanel(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.inStoreGrid = new WinFormControl.UDataGridView(); - this.goodsNameLbl = new WinFormControl.ULabel(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.submitBtn = new WinFormControl.NButton(); - this.deleteBtn = new WinFormControl.NButton(); - this.backStoreGrid = new WinFormControl.UDataGridView(); - this.uLabel5 = new WinFormControl.ULabel(); - this.backBtn = new WinFormControl.NButton(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.refreshBtn = new WinFormControl.NButton(); - this.unInstoreGrid = new WinFormControl.UDataGridView(); - this.uLabel6 = new WinFormControl.ULabel(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.exceptionGrid = new WinFormControl.UDataGridView(); - this.E_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.E_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.E_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.E_ExceptionInfo = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.uLabel4 = new WinFormControl.ULabel(); this.I_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.I_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.I_ShortCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -79,6 +62,11 @@ this.I_Goods_Spec = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.I_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.I_ProductTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.goodsNameLbl = new WinFormControl.ULabel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.submitBtn = new WinFormControl.NButton(); + this.deleteBtn = new WinFormControl.NButton(); + this.backStoreGrid = new WinFormControl.UDataGridView(); this.B_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.B_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.B_ShortCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -87,6 +75,11 @@ this.B_Goods_Spec = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.B_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.B_ProductTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uLabel5 = new WinFormControl.ULabel(); + this.backBtn = new WinFormControl.NButton(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.refreshBtn = new WinFormControl.NButton(); + this.unInstoreGrid = new WinFormControl.UDataGridView(); this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_ShortCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -95,6 +88,14 @@ this.U_Goods_Spec = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.U_ProductTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uLabel6 = new WinFormControl.ULabel(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.exceptionGrid = new WinFormControl.UDataGridView(); + this.E_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.E_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.E_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.E_ExceptionInfo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uLabel4 = new WinFormControl.ULabel(); this.panel1.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.inStoreGrid)).BeginInit(); @@ -108,6 +109,7 @@ // // panel1 // + this.panel1.Controls.Add(this.inStoreViewBtn); this.panel1.Controls.Add(this.netStateWatch1); this.panel1.Controls.Add(this.storeSelect); this.panel1.Controls.Add(this.uLabel3); @@ -117,6 +119,23 @@ this.panel1.Size = new System.Drawing.Size(611, 140); this.panel1.TabIndex = 0; // + // inStoreViewBtn + // + this.inStoreViewBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.inStoreViewBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.inStoreViewBtn.Font = new System.Drawing.Font("宋体", 12F); + this.inStoreViewBtn.ForeColor = System.Drawing.Color.White; + this.inStoreViewBtn.Location = new System.Drawing.Point(323, 76); + this.inStoreViewBtn.Name = "inStoreViewBtn"; + this.inStoreViewBtn.PlaySound = false; + this.inStoreViewBtn.Size = new System.Drawing.Size(95, 45); + this.inStoreViewBtn.SoundType = WinFormControl.SoundType.Click; + this.inStoreViewBtn.TabIndex = 19; + this.inStoreViewBtn.Text = "入库表"; + this.inStoreViewBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); + this.inStoreViewBtn.UseVisualStyleBackColor = false; + this.inStoreViewBtn.Click += new System.EventHandler(this.inStoreViewBtn_Click); + // // netStateWatch1 // this.netStateWatch1.BackColor = System.Drawing.Color.Transparent; @@ -207,6 +226,77 @@ this.inStoreGrid.Size = new System.Drawing.Size(595, 371); this.inStoreGrid.TabIndex = 9; // + // I_ID + // + this.I_ID.DataPropertyName = "ID"; + this.I_ID.HeaderText = "ID"; + this.I_ID.Name = "I_ID"; + this.I_ID.ReadOnly = true; + this.I_ID.Visible = false; + // + // I_RowIndex + // + this.I_RowIndex.DataPropertyName = "RowIndex"; + this.I_RowIndex.HeaderText = "序号"; + this.I_RowIndex.Name = "I_RowIndex"; + this.I_RowIndex.ReadOnly = true; + this.I_RowIndex.Width = 65; + // + // I_ShortCode + // + this.I_ShortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.I_ShortCode.DataPropertyName = "ShortCode"; + this.I_ShortCode.HeaderText = "条码"; + this.I_ShortCode.Name = "I_ShortCode"; + this.I_ShortCode.ReadOnly = true; + this.I_ShortCode.Width = 60; + // + // I_Goods_Code + // + this.I_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.I_Goods_Code.DataPropertyName = "Goods_Code"; + this.I_Goods_Code.HeaderText = "产品编号"; + this.I_Goods_Code.Name = "I_Goods_Code"; + this.I_Goods_Code.ReadOnly = true; + // + // I_Goods_Name + // + this.I_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.I_Goods_Name.DataPropertyName = "Goods_Name"; + this.I_Goods_Name.HeaderText = "产品名称"; + this.I_Goods_Name.Name = "I_Goods_Name"; + this.I_Goods_Name.ReadOnly = true; + // + // I_Goods_Spec + // + this.I_Goods_Spec.DataPropertyName = "Spec"; + this.I_Goods_Spec.HeaderText = "规格"; + this.I_Goods_Spec.Name = "I_Goods_Spec"; + this.I_Goods_Spec.ReadOnly = true; + this.I_Goods_Spec.Width = 70; + // + // I_Weight + // + this.I_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle3.Format = "#0.######"; + this.I_Weight.DefaultCellStyle = dataGridViewCellStyle3; + this.I_Weight.HeaderText = "重量"; + this.I_Weight.Name = "I_Weight"; + this.I_Weight.ReadOnly = true; + this.I_Weight.Width = 70; + // + // I_ProductTime + // + this.I_ProductTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.I_ProductTime.DataPropertyName = "ProductTime"; + dataGridViewCellStyle4.Format = "T"; + dataGridViewCellStyle4.NullValue = null; + this.I_ProductTime.DefaultCellStyle = dataGridViewCellStyle4; + this.I_ProductTime.HeaderText = "生产时间"; + this.I_ProductTime.Name = "I_ProductTime"; + this.I_ProductTime.ReadOnly = true; + this.I_ProductTime.Width = 60; + // // goodsNameLbl // this.goodsNameLbl.AutoSize = true; @@ -306,6 +396,77 @@ this.backStoreGrid.Size = new System.Drawing.Size(649, 178); this.backStoreGrid.TabIndex = 8; // + // B_ID + // + this.B_ID.DataPropertyName = "ID"; + this.B_ID.HeaderText = "ID"; + this.B_ID.Name = "B_ID"; + this.B_ID.ReadOnly = true; + this.B_ID.Visible = false; + // + // B_RowIndex + // + this.B_RowIndex.DataPropertyName = "RowIndex"; + this.B_RowIndex.HeaderText = "序号"; + this.B_RowIndex.Name = "B_RowIndex"; + this.B_RowIndex.ReadOnly = true; + this.B_RowIndex.Width = 65; + // + // B_ShortCode + // + this.B_ShortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.B_ShortCode.DataPropertyName = "ShortCode"; + this.B_ShortCode.HeaderText = "条码"; + this.B_ShortCode.Name = "B_ShortCode"; + this.B_ShortCode.ReadOnly = true; + this.B_ShortCode.Width = 60; + // + // B_Goods_Code + // + this.B_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.B_Goods_Code.DataPropertyName = "Goods_Code"; + this.B_Goods_Code.HeaderText = "产品编号"; + this.B_Goods_Code.Name = "B_Goods_Code"; + this.B_Goods_Code.ReadOnly = true; + // + // B_Goods_Name + // + this.B_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.B_Goods_Name.DataPropertyName = "Goods_Name"; + this.B_Goods_Name.HeaderText = "产品名称"; + this.B_Goods_Name.Name = "B_Goods_Name"; + this.B_Goods_Name.ReadOnly = true; + // + // B_Goods_Spec + // + this.B_Goods_Spec.DataPropertyName = "Goods_Spec"; + this.B_Goods_Spec.HeaderText = "规格"; + this.B_Goods_Spec.Name = "B_Goods_Spec"; + this.B_Goods_Spec.ReadOnly = true; + this.B_Goods_Spec.Width = 70; + // + // B_Weight + // + this.B_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle8.Format = "#0.######"; + this.B_Weight.DefaultCellStyle = dataGridViewCellStyle8; + this.B_Weight.HeaderText = "重量"; + this.B_Weight.Name = "B_Weight"; + this.B_Weight.ReadOnly = true; + this.B_Weight.Width = 70; + // + // B_ProductTime + // + this.B_ProductTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.B_ProductTime.DataPropertyName = "ProductTime"; + dataGridViewCellStyle9.Format = "T"; + dataGridViewCellStyle9.NullValue = null; + this.B_ProductTime.DefaultCellStyle = dataGridViewCellStyle9; + this.B_ProductTime.HeaderText = "生产时间"; + this.B_ProductTime.Name = "B_ProductTime"; + this.B_ProductTime.ReadOnly = true; + this.B_ProductTime.Width = 60; + // // uLabel5 // this.uLabel5.AutoSize = true; @@ -406,6 +567,77 @@ this.unInstoreGrid.Size = new System.Drawing.Size(649, 109); this.unInstoreGrid.TabIndex = 9; // + // dataGridViewTextBoxColumn8 + // + this.dataGridViewTextBoxColumn8.DataPropertyName = "U_ID"; + this.dataGridViewTextBoxColumn8.HeaderText = "ID"; + this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; + this.dataGridViewTextBoxColumn8.ReadOnly = true; + this.dataGridViewTextBoxColumn8.Visible = false; + // + // U_RowIndex + // + this.U_RowIndex.DataPropertyName = "RowIndex"; + this.U_RowIndex.HeaderText = "序号"; + this.U_RowIndex.Name = "U_RowIndex"; + this.U_RowIndex.ReadOnly = true; + this.U_RowIndex.Width = 65; + // + // U_ShortCode + // + this.U_ShortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.U_ShortCode.DataPropertyName = "ShortCode"; + this.U_ShortCode.HeaderText = "条码"; + this.U_ShortCode.Name = "U_ShortCode"; + this.U_ShortCode.ReadOnly = true; + this.U_ShortCode.Width = 60; + // + // U_Goods_Code + // + this.U_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.U_Goods_Code.DataPropertyName = "Goods_Code"; + this.U_Goods_Code.HeaderText = "产品编号"; + this.U_Goods_Code.Name = "U_Goods_Code"; + this.U_Goods_Code.ReadOnly = true; + // + // U_Goods_Name + // + this.U_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.U_Goods_Name.DataPropertyName = "Goods_Name"; + this.U_Goods_Name.HeaderText = "产品名称"; + this.U_Goods_Name.Name = "U_Goods_Name"; + this.U_Goods_Name.ReadOnly = true; + // + // U_Goods_Spec + // + this.U_Goods_Spec.DataPropertyName = "Goods_Spec"; + this.U_Goods_Spec.HeaderText = "规格"; + this.U_Goods_Spec.Name = "U_Goods_Spec"; + this.U_Goods_Spec.ReadOnly = true; + this.U_Goods_Spec.Width = 70; + // + // U_Weight + // + this.U_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle13.Format = "#0.######"; + this.U_Weight.DefaultCellStyle = dataGridViewCellStyle13; + this.U_Weight.HeaderText = "重量"; + this.U_Weight.Name = "U_Weight"; + this.U_Weight.ReadOnly = true; + this.U_Weight.Width = 70; + // + // U_ProductTime + // + this.U_ProductTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.U_ProductTime.DataPropertyName = "ProductTime"; + dataGridViewCellStyle14.Format = "T"; + dataGridViewCellStyle14.NullValue = null; + this.U_ProductTime.DefaultCellStyle = dataGridViewCellStyle14; + this.U_ProductTime.HeaderText = "生产时间"; + this.U_ProductTime.Name = "U_ProductTime"; + this.U_ProductTime.ReadOnly = true; + this.U_ProductTime.Width = 60; + // // uLabel6 // this.uLabel6.AutoSize = true; @@ -508,219 +740,6 @@ this.uLabel4.TabIndex = 5; this.uLabel4.Text = "异常记录"; // - // I_ID - // - this.I_ID.DataPropertyName = "ID"; - this.I_ID.HeaderText = "ID"; - this.I_ID.Name = "I_ID"; - this.I_ID.ReadOnly = true; - this.I_ID.Visible = false; - // - // I_RowIndex - // - this.I_RowIndex.DataPropertyName = "RowIndex"; - this.I_RowIndex.HeaderText = "序号"; - this.I_RowIndex.Name = "I_RowIndex"; - this.I_RowIndex.ReadOnly = true; - this.I_RowIndex.Width = 65; - // - // I_ShortCode - // - this.I_ShortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.I_ShortCode.DataPropertyName = "ShortCode"; - this.I_ShortCode.HeaderText = "条码"; - this.I_ShortCode.Name = "I_ShortCode"; - this.I_ShortCode.ReadOnly = true; - this.I_ShortCode.Width = 65; - // - // I_Goods_Code - // - this.I_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.I_Goods_Code.DataPropertyName = "Goods_Code"; - this.I_Goods_Code.HeaderText = "产品编号"; - this.I_Goods_Code.Name = "I_Goods_Code"; - this.I_Goods_Code.ReadOnly = true; - // - // I_Goods_Name - // - this.I_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.I_Goods_Name.DataPropertyName = "Goods_Name"; - this.I_Goods_Name.HeaderText = "产品名称"; - this.I_Goods_Name.Name = "I_Goods_Name"; - this.I_Goods_Name.ReadOnly = true; - // - // I_Goods_Spec - // - this.I_Goods_Spec.DataPropertyName = "Spec"; - this.I_Goods_Spec.HeaderText = "规格"; - this.I_Goods_Spec.Name = "I_Goods_Spec"; - this.I_Goods_Spec.ReadOnly = true; - this.I_Goods_Spec.Width = 70; - // - // I_Weight - // - this.I_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle3.Format = "#0.######"; - this.I_Weight.DefaultCellStyle = dataGridViewCellStyle3; - this.I_Weight.HeaderText = "重量"; - this.I_Weight.Name = "I_Weight"; - this.I_Weight.ReadOnly = true; - this.I_Weight.Width = 70; - // - // I_ProductTime - // - this.I_ProductTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.I_ProductTime.DataPropertyName = "ProductTime"; - dataGridViewCellStyle4.Format = "T"; - dataGridViewCellStyle4.NullValue = null; - this.I_ProductTime.DefaultCellStyle = dataGridViewCellStyle4; - this.I_ProductTime.HeaderText = "生产时间"; - this.I_ProductTime.Name = "I_ProductTime"; - this.I_ProductTime.ReadOnly = true; - this.I_ProductTime.Width = 97; - // - // B_ID - // - this.B_ID.DataPropertyName = "ID"; - this.B_ID.HeaderText = "ID"; - this.B_ID.Name = "B_ID"; - this.B_ID.ReadOnly = true; - this.B_ID.Visible = false; - // - // B_RowIndex - // - this.B_RowIndex.DataPropertyName = "RowIndex"; - this.B_RowIndex.HeaderText = "序号"; - this.B_RowIndex.Name = "B_RowIndex"; - this.B_RowIndex.ReadOnly = true; - this.B_RowIndex.Width = 65; - // - // B_ShortCode - // - this.B_ShortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.B_ShortCode.DataPropertyName = "ShortCode"; - this.B_ShortCode.HeaderText = "条码"; - this.B_ShortCode.Name = "B_ShortCode"; - this.B_ShortCode.ReadOnly = true; - this.B_ShortCode.Width = 65; - // - // B_Goods_Code - // - this.B_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.B_Goods_Code.DataPropertyName = "Goods_Code"; - this.B_Goods_Code.HeaderText = "产品编号"; - this.B_Goods_Code.Name = "B_Goods_Code"; - this.B_Goods_Code.ReadOnly = true; - // - // B_Goods_Name - // - this.B_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.B_Goods_Name.DataPropertyName = "Goods_Name"; - this.B_Goods_Name.HeaderText = "产品名称"; - this.B_Goods_Name.Name = "B_Goods_Name"; - this.B_Goods_Name.ReadOnly = true; - // - // B_Goods_Spec - // - this.B_Goods_Spec.DataPropertyName = "Goods_Spec"; - this.B_Goods_Spec.HeaderText = "规格"; - this.B_Goods_Spec.Name = "B_Goods_Spec"; - this.B_Goods_Spec.ReadOnly = true; - this.B_Goods_Spec.Width = 70; - // - // B_Weight - // - this.B_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle8.Format = "#0.######"; - this.B_Weight.DefaultCellStyle = dataGridViewCellStyle8; - this.B_Weight.HeaderText = "重量"; - this.B_Weight.Name = "B_Weight"; - this.B_Weight.ReadOnly = true; - this.B_Weight.Width = 70; - // - // B_ProductTime - // - this.B_ProductTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.B_ProductTime.DataPropertyName = "ProductTime"; - dataGridViewCellStyle9.Format = "T"; - dataGridViewCellStyle9.NullValue = null; - this.B_ProductTime.DefaultCellStyle = dataGridViewCellStyle9; - this.B_ProductTime.HeaderText = "生产时间"; - this.B_ProductTime.Name = "B_ProductTime"; - this.B_ProductTime.ReadOnly = true; - this.B_ProductTime.Width = 97; - // - // dataGridViewTextBoxColumn8 - // - this.dataGridViewTextBoxColumn8.DataPropertyName = "U_ID"; - this.dataGridViewTextBoxColumn8.HeaderText = "ID"; - this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; - this.dataGridViewTextBoxColumn8.ReadOnly = true; - this.dataGridViewTextBoxColumn8.Visible = false; - // - // U_RowIndex - // - this.U_RowIndex.DataPropertyName = "RowIndex"; - this.U_RowIndex.HeaderText = "序号"; - this.U_RowIndex.Name = "U_RowIndex"; - this.U_RowIndex.ReadOnly = true; - this.U_RowIndex.Width = 65; - // - // U_ShortCode - // - this.U_ShortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.U_ShortCode.DataPropertyName = "ShortCode"; - this.U_ShortCode.HeaderText = "条码"; - this.U_ShortCode.Name = "U_ShortCode"; - this.U_ShortCode.ReadOnly = true; - this.U_ShortCode.Width = 65; - // - // U_Goods_Code - // - this.U_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.U_Goods_Code.DataPropertyName = "Goods_Code"; - this.U_Goods_Code.HeaderText = "产品编号"; - this.U_Goods_Code.Name = "U_Goods_Code"; - this.U_Goods_Code.ReadOnly = true; - // - // U_Goods_Name - // - this.U_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.U_Goods_Name.DataPropertyName = "Goods_Name"; - this.U_Goods_Name.HeaderText = "产品名称"; - this.U_Goods_Name.Name = "U_Goods_Name"; - this.U_Goods_Name.ReadOnly = true; - // - // U_Goods_Spec - // - this.U_Goods_Spec.DataPropertyName = "Goods_Spec"; - this.U_Goods_Spec.HeaderText = "规格"; - this.U_Goods_Spec.Name = "U_Goods_Spec"; - this.U_Goods_Spec.ReadOnly = true; - this.U_Goods_Spec.Width = 70; - // - // U_Weight - // - this.U_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle13.Format = "#0.######"; - this.U_Weight.DefaultCellStyle = dataGridViewCellStyle13; - this.U_Weight.HeaderText = "重量"; - this.U_Weight.Name = "U_Weight"; - this.U_Weight.ReadOnly = true; - this.U_Weight.Width = 70; - // - // U_ProductTime - // - this.U_ProductTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.U_ProductTime.DataPropertyName = "ProductTime"; - dataGridViewCellStyle14.Format = "T"; - dataGridViewCellStyle14.NullValue = null; - this.U_ProductTime.DefaultCellStyle = dataGridViewCellStyle14; - this.U_ProductTime.HeaderText = "生产时间"; - this.U_ProductTime.Name = "U_ProductTime"; - this.U_ProductTime.ReadOnly = true; - this.U_ProductTime.Width = 97; - // // SegmentInStoreForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -806,5 +825,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn U_Goods_Spec; private System.Windows.Forms.DataGridViewTextBoxColumn U_Weight; private System.Windows.Forms.DataGridViewTextBoxColumn U_ProductTime; + private WinFormControl.NButton inStoreViewBtn; } } \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs b/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs index c610a48..e58838d 100644 --- a/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs +++ b/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs @@ -201,5 +201,10 @@ namespace ButcherFactory.SegmentInStore_ { BindUnInStoreGrid(); } + + private void inStoreViewBtn_Click(object sender, EventArgs e) + { + new InStoreSummaryView().ShowDialog(); + } } } diff --git a/ButcherFactorySolution/ButcherFactorySolution.vdproj b/ButcherFactorySolution/ButcherFactorySolution.vdproj index 67566fa..5b4e429 100644 --- a/ButcherFactorySolution/ButcherFactorySolution.vdproj +++ b/ButcherFactorySolution/ButcherFactorySolution.vdproj @@ -129,6 +129,12 @@ } "Entry" { + "MsmKey" = "8:_7A3CA3A8693B4036857E171FE6E3E32E" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_7A952C003008483BBF4EE01C4B8710BD" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -815,6 +821,26 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7A3CA3A8693B4036857E171FE6E3E32E" + { + "SourcePath" = "8:..\\ButcherFactory.Form\\bin\\Release\\RoleRedirectConfig.xml" + "TargetName" = "8:RoleRedirectConfig.xml" + "Tag" = "8:" + "Folder" = "8:_DDF0E5520C37445FBCDCE0D5082C076B" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7A952C003008483BBF4EE01C4B8710BD" { "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Config\\DbSelectList.xml" diff --git a/SelfHelpClient/BL/WeightBillBL.cs b/SelfHelpClient/BL/WeightBillBL.cs index eab832d..9d1c457 100644 --- a/SelfHelpClient/BL/WeightBillBL.cs +++ b/SelfHelpClient/BL/WeightBillBL.cs @@ -48,5 +48,16 @@ namespace SelfHelpClient.BL var json = Rpc.Call(MethodHead + "GetWeightDetail", id); return JsonConvert.DeserializeObject>(json); } + + public static WashCarPrint GetWashPrintEntity(long id, decimal fee) + { + var json = Rpc.Call(MethodHead + "GetWashPrintEntity", id, fee); + return JsonConvert.DeserializeObject(json); + } + + public static int? GetCarStandard(long id) + { + return Rpc.Call(MethodHead + "GetCarStandad", id); + } } } diff --git a/SelfHelpClient/BO/CarStandardConfig.cs b/SelfHelpClient/BO/CarStandardConfig.cs new file mode 100644 index 0000000..6966ef2 --- /dev/null +++ b/SelfHelpClient/BO/CarStandardConfig.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SelfHelpClient.BO +{ + public class CarStandardConfig + { + public int Standard { get; set; } + + public string ShowName { get; set; } + + public decimal Fee { get; set; } + } +} diff --git a/SelfHelpClient/BO/WashCarPrint.cs b/SelfHelpClient/BO/WashCarPrint.cs new file mode 100644 index 0000000..b11f360 --- /dev/null +++ b/SelfHelpClient/BO/WashCarPrint.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SelfHelpClient.BO +{ + public class WashCarPrint + { + public long BillID { get; set; } + + public DateTime Date { get; set; } + + public DateTime LastPrintTime { get; set; } + + public int RowIndex { get; set; } + + public int PrintDegree { get; set; } + + public string CarNumber { get; set; } + + public int CarSize { get; set; } + + public decimal Fee { get; set; } + + public string WeightMan { get; set; } + } +} diff --git a/SelfHelpClient/CarPaperPrint.html b/SelfHelpClient/CarPaperPrint.html index 185be6a..1596f54 100644 --- a/SelfHelpClient/CarPaperPrint.html +++ b/SelfHelpClient/CarPaperPrint.html @@ -5,23 +5,41 @@ - - 洗车票打印 + + 洗车票打印 - + +

洗车消毒收费单

+

车次:$Index

- - - - + +
车牌号京A88888
司机张三三
规格
费用25元
日期$Date车牌号$CarNumber承运人 
车型$CarSize收费$Fee品管解东诚
\ No newline at end of file diff --git a/SelfHelpClient/MainForm.cs b/SelfHelpClient/MainForm.cs index ba7dfea..a8ce98c 100644 --- a/SelfHelpClient/MainForm.cs +++ b/SelfHelpClient/MainForm.cs @@ -37,7 +37,10 @@ namespace SelfHelpClient if (entity == null) return; if (entity.BillType == 0) + { + DialogForm.ShowDialog("没有待办理业务", 5); return; + } new SelfHelpForm(entity.ID).Show(); this.Hide(); } diff --git a/SelfHelpClient/SelfHelpClient.csproj b/SelfHelpClient/SelfHelpClient.csproj index 31a818e..ddb62d7 100644 --- a/SelfHelpClient/SelfHelpClient.csproj +++ b/SelfHelpClient/SelfHelpClient.csproj @@ -35,6 +35,10 @@ false + + False + ..\..\..\tsref\Debug\BwpClientPrint.dll + False ..\..\..\tsref\release\Newtonsoft.Json.dll @@ -57,7 +61,9 @@ + + Form @@ -94,6 +100,7 @@ + Form diff --git a/SelfHelpClient/SelfHelpForm.Designer.cs b/SelfHelpClient/SelfHelpForm.Designer.cs index a51acb8..51988c4 100644 --- a/SelfHelpClient/SelfHelpForm.Designer.cs +++ b/SelfHelpClient/SelfHelpForm.Designer.cs @@ -49,6 +49,7 @@ // this.weightPrintBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); this.weightPrintBtn.ClickColor = System.Drawing.Color.YellowGreen; + this.weightPrintBtn.Enabled = false; this.weightPrintBtn.Font = new System.Drawing.Font("宋体", 23F); this.weightPrintBtn.ForeColor = System.Drawing.Color.White; this.weightPrintBtn.Location = new System.Drawing.Point(392, 64); @@ -76,9 +77,11 @@ this.washCarBtn.Text = "打印洗车单"; this.washCarBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); this.washCarBtn.UseVisualStyleBackColor = false; + this.washCarBtn.Click += new System.EventHandler(this.washCarBtn_Click); // // backBtn // + this.backBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.backBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); this.backBtn.ClickColor = System.Drawing.Color.YellowGreen; this.backBtn.Font = new System.Drawing.Font("宋体", 18F); diff --git a/SelfHelpClient/SelfHelpForm.cs b/SelfHelpClient/SelfHelpForm.cs index 8de6b05..6d4ddcb 100644 --- a/SelfHelpClient/SelfHelpForm.cs +++ b/SelfHelpClient/SelfHelpForm.cs @@ -1,4 +1,7 @@ -using System; +using SelfHelpClient.BL; +using SelfHelpClient.BO; +using SelfHelpClient.Utils; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -13,9 +16,11 @@ namespace SelfHelpClient { public partial class SelfHelpForm : Form { + long billID; public SelfHelpForm(long id) { InitializeComponent(); + billID = id; } private void backBtn_Click(object sender, EventArgs e) @@ -23,5 +28,29 @@ namespace SelfHelpClient MainForm.Form.Show(); this.Close(); } + + private void washCarBtn_Click(object sender, EventArgs e) + { + var standard = WeightBillBL.GetCarStandard(billID); + if (standard == null) + DialogForm.ShowDialog("未填写车辆标准", 5); + var list = XmlUtil.DeserializeFromFile>("CarStandardConfig.xml"); + var config = list.FirstOrDefault(x => x.Standard == standard.Value); + if (config == null) + DialogForm.ShowDialog("未配置车辆费用标准", 5); + var printEntity = WeightBillBL.GetWashPrintEntity(billID, config.Fee); + + var dic = new Dictionary(); + dic.Add("$Date", printEntity.Date.ToString("yyyy-MM-dd")); + dic.Add("$Index", printEntity.RowIndex.ToString()); + dic.Add("$CarNumber", printEntity.CarNumber); + dic.Add("$CarSize",config.ShowName); + dic.Add("$Fee", config.Fee.ToString("#0.######")); + dic.Add("$WeightMan", printEntity.WeightMan); + + BwpClientPrint.BwpClientWebPrint.Print("CarPaperPrint.html", dic); + + backBtn_Click(null, EventArgs.Empty); + } } } diff --git a/SelfHelpClient/Utils/XmlUtil.cs b/SelfHelpClient/Utils/XmlUtil.cs new file mode 100644 index 0000000..6b05673 --- /dev/null +++ b/SelfHelpClient/Utils/XmlUtil.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace SelfHelpClient.Utils +{ + public static class XmlUtil + { + public static T DeserializeFromFile(string fileName) + where T : new() + { + if (!File.Exists(fileName)) + return new T(); + using (var reader = new StreamReader(fileName)) + { + var xs = new XmlSerializer(typeof(T)); + object obj = xs.Deserialize(reader); + reader.Close(); + return (T)obj; + } + } + } +} diff --git a/SelfHelpClient/WeightForm.Designer.cs b/SelfHelpClient/WeightForm.Designer.cs index 391297c..0330f9b 100644 --- a/SelfHelpClient/WeightForm.Designer.cs +++ b/SelfHelpClient/WeightForm.Designer.cs @@ -31,20 +31,25 @@ 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 dataGridViewCellStyle11 = 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 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(); this.panel1 = new System.Windows.Forms.Panel(); this.backBtn = new WinFormControl.NButton(); this.okBtn = new WinFormControl.NButton(); this.panel2 = new System.Windows.Forms.Panel(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.weightGrid = new WinFormControl.UDataGridView(); + this.D_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.D_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.D_MaoWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.D_PiWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.D_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.farmerGrid = new WinFormControl.UDataGridView(); this.F_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -56,11 +61,6 @@ this.F_Farmer_BankAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_Farmer_Tel = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.F_Farmer_Address = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.D_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.D_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.D_MaoWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.D_PiWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.D_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -111,6 +111,7 @@ this.okBtn.Text = "确定"; this.okBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255))))); this.okBtn.UseVisualStyleBackColor = false; + this.okBtn.Click += new System.EventHandler(this.okBtn_Click); // // panel2 // @@ -171,6 +172,51 @@ this.weightGrid.Size = new System.Drawing.Size(913, 88); this.weightGrid.TabIndex = 0; // + // D_Index + // + this.D_Index.DataPropertyName = "Index"; + this.D_Index.HeaderText = "序号"; + this.D_Index.Name = "D_Index"; + this.D_Index.ReadOnly = true; + // + // D_Number + // + this.D_Number.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.D_Number.DataPropertyName = "Number"; + this.D_Number.HeaderText = "头数"; + this.D_Number.Name = "D_Number"; + this.D_Number.ReadOnly = true; + // + // D_MaoWeight + // + this.D_MaoWeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.D_MaoWeight.DataPropertyName = "MaoWeight"; + dataGridViewCellStyle3.Format = "#0.######"; + this.D_MaoWeight.DefaultCellStyle = dataGridViewCellStyle3; + this.D_MaoWeight.HeaderText = "毛重"; + this.D_MaoWeight.Name = "D_MaoWeight"; + this.D_MaoWeight.ReadOnly = true; + // + // D_PiWeight + // + this.D_PiWeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.D_PiWeight.DataPropertyName = "PiWeight"; + dataGridViewCellStyle4.Format = "#0.######"; + this.D_PiWeight.DefaultCellStyle = dataGridViewCellStyle4; + this.D_PiWeight.HeaderText = "皮重"; + this.D_PiWeight.Name = "D_PiWeight"; + this.D_PiWeight.ReadOnly = true; + // + // D_Weight + // + this.D_Weight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.D_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle5.Format = "#0.######"; + this.D_Weight.DefaultCellStyle = dataGridViewCellStyle5; + this.D_Weight.HeaderText = "重量"; + this.D_Weight.Name = "D_Weight"; + this.D_Weight.ReadOnly = true; + // // groupBox1 // this.groupBox1.Controls.Add(this.farmerGrid); @@ -306,51 +352,6 @@ this.F_Farmer_Address.Name = "F_Farmer_Address"; this.F_Farmer_Address.ReadOnly = true; // - // D_Index - // - this.D_Index.DataPropertyName = "Index"; - this.D_Index.HeaderText = "序号"; - this.D_Index.Name = "D_Index"; - this.D_Index.ReadOnly = true; - // - // D_Number - // - this.D_Number.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.D_Number.DataPropertyName = "Number"; - this.D_Number.HeaderText = "头数"; - this.D_Number.Name = "D_Number"; - this.D_Number.ReadOnly = true; - // - // D_MaoWeight - // - this.D_MaoWeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.D_MaoWeight.DataPropertyName = "MaoWeight"; - dataGridViewCellStyle3.Format = "#0.######"; - this.D_MaoWeight.DefaultCellStyle = dataGridViewCellStyle3; - this.D_MaoWeight.HeaderText = "毛重"; - this.D_MaoWeight.Name = "D_MaoWeight"; - this.D_MaoWeight.ReadOnly = true; - // - // D_PiWeight - // - this.D_PiWeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.D_PiWeight.DataPropertyName = "PiWeight"; - dataGridViewCellStyle4.Format = "#0.######"; - this.D_PiWeight.DefaultCellStyle = dataGridViewCellStyle4; - this.D_PiWeight.HeaderText = "皮重"; - this.D_PiWeight.Name = "D_PiWeight"; - this.D_PiWeight.ReadOnly = true; - // - // D_Weight - // - this.D_Weight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.D_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle5.Format = "#0.######"; - this.D_Weight.DefaultCellStyle = dataGridViewCellStyle5; - this.D_Weight.HeaderText = "重量"; - this.D_Weight.Name = "D_Weight"; - this.D_Weight.ReadOnly = true; - // // WeightForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/SelfHelpClient/WeightForm.cs b/SelfHelpClient/WeightForm.cs index 39a9de9..1c2f1f1 100644 --- a/SelfHelpClient/WeightForm.cs +++ b/SelfHelpClient/WeightForm.cs @@ -160,7 +160,7 @@ namespace SelfHelpClient Dictionary BuildFields() { var dic = new Dictionary() { - {"Supplier_Name","供应商"},{"PurchaseType_Name","收购类型"},{"WeighTime","过磅时间"},{"Car_Name","车辆"},{"Employee_Name","业务员"},{"JingJianFee","经检费"},{"DiscontMoney","猪场扣款"},{"ShackWeight","棚前重量"},{"ShackPrice","棚前单价"},{"ShackMoney","棚前金额"},{"AnimalTestMan","动检人"},{"AnimalTestNumber","动检证号"},{"AnimalTestDate","动检日期"}, + {"Supplier_Name","供应商"},{"BankAccount","银行卡号"},{"PurchaseType_Name","收购类型"},{"WeighTime","过磅时间"},{"Car_Name","车辆"},{"Employee_Name","业务员"},{"JingJianFee","经检费"},{"DiscontMoney","猪场扣款"},{"ShackWeight","棚前重量"},{"ShackPrice","棚前单价"},{"ShackMoney","棚前金额"},{"AnimalTestMan","动检人"},{"AnimalTestNumber","动检证号"},{"AnimalTestDate","动检日期"}, }; return dic; } @@ -180,6 +180,13 @@ namespace SelfHelpClient MainForm.Form.Show(); this.Close(); } + + private void okBtn_Click(object sender, EventArgs e) + { + //目前过磅信息界面上的确认按钮没有功能,暂时做点击完后返回主界面; + MainForm.Form.Show(); + this.Close(); + } } struct TableSturct