diff --git a/BO/Utils/AfterLoginUtil.cs b/BO/Utils/AfterLoginUtil.cs index 45ff802..71fb283 100644 --- a/BO/Utils/AfterLoginUtil.cs +++ b/BO/Utils/AfterLoginUtil.cs @@ -19,14 +19,24 @@ namespace BO.Utils public static class AfterLoginUtil { +// static List> roleToAssemblies = new List>() +// { +// new Tuple("排宰员",@"C:\B3\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), +// new Tuple("过磅员",@"C:\B3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), +// new Tuple("验质员",@"C:\B3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), +// new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), +// new Tuple("窒晕员",@"C:\B3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), +//// new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\CarcassStateWeight\bin\Debug\CarcassStateWeight") +// }; + static List> roleToAssemblies = new List>() { - new Tuple("排宰员",@"C:\B3\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), - new Tuple("过磅员",@"C:\B3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), - new Tuple("验质员",@"C:\B3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), - //new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), - new Tuple("窒晕员",@"C:\B3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), - new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\CarcassStateWeight\bin\Debug\CarcassStateWeight") + new Tuple("排宰员",@"\ButcherOrder"), + new Tuple("过磅员",@"ButcherWeight"), + new Tuple("验质员",@"QualityAndOrder"), + new Tuple("定级员",@"WeighAndGrading"), + new Tuple("窒晕员",@"OrderConfirm"), +// new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\CarcassStateWeight\bin\Debug\CarcassStateWeight") }; @@ -37,10 +47,10 @@ namespace BO.Utils if (first == null) throw new Exception("未注册的角色"); //#if debug - var filePath = string.Format("{0}.dll", first.Item2); +// var filePath = string.Format("{0}.dll", first.Item2); //#endif //#if !debug - //var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2)); + var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2)); //#endif if (!File.Exists(filePath)) throw new Exception("相关模块不存在"); diff --git a/BO/Utils/BillRpc/GradeAndWeightRpc.cs b/BO/Utils/BillRpc/GradeAndWeightRpc.cs index 29b2ee4..6ceb7e5 100644 --- a/BO/Utils/BillRpc/GradeAndWeightRpc.cs +++ b/BO/Utils/BillRpc/GradeAndWeightRpc.cs @@ -94,7 +94,7 @@ namespace BO.Utils.BillRpc public static BindingList GetDetails(DateTime date, int top = 15) { var bindList = new BindingList(); -// var bindList=new BlockingCollection(); + // var bindList=new BlockingCollection(); var list = new List(); var query = new DmoQuery(typeof(GradeAndWeight_Detail)); @@ -135,6 +135,17 @@ namespace BO.Utils.BillRpc return Convert.ToInt32(session.ExecuteScalar(query)); } } + public static decimal GetSumWeight(DateTime date) + { + var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail))); + query.Where.Conditions.Add(DQCondition.EQ("Date", date)); + + query.Columns.Add(DQSelectColumn.Sum("Weight")); + using (var session = LocalDmoSession.New()) + { + return Convert.ToDecimal(session.ExecuteScalar(query)); + } + } public static List GetLostWeightDetails(DateTime date) @@ -231,7 +242,7 @@ namespace BO.Utils.BillRpc { using (var session = LocalDmoSession.New()) { - var record = new WeightData {Weight = weight, Time = DateTime.Now}; + var record = new WeightData { Weight = weight, Time = DateTime.Now }; session.Insert(record); session.Commit(); } diff --git a/WeighAndGrading/AbnormalModifyForm.Designer.cs b/WeighAndGrading/AbnormalModifyForm.Designer.cs index 305fe8d..940d8a8 100644 --- a/WeighAndGrading/AbnormalModifyForm.Designer.cs +++ b/WeighAndGrading/AbnormalModifyForm.Designer.cs @@ -28,11 +28,11 @@ /// 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 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(); this.panel4 = new System.Windows.Forms.Panel(); this.button1 = new System.Windows.Forms.Button(); this.flpKeyPanel = new System.Windows.Forms.FlowLayoutPanel(); @@ -44,6 +44,16 @@ this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.label1 = new System.Windows.Forms.Label(); + this.lblPaiZaiTT = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.lblPaiZaiMB = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.lblWeightTT = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.lblWeightMB = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.lblWeightWeight = new System.Windows.Forms.Label(); this.panel4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit(); this.SuspendLayout(); @@ -55,13 +65,13 @@ this.panel4.Controls.Add(this.flpKeyPanel); this.panel4.Location = new System.Drawing.Point(504, 13); this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(454, 572); + this.panel4.Size = new System.Drawing.Size(454, 510); this.panel4.TabIndex = 61; // // button1 // this.button1.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(150, 499); + this.button1.Location = new System.Drawing.Point(161, 434); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(129, 54); this.button1.TabIndex = 45; @@ -83,17 +93,17 @@ this.uDataGridView1.AllowUserToDeleteRows = false; this.uDataGridView1.AllowUserToResizeColumns = false; this.uDataGridView1.AllowUserToResizeRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; this.uDataGridView1.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.H_SID, @@ -108,13 +118,13 @@ this.uDataGridView1.Name = "uDataGridView1"; this.uDataGridView1.ReadOnly = true; this.uDataGridView1.RowHeadersVisible = false; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle10; this.uDataGridView1.RowTemplate.Height = 40; this.uDataGridView1.ScrollBars = System.Windows.Forms.ScrollBars.None; this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.uDataGridView1.Size = new System.Drawing.Size(423, 566); + this.uDataGridView1.Size = new System.Drawing.Size(423, 511); this.uDataGridView1.TabIndex = 44; this.uDataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.uDataGridView1_CellClick); // @@ -160,8 +170,8 @@ // H_Weight // this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle3.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle8.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle8; this.H_Weight.HeaderText = "重量"; this.H_Weight.Name = "H_Weight"; this.H_Weight.ReadOnly = true; @@ -170,18 +180,123 @@ // H_Time // this.H_Time.DataPropertyName = "Time"; - dataGridViewCellStyle4.Format = "HH:mm:ss"; - dataGridViewCellStyle4.NullValue = null; - this.H_Time.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle9.Format = "HH:mm:ss"; + dataGridViewCellStyle9.NullValue = null; + this.H_Time.DefaultCellStyle = dataGridViewCellStyle9; this.H_Time.HeaderText = "时间"; this.H_Time.Name = "H_Time"; this.H_Time.ReadOnly = true; // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(39, 547); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(76, 22); + this.label1.TabIndex = 62; + this.label1.Text = "烫褪:"; + // + // lblPaiZaiTT + // + this.lblPaiZaiTT.AutoSize = true; + this.lblPaiZaiTT.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblPaiZaiTT.Location = new System.Drawing.Point(105, 547); + this.lblPaiZaiTT.Name = "lblPaiZaiTT"; + this.lblPaiZaiTT.Size = new System.Drawing.Size(0, 22); + this.lblPaiZaiTT.TabIndex = 62; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(198, 547); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(76, 22); + this.label3.TabIndex = 62; + this.label3.Text = "毛剥:"; + // + // lblPaiZaiMB + // + this.lblPaiZaiMB.AutoSize = true; + this.lblPaiZaiMB.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblPaiZaiMB.Location = new System.Drawing.Point(266, 547); + this.lblPaiZaiMB.Name = "lblPaiZaiMB"; + this.lblPaiZaiMB.Size = new System.Drawing.Size(0, 22); + this.lblPaiZaiMB.TabIndex = 62; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(502, 547); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(76, 22); + this.label5.TabIndex = 62; + this.label5.Text = "烫褪:"; + // + // lblWeightTT + // + this.lblWeightTT.AutoSize = true; + this.lblWeightTT.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblWeightTT.Location = new System.Drawing.Point(566, 547); + this.lblWeightTT.Name = "lblWeightTT"; + this.lblWeightTT.Size = new System.Drawing.Size(0, 22); + this.lblWeightTT.TabIndex = 62; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(641, 547); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(76, 22); + this.label7.TabIndex = 62; + this.label7.Text = "毛剥:"; + // + // lblWeightMB + // + this.lblWeightMB.AutoSize = true; + this.lblWeightMB.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblWeightMB.Location = new System.Drawing.Point(707, 547); + this.lblWeightMB.Name = "lblWeightMB"; + this.lblWeightMB.Size = new System.Drawing.Size(0, 22); + this.lblWeightMB.TabIndex = 62; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(778, 547); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(76, 22); + this.label9.TabIndex = 62; + this.label9.Text = "重量:"; + // + // lblWeightWeight + // + this.lblWeightWeight.AutoSize = true; + this.lblWeightWeight.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblWeightWeight.Location = new System.Drawing.Point(855, 547); + this.lblWeightWeight.Name = "lblWeightWeight"; + this.lblWeightWeight.Size = new System.Drawing.Size(0, 22); + this.lblWeightWeight.TabIndex = 62; + // // AbnormalModifyForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(970, 590); + this.Controls.Add(this.lblWeightWeight); + this.Controls.Add(this.label9); + this.Controls.Add(this.lblWeightMB); + this.Controls.Add(this.label7); + this.Controls.Add(this.lblPaiZaiMB); + this.Controls.Add(this.lblWeightTT); + this.Controls.Add(this.label3); + this.Controls.Add(this.label5); + this.Controls.Add(this.lblPaiZaiTT); + this.Controls.Add(this.label1); this.Controls.Add(this.uDataGridView1); this.Controls.Add(this.panel4); this.MaximizeBox = false; @@ -192,6 +307,7 @@ this.panel4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -207,5 +323,15 @@ private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name; private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; private System.Windows.Forms.DataGridViewTextBoxColumn H_Time; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lblPaiZaiTT; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label lblPaiZaiMB; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label lblWeightTT; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label lblWeightMB; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label lblWeightWeight; } } \ No newline at end of file diff --git a/WeighAndGrading/AbnormalModifyForm.cs b/WeighAndGrading/AbnormalModifyForm.cs index 9b85a99..d7fc67b 100644 --- a/WeighAndGrading/AbnormalModifyForm.cs +++ b/WeighAndGrading/AbnormalModifyForm.cs @@ -17,7 +17,7 @@ namespace WeighAndGrading List details; private DateTime mDate; - GradeAndWeight_Detail mCurrentSlectItem; + GradeAndWeight_Detail mCurrentSlectItem; public AbnormalModifyForm(DateTime date) { InitializeComponent(); @@ -25,7 +25,7 @@ namespace WeighAndGrading uDataGridView1.AutoGenerateColumns = false; } - + private void AbnormalModifyForm_Load(object sender, EventArgs e) { BindGridView(); @@ -36,14 +36,38 @@ namespace WeighAndGrading var currentRow = uDataGridView1.Rows[0].DataBoundItem as GradeAndWeight_Detail; mCurrentSlectItem = currentRow; } - + + var tangtuiList = GradeAndWeightRpc.GetGradeAndWeightList(mDate, true); + var maoboList = GradeAndWeightRpc.GetGradeAndWeightList(mDate, false); + + lblPaiZaiTT.Text = tangtuiList.Sum(x => x.Number).ToString(); + lblPaiZaiMB.Text = maoboList.Sum(x => x.Number).ToString(); + + + var tangtui = LocalGradeAndWeightBL.GetTangTuiSumNumber(mDate); + var maobo = LocalGradeAndWeightBL.GetMaoBoSumNumber(mDate); + var weight = LocalGradeAndWeightBL.GetSumWeight(mDate); + + lblWeightTT.Text = tangtui.ToString(); + lblWeightMB.Text = maobo.ToString(); + lblWeightWeight.Text = weight.ToString("f2"); } private void BindGridView() { details = LocalGradeAndWeightBL.GetLostWeightDetails(mDate); if (details.Any()) + { + foreach (GradeAndWeight_Detail detail in details) + { + if (detail.Weight.HasValue && detail.Weight == 0) + { + detail.Weight = null; + } + + } uDataGridView1.DataSource = details; + } } @@ -88,14 +112,14 @@ namespace WeighAndGrading } -// private decimal? lastWeght; + // private decimal? lastWeght; private void ModifyWeight(string input) { if (mCurrentSlectItem == null) throw new Exception("请选择一条记录"); var destring = DecimalToString(mCurrentSlectItem.Weight); - var value=GetAfterNumber(destring, input); + var value = GetAfterNumber(destring, input); mCurrentSlectItem.Weight = StringToDecimal(value); uDataGridView1.Refresh(); @@ -127,7 +151,7 @@ namespace WeighAndGrading { return null; } - + } string DecimalToString(decimal? value) @@ -139,7 +163,7 @@ namespace WeighAndGrading try { - + var newvalue = value.ToString(); if (newvalue.Length > 2) { @@ -150,10 +174,10 @@ namespace WeighAndGrading return intvalue.ToString() + "."; } } - - return value.ToString()+""; + + return value.ToString() + ""; } - catch + catch { return value.ToString(); } @@ -195,7 +219,7 @@ namespace WeighAndGrading private void button1_Click(object sender, EventArgs e) { - foreach (GradeAndWeight_Detail detail in details.Where(x=>x.Weight.HasValue)) + foreach (GradeAndWeight_Detail detail in details.Where(x => x.Weight.HasValue)) { detail.IsLostWeight = false; detail.Sync = false; @@ -204,7 +228,7 @@ namespace WeighAndGrading details = LocalGradeAndWeightBL.GetLostWeightDetails(mDate); uDataGridView1.Refresh(); MessageBox.Show("保存成功"); - DialogResult=DialogResult.OK; + DialogResult = DialogResult.OK; Close(); } diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index c1683c9..7b2afa1 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -448,7 +448,11 @@ namespace WeighAndGrading { try { - maoList = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, false); + if (butcherTimeInput.Date.HasValue) + { + maoList = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, false); + } + } catch (TimeoutException) { } }