From e4225da44bf9052e517017c43fc60957d5484cff Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期四, 16 七月 2020 11:57:00 +0800
Subject: [PATCH] 测量结果 界面及查询功能
---
src/Bro.M071.Process/UI/M071_DataForm.resx | 19 +
src/Bro.M071.Process/UI/M071_DataForm.cs | 21 ++
src/Bro.M071.DBManager/MeasurementUnitResultManager.cs | 17 +
src/Bro.M071.Process/UI/M071_DataForm.Designer.cs | 345 ++++++++++++++++++++++++++++--------------
src/Bro.M071.Model/Model/MeasurementUnitResult.cs | 57 +++++++
5 files changed, 330 insertions(+), 129 deletions(-)
diff --git a/src/Bro.M071.DBManager/MeasurementUnitResultManager.cs b/src/Bro.M071.DBManager/MeasurementUnitResultManager.cs
index cfd2a15..0d49ead 100644
--- a/src/Bro.M071.DBManager/MeasurementUnitResultManager.cs
+++ b/src/Bro.M071.DBManager/MeasurementUnitResultManager.cs
@@ -29,7 +29,7 @@
{
}
- public List<MeasurementUnitResult> GetMeasurementUnitResult(MeasurementUnitResultRequest request)
+ public List<MeasurementUnitResult_DTO> GetMeasurementUnitResult(MeasurementUnitResultRequest request)
{
using (DBModel context = new DBModel())
{
@@ -70,12 +70,21 @@
join measurementUnitResult in mList
on productionMeasurementRecords.ID equals measurementUnitResult.ProductionMeasurementRecordsId
//into pmList
- select new MeasurementUnitResult
+ select new MeasurementUnitResult_DTO
{
ProductionCode = productionMeasurementRecords.ProductionCode,
- ProductionBarcode = productionMeasurementRecords.ProductionBarcode
+ ProductionBarcode = productionMeasurementRecords.ProductionBarcode,
+ ProductionMeasurementRecordsId = productionMeasurementRecords.ID,
+ OperationStartTime= productionMeasurementRecords.OperationStartTime,
+ OperationEndTime = productionMeasurementRecords.OperationEndTime,
+
+ Id= measurementUnitResult.ID,
+ MeasurementName= measurementUnitResult.MeasurementName,
+ MeasurementType = measurementUnitResult.MeasurementType,
+ MeasurementValue = measurementUnitResult.MeasurementValue,
+ MeasurementResult = measurementUnitResult.MeasurementResult
};
- var pageList = query.OrderBy(u => u.CREATE_TIME).ToPagedList(request);
+ var pageList = query.OrderBy(u => u.OperationStartTime).ToPagedList(request);
request.TotalNum = mList.Count();
return pageList;
}
diff --git a/src/Bro.M071.Model/Model/MeasurementUnitResult.cs b/src/Bro.M071.Model/Model/MeasurementUnitResult.cs
index a58ecba..fb523c9 100644
--- a/src/Bro.M071.Model/Model/MeasurementUnitResult.cs
+++ b/src/Bro.M071.Model/Model/MeasurementUnitResult.cs
@@ -86,7 +86,7 @@
/// <summary>
/// 鍏崇郴鏁版嵁
/// </summary>
- public List<MeasurementAndKeyDataRelation> MeasurementAndKeyDataRelationList{ get; set; }
+ public List<MeasurementAndKeyDataRelation> MeasurementAndKeyDataRelationList { get; set; }
/// <summary>
/// 妫�娴嬬粨鏋�
@@ -104,7 +104,62 @@
MeasurementUnitResultList = new List<MeasurementUnitResult>();
KeyUnitDataList = new List<KeyUnitData>();
}
+ }
+ /// <summary>
+ /// MeasurementUnitResult_DTO 鏁版嵁搴撴煡璇娇鐢�
+ /// </summary>
+ public class MeasurementUnitResult_DTO
+ {
+
+ /// <summary>
+ /// 浜у搧娴嬮噺璁板綍Id
+ /// </summary>
+ public string Id { get; set; }
+
+ /// <summary>
+ /// 浜у搧娴嬮噺璁板綍Id
+ /// </summary>
+ public string ProductionMeasurementRecordsId { get; set; }
+ /// <summary>
+ /// 妫�娴嬪悕绉�
+ /// </summary>
+ public string MeasurementName { get; set; }
+
+ /// <summary>
+ /// 妫�娴嬬粨鏋滅被鍨� (Slant Alignment... )
+ /// </summary>
+ public string MeasurementType { get; set; }
+
+ /// <summary>
+ /// 妫�娴嬬粨鏋滃��
+ /// </summary>
+ public string MeasurementValue { get; set; }
+
+ /// <summary>
+ /// 妫�娴嬬粨鏋� ok ng
+ /// </summary>
+ public string MeasurementResult { get; set; }
+
+ /// <summary>
+ /// 浜у搧缂栫爜
+ /// </summary>
+ public string ProductionCode { get; set; }
+
+ /// <summary>
+ /// 浜у搧鏉$爜
+ /// </summary>
+ public string ProductionBarcode { get; set; }
+
+ /// <summary>
+ /// 鎿嶄綔寮�濮嬫椂闂�
+ /// </summary>
+ public DateTime OperationStartTime { get; set; }
+
+ /// <summary>
+ /// 鎿嶄綔缁撴潫鏃堕棿
+ /// </summary>
+ public DateTime OperationEndTime { get; set; }
}
}
diff --git a/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs b/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs
index d8186a4..97d12a0 100644
--- a/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs
+++ b/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs
@@ -28,6 +28,8 @@
/// </summary>
private void InitializeComponent()
{
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.tabControl1 = new System.Windows.Forms.TabControl();
@@ -63,13 +65,15 @@
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.panel2 = new System.Windows.Forms.Panel();
- this.textBox2 = new System.Windows.Forms.TextBox();
- this.button5 = new System.Windows.Forms.Button();
- this.button6 = new System.Windows.Forms.Button();
- this.button7 = new System.Windows.Forms.Button();
- this.button8 = new System.Windows.Forms.Button();
+ this.labelTotal_MR = new System.Windows.Forms.Label();
+ this.textBoxPageNum_MR = new System.Windows.Forms.TextBox();
+ this.buttonToLastPage_MR = new System.Windows.Forms.Button();
+ this.buttonToNextPage_MR = new System.Windows.Forms.Button();
+ this.buttonToBeforePage_MR = new System.Windows.Forms.Button();
+ this.buttonToFirstPage_MR = new System.Windows.Forms.Button();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
+ this.comboBoxMeasurementType_MR = new System.Windows.Forms.ComboBox();
this.label10 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBoxPCode_MR = new System.Windows.Forms.TextBox();
@@ -80,14 +84,20 @@
this.label8 = new System.Windows.Forms.Label();
this.textBoxMeasurementName_MR = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
- this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
+ this.dateTimePickerStartTime_MR = new System.Windows.Forms.DateTimePicker();
this.label12 = new System.Windows.Forms.Label();
- this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
- this.buttonQuery_MR = new System.Windows.Forms.Button();
- this.comboBoxMeasurementType_MR = new System.Windows.Forms.ComboBox();
- this.labelTotal_MR = new System.Windows.Forms.Label();
- this.buttonExport_MR = new System.Windows.Forms.Button();
+ this.dateTimePickerEndTime_MR = new System.Windows.Forms.DateTimePicker();
this.panel3 = new System.Windows.Forms.Panel();
+ this.buttonExport_MR = new System.Windows.Forms.Button();
+ this.buttonQuery_MR = new System.Windows.Forms.Button();
+ this.ProductionCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.ProductionBarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.MeasurementName = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.MeasurementType = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.MeasurementValue = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.MeasurementResult = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.OperationStartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.OperationEndTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
@@ -223,6 +233,8 @@
//
// labelTotal
//
+ this.labelTotal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)));
this.labelTotal.AutoSize = true;
this.labelTotal.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
this.labelTotal.Location = new System.Drawing.Point(3, 3);
@@ -275,9 +287,9 @@
// Column4
//
this.Column4.DataPropertyName = "OperationStartTime";
- dataGridViewCellStyle3.Format = "G";
- dataGridViewCellStyle3.NullValue = null;
- this.Column4.DefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle1.Format = "G";
+ dataGridViewCellStyle1.NullValue = null;
+ this.Column4.DefaultCellStyle = dataGridViewCellStyle1;
this.Column4.HeaderText = "鐢熶骇鏃堕棿(寮�濮�)";
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
@@ -286,9 +298,9 @@
// Column5
//
this.Column5.DataPropertyName = "OperationEndTime";
- dataGridViewCellStyle4.Format = "G";
- dataGridViewCellStyle4.NullValue = null;
- this.Column5.DefaultCellStyle = dataGridViewCellStyle4;
+ dataGridViewCellStyle2.Format = "G";
+ dataGridViewCellStyle2.NullValue = null;
+ this.Column5.DefaultCellStyle = dataGridViewCellStyle2;
this.Column5.HeaderText = "鐢熶骇鏃堕棿(缁撴潫)";
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
@@ -489,59 +501,81 @@
// panel2
//
this.panel2.Controls.Add(this.labelTotal_MR);
- this.panel2.Controls.Add(this.textBox2);
- this.panel2.Controls.Add(this.button5);
- this.panel2.Controls.Add(this.button6);
- this.panel2.Controls.Add(this.button7);
- this.panel2.Controls.Add(this.button8);
+ this.panel2.Controls.Add(this.textBoxPageNum_MR);
+ this.panel2.Controls.Add(this.buttonToLastPage_MR);
+ this.panel2.Controls.Add(this.buttonToNextPage_MR);
+ this.panel2.Controls.Add(this.buttonToBeforePage_MR);
+ this.panel2.Controls.Add(this.buttonToFirstPage_MR);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(3, 658);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(751, 24);
this.panel2.TabIndex = 1;
//
- // textBox2
+ // labelTotal_MR
//
- this.textBox2.Location = new System.Drawing.Point(542, 2);
- this.textBox2.Name = "textBox2";
- this.textBox2.Size = new System.Drawing.Size(80, 21);
- this.textBox2.TabIndex = 2;
+ this.labelTotal_MR.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)));
+ this.labelTotal_MR.AutoSize = true;
+ this.labelTotal_MR.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.labelTotal_MR.Location = new System.Drawing.Point(0, 3);
+ this.labelTotal_MR.Name = "labelTotal_MR";
+ this.labelTotal_MR.Size = new System.Drawing.Size(97, 17);
+ this.labelTotal_MR.TabIndex = 3;
+ this.labelTotal_MR.Text = "鏁伴噺锛氭�婚〉鏁�:";
//
- // button5
+ // textBoxPageNum_MR
//
- this.button5.Location = new System.Drawing.Point(693, 0);
- this.button5.Name = "button5";
- this.button5.Size = new System.Drawing.Size(55, 23);
- this.button5.TabIndex = 1;
- this.button5.Text = "鏈�鍚庨〉";
- this.button5.UseVisualStyleBackColor = true;
+ this.textBoxPageNum_MR.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBoxPageNum_MR.Location = new System.Drawing.Point(542, 2);
+ this.textBoxPageNum_MR.Name = "textBoxPageNum_MR";
+ this.textBoxPageNum_MR.Size = new System.Drawing.Size(80, 21);
+ this.textBoxPageNum_MR.TabIndex = 2;
//
- // button6
+ // buttonToLastPage_MR
//
- this.button6.Location = new System.Drawing.Point(632, 1);
- this.button6.Name = "button6";
- this.button6.Size = new System.Drawing.Size(55, 23);
- this.button6.TabIndex = 1;
- this.button6.Text = "鍚庝竴椤�";
- this.button6.UseVisualStyleBackColor = true;
+ this.buttonToLastPage_MR.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonToLastPage_MR.Location = new System.Drawing.Point(693, 0);
+ this.buttonToLastPage_MR.Name = "buttonToLastPage_MR";
+ this.buttonToLastPage_MR.Size = new System.Drawing.Size(55, 23);
+ this.buttonToLastPage_MR.TabIndex = 1;
+ this.buttonToLastPage_MR.Text = "鏈�鍚庨〉";
+ this.buttonToLastPage_MR.UseVisualStyleBackColor = true;
//
- // button7
+ // buttonToNextPage_MR
//
- this.button7.Location = new System.Drawing.Point(477, 1);
- this.button7.Name = "button7";
- this.button7.Size = new System.Drawing.Size(55, 23);
- this.button7.TabIndex = 1;
- this.button7.Text = "鍓嶄竴椤�";
- this.button7.UseVisualStyleBackColor = true;
+ this.buttonToNextPage_MR.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonToNextPage_MR.Location = new System.Drawing.Point(632, 1);
+ this.buttonToNextPage_MR.Name = "buttonToNextPage_MR";
+ this.buttonToNextPage_MR.Size = new System.Drawing.Size(55, 23);
+ this.buttonToNextPage_MR.TabIndex = 1;
+ this.buttonToNextPage_MR.Text = "鍚庝竴椤�";
+ this.buttonToNextPage_MR.UseVisualStyleBackColor = true;
//
- // button8
+ // buttonToBeforePage_MR
//
- this.button8.Location = new System.Drawing.Point(416, 1);
- this.button8.Name = "button8";
- this.button8.Size = new System.Drawing.Size(55, 23);
- this.button8.TabIndex = 1;
- this.button8.Text = "绗竴椤�";
- this.button8.UseVisualStyleBackColor = true;
+ this.buttonToBeforePage_MR.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonToBeforePage_MR.Location = new System.Drawing.Point(477, 1);
+ this.buttonToBeforePage_MR.Name = "buttonToBeforePage_MR";
+ this.buttonToBeforePage_MR.Size = new System.Drawing.Size(55, 23);
+ this.buttonToBeforePage_MR.TabIndex = 1;
+ this.buttonToBeforePage_MR.Text = "鍓嶄竴椤�";
+ this.buttonToBeforePage_MR.UseVisualStyleBackColor = true;
+ //
+ // buttonToFirstPage_MR
+ //
+ this.buttonToFirstPage_MR.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonToFirstPage_MR.Location = new System.Drawing.Point(416, 1);
+ this.buttonToFirstPage_MR.Name = "buttonToFirstPage_MR";
+ this.buttonToFirstPage_MR.Size = new System.Drawing.Size(55, 23);
+ this.buttonToFirstPage_MR.TabIndex = 1;
+ this.buttonToFirstPage_MR.Text = "绗竴椤�";
+ this.buttonToFirstPage_MR.UseVisualStyleBackColor = true;
//
// dataGridView2
//
@@ -549,6 +583,15 @@
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.BackgroundColor = System.Drawing.SystemColors.MenuBar;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.ProductionCode,
+ this.ProductionBarcode,
+ this.MeasurementName,
+ this.MeasurementType,
+ this.MeasurementValue,
+ this.MeasurementResult,
+ this.OperationStartTime,
+ this.OperationEndTime});
this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView2.Location = new System.Drawing.Point(3, 73);
this.dataGridView2.Name = "dataGridView2";
@@ -579,9 +622,9 @@
this.tableLayoutPanel4.Controls.Add(this.label8, 6, 0);
this.tableLayoutPanel4.Controls.Add(this.textBoxMeasurementName_MR, 7, 0);
this.tableLayoutPanel4.Controls.Add(this.label11, 2, 1);
- this.tableLayoutPanel4.Controls.Add(this.dateTimePicker1, 3, 1);
+ this.tableLayoutPanel4.Controls.Add(this.dateTimePickerStartTime_MR, 3, 1);
this.tableLayoutPanel4.Controls.Add(this.label12, 4, 1);
- this.tableLayoutPanel4.Controls.Add(this.dateTimePicker2, 5, 1);
+ this.tableLayoutPanel4.Controls.Add(this.dateTimePickerEndTime_MR, 5, 1);
this.tableLayoutPanel4.Controls.Add(this.panel3, 6, 1);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 3);
@@ -592,6 +635,16 @@
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(751, 64);
this.tableLayoutPanel4.TabIndex = 3;
+ //
+ // comboBoxMeasurementType_MR
+ //
+ this.comboBoxMeasurementType_MR.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.comboBoxMeasurementType_MR.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.comboBoxMeasurementType_MR.FormattingEnabled = true;
+ this.comboBoxMeasurementType_MR.Location = new System.Drawing.Point(73, 35);
+ this.comboBoxMeasurementType_MR.Name = "comboBoxMeasurementType_MR";
+ this.comboBoxMeasurementType_MR.Size = new System.Drawing.Size(111, 25);
+ this.comboBoxMeasurementType_MR.TabIndex = 19;
//
// label10
//
@@ -661,6 +714,7 @@
//
// comboBoxResult_MR
//
+ this.comboBoxResult_MR.Dock = System.Windows.Forms.DockStyle.Fill;
this.comboBoxResult_MR.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
this.comboBoxResult_MR.FormattingEnabled = true;
this.comboBoxResult_MR.Location = new System.Drawing.Point(447, 3);
@@ -701,15 +755,15 @@
this.label11.Text = "鐢熶骇鏃堕棿";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
- // dateTimePicker1
+ // dateTimePickerStartTime_MR
//
- this.dateTimePicker1.CalendarFont = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
- this.dateTimePicker1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.dateTimePicker1.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
- this.dateTimePicker1.Location = new System.Drawing.Point(260, 35);
- this.dateTimePicker1.Name = "dateTimePicker1";
- this.dateTimePicker1.Size = new System.Drawing.Size(111, 24);
- this.dateTimePicker1.TabIndex = 15;
+ this.dateTimePickerStartTime_MR.CalendarFont = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.dateTimePickerStartTime_MR.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dateTimePickerStartTime_MR.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.dateTimePickerStartTime_MR.Location = new System.Drawing.Point(260, 35);
+ this.dateTimePickerStartTime_MR.Name = "dateTimePickerStartTime_MR";
+ this.dateTimePickerStartTime_MR.Size = new System.Drawing.Size(111, 24);
+ this.dateTimePickerStartTime_MR.TabIndex = 15;
//
// label12
//
@@ -721,48 +775,28 @@
this.label12.Size = new System.Drawing.Size(64, 32);
this.label12.TabIndex = 16;
this.label12.Text = "~";
- this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
- // dateTimePicker2
+ // dateTimePickerEndTime_MR
//
- this.dateTimePicker2.CalendarFont = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
- this.dateTimePicker2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.dateTimePicker2.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
- this.dateTimePicker2.Location = new System.Drawing.Point(447, 35);
- this.dateTimePicker2.Name = "dateTimePicker2";
- this.dateTimePicker2.Size = new System.Drawing.Size(111, 24);
- this.dateTimePicker2.TabIndex = 17;
+ this.dateTimePickerEndTime_MR.CalendarFont = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.dateTimePickerEndTime_MR.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dateTimePickerEndTime_MR.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.dateTimePickerEndTime_MR.Location = new System.Drawing.Point(447, 35);
+ this.dateTimePickerEndTime_MR.Name = "dateTimePickerEndTime_MR";
+ this.dateTimePickerEndTime_MR.Size = new System.Drawing.Size(111, 24);
+ this.dateTimePickerEndTime_MR.TabIndex = 17;
//
- // buttonQuery_MR
+ // panel3
//
- this.buttonQuery_MR.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonQuery_MR.Location = new System.Drawing.Point(110, -1);
- this.buttonQuery_MR.Name = "buttonQuery_MR";
- this.buttonQuery_MR.Size = new System.Drawing.Size(75, 26);
- this.buttonQuery_MR.TabIndex = 18;
- this.buttonQuery_MR.Text = "鏌ヨ";
- this.buttonQuery_MR.UseVisualStyleBackColor = true;
- //
- // comboBoxMeasurementType_MR
- //
- this.comboBoxMeasurementType_MR.Dock = System.Windows.Forms.DockStyle.Fill;
- this.comboBoxMeasurementType_MR.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
- this.comboBoxMeasurementType_MR.FormattingEnabled = true;
- this.comboBoxMeasurementType_MR.Location = new System.Drawing.Point(73, 35);
- this.comboBoxMeasurementType_MR.Name = "comboBoxMeasurementType_MR";
- this.comboBoxMeasurementType_MR.Size = new System.Drawing.Size(111, 25);
- this.comboBoxMeasurementType_MR.TabIndex = 19;
- //
- // labelTotal_MR
- //
- this.labelTotal_MR.AutoSize = true;
- this.labelTotal_MR.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
- this.labelTotal_MR.Location = new System.Drawing.Point(0, 3);
- this.labelTotal_MR.Name = "labelTotal_MR";
- this.labelTotal_MR.Size = new System.Drawing.Size(97, 17);
- this.labelTotal_MR.TabIndex = 3;
- this.labelTotal_MR.Text = "鏁伴噺锛氭�婚〉鏁�:";
+ this.tableLayoutPanel4.SetColumnSpan(this.panel3, 2);
+ this.panel3.Controls.Add(this.buttonExport_MR);
+ this.panel3.Controls.Add(this.buttonQuery_MR);
+ this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel3.Location = new System.Drawing.Point(564, 35);
+ this.panel3.Name = "panel3";
+ this.panel3.Size = new System.Drawing.Size(184, 26);
+ this.panel3.TabIndex = 20;
//
// buttonExport_MR
//
@@ -775,16 +809,81 @@
this.buttonExport_MR.Text = "瀵煎嚭";
this.buttonExport_MR.UseVisualStyleBackColor = true;
//
- // panel3
+ // buttonQuery_MR
//
- this.tableLayoutPanel4.SetColumnSpan(this.panel3, 2);
- this.panel3.Controls.Add(this.buttonExport_MR);
- this.panel3.Controls.Add(this.buttonQuery_MR);
- this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel3.Location = new System.Drawing.Point(564, 35);
- this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(184, 26);
- this.panel3.TabIndex = 20;
+ this.buttonQuery_MR.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonQuery_MR.Location = new System.Drawing.Point(110, -1);
+ this.buttonQuery_MR.Name = "buttonQuery_MR";
+ this.buttonQuery_MR.Size = new System.Drawing.Size(75, 26);
+ this.buttonQuery_MR.TabIndex = 18;
+ this.buttonQuery_MR.Text = "鏌ヨ";
+ this.buttonQuery_MR.UseVisualStyleBackColor = true;
+ this.buttonQuery_MR.Click += new System.EventHandler(this.buttonQuery_MR_Click);
+ //
+ // ProductionCode
+ //
+ this.ProductionCode.DataPropertyName = "ProductionCode";
+ this.ProductionCode.HeaderText = "浜у搧缂栫爜";
+ this.ProductionCode.Name = "ProductionCode";
+ this.ProductionCode.ReadOnly = true;
+ //
+ // ProductionBarcode
+ //
+ this.ProductionBarcode.DataPropertyName = "ProductionBarcode";
+ this.ProductionBarcode.HeaderText = "浜у搧鏉$爜";
+ this.ProductionBarcode.Name = "ProductionBarcode";
+ this.ProductionBarcode.ReadOnly = true;
+ //
+ // MeasurementName
+ //
+ this.MeasurementName.DataPropertyName = "MeasurementName";
+ this.MeasurementName.HeaderText = "妫�娴嬪悕绉�";
+ this.MeasurementName.Name = "MeasurementName";
+ this.MeasurementName.ReadOnly = true;
+ //
+ // MeasurementType
+ //
+ this.MeasurementType.DataPropertyName = "MeasurementType";
+ this.MeasurementType.HeaderText = "妫�娴嬬被鍨�";
+ this.MeasurementType.Name = "MeasurementType";
+ this.MeasurementType.ReadOnly = true;
+ //
+ // MeasurementValue
+ //
+ this.MeasurementValue.DataPropertyName = "MeasurementValue";
+ this.MeasurementValue.HeaderText = "妫�娴嬪��";
+ this.MeasurementValue.Name = "MeasurementValue";
+ this.MeasurementValue.ReadOnly = true;
+ //
+ // MeasurementResult
+ //
+ this.MeasurementResult.DataPropertyName = "MeasurementResult";
+ this.MeasurementResult.HeaderText = "妫�娴嬬粨鏋�";
+ this.MeasurementResult.Name = "MeasurementResult";
+ this.MeasurementResult.ReadOnly = true;
+ //
+ // OperationStartTime
+ //
+ this.OperationStartTime.DataPropertyName = "OperationStartTime";
+ dataGridViewCellStyle3.Format = "G";
+ dataGridViewCellStyle3.NullValue = null;
+ this.OperationStartTime.DefaultCellStyle = dataGridViewCellStyle3;
+ this.OperationStartTime.HeaderText = "鐢熶骇鏃堕棿(寮�濮�)";
+ this.OperationStartTime.Name = "OperationStartTime";
+ this.OperationStartTime.ReadOnly = true;
+ this.OperationStartTime.Width = 120;
+ //
+ // OperationEndTime
+ //
+ this.OperationEndTime.DataPropertyName = "OperationEndTime";
+ dataGridViewCellStyle4.Format = "G";
+ dataGridViewCellStyle4.NullValue = null;
+ this.OperationEndTime.DefaultCellStyle = dataGridViewCellStyle4;
+ this.OperationEndTime.HeaderText = "鐢熶骇鏃堕棿(缁撴潫)";
+ this.OperationEndTime.Name = "OperationEndTime";
+ this.OperationEndTime.ReadOnly = true;
+ this.OperationEndTime.Width = 120;
//
// M071_DataForm
//
@@ -833,11 +932,11 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Panel panel2;
- private System.Windows.Forms.TextBox textBox2;
- private System.Windows.Forms.Button button5;
- private System.Windows.Forms.Button button6;
- private System.Windows.Forms.Button button7;
- private System.Windows.Forms.Button button8;
+ private System.Windows.Forms.TextBox textBoxPageNum_MR;
+ private System.Windows.Forms.Button buttonToLastPage_MR;
+ private System.Windows.Forms.Button buttonToNextPage_MR;
+ private System.Windows.Forms.Button buttonToBeforePage_MR;
+ private System.Windows.Forms.Button buttonToFirstPage_MR;
private System.Windows.Forms.DataGridView dataGridView2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.Button buttonQuery;
@@ -866,13 +965,21 @@
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox textBoxMeasurementName_MR;
private System.Windows.Forms.Label label11;
- private System.Windows.Forms.DateTimePicker dateTimePicker1;
+ private System.Windows.Forms.DateTimePicker dateTimePickerStartTime_MR;
private System.Windows.Forms.Label label12;
- private System.Windows.Forms.DateTimePicker dateTimePicker2;
+ private System.Windows.Forms.DateTimePicker dateTimePickerEndTime_MR;
private System.Windows.Forms.Button buttonQuery_MR;
private System.Windows.Forms.ComboBox comboBoxMeasurementType_MR;
private System.Windows.Forms.Label labelTotal_MR;
private System.Windows.Forms.Button buttonExport_MR;
private System.Windows.Forms.Panel panel3;
+ private System.Windows.Forms.DataGridViewTextBoxColumn ProductionCode;
+ private System.Windows.Forms.DataGridViewTextBoxColumn ProductionBarcode;
+ private System.Windows.Forms.DataGridViewTextBoxColumn MeasurementName;
+ private System.Windows.Forms.DataGridViewTextBoxColumn MeasurementType;
+ private System.Windows.Forms.DataGridViewTextBoxColumn MeasurementValue;
+ private System.Windows.Forms.DataGridViewTextBoxColumn MeasurementResult;
+ private System.Windows.Forms.DataGridViewTextBoxColumn OperationStartTime;
+ private System.Windows.Forms.DataGridViewTextBoxColumn OperationEndTime;
}
}
\ No newline at end of file
diff --git a/src/Bro.M071.Process/UI/M071_DataForm.cs b/src/Bro.M071.Process/UI/M071_DataForm.cs
index e4ec30c..213b464 100644
--- a/src/Bro.M071.Process/UI/M071_DataForm.cs
+++ b/src/Bro.M071.Process/UI/M071_DataForm.cs
@@ -17,6 +17,7 @@
public partial class M071_DataForm : MenuFrmBase
{
public ProductionMeasurementRecordsManager _productionMeasurementRecordsManager = new ProductionMeasurementRecordsManager();
+ public MeasurementUnitResultManager _measurementUnitResultManager = new MeasurementUnitResultManager();
public M071_DataForm()
{
InitializeComponent();
@@ -51,9 +52,29 @@
#region 娴嬮噺缁撴灉
private void InitialMeasurementResultLayout()
{
+ comboBoxResult_MR.DataSource = new List<string>() { "", "OK", "NG" };
+ comboBoxMeasurementType_MR.DataSource = new List<string>() { "", "Slant", "HeightAlignment", "FullRowHeightAlignment" };
+ }
+ private void buttonQuery_MR_Click(object sender, EventArgs e)
+ {
+ MeasurementUnitResultRequest recordsRequest = new MeasurementUnitResultRequest();
+ recordsRequest.ProductionCode = textBoxPCode_MR.Text;
+ recordsRequest.ProductionBarcode = textBoxtextBoxPBarCode_MR.Text;
+ recordsRequest.MeasurementName = textBoxMeasurementName_MR.Text;
+ recordsRequest.MeasurementType = comboBoxMeasurementType_MR.SelectedItem?.ToString();
+ recordsRequest.MeasurementResult = comboBoxResult_MR.SelectedItem?.ToString();
+ recordsRequest.StartTime = Convert.ToDateTime(dateTimePickerStartTime_MR.Value.ToString("D").ToString());
+ recordsRequest.EndTime = Convert.ToDateTime(dateTimePickerEndTime_MR.Value.AddDays(1).ToString("D").ToString()).AddSeconds(-1);
+
+ var queryData = _measurementUnitResultManager.GetMeasurementUnitResult(recordsRequest);
+ dataGridView2.AutoGenerateColumns = false;
+ dataGridView2.DataSource = queryData;
+ labelTotal_MR.Text = $"鏁伴噺:{recordsRequest.TotalNum} 鎬婚〉鏁�:{recordsRequest.TotalPage}";
+ textBoxPageNum_MR.Text = recordsRequest.PageNum.ToString();
}
#endregion
+
}
}
diff --git a/src/Bro.M071.Process/UI/M071_DataForm.resx b/src/Bro.M071.Process/UI/M071_DataForm.resx
index 859499d..899b2a9 100644
--- a/src/Bro.M071.Process/UI/M071_DataForm.resx
+++ b/src/Bro.M071.Process/UI/M071_DataForm.resx
@@ -132,19 +132,28 @@
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <metadata name="ProductionCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <metadata name="ProductionBarcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <metadata name="MeasurementName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <metadata name="MeasurementType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <metadata name="MeasurementValue.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="MeasurementResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="OperationStartTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="OperationEndTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
\ No newline at end of file
--
Gitblit v1.8.0