Forráskód Böngészése

修正 条码打印机(PDA用)/条码打印模板 打印类型 不允许为空(添加、编辑)

xuwei 6 éve
szülő
commit
088428be40

+ 20 - 11
DK.Client/Client.Controls/Layout/F_MST_012002.cs

@@ -226,17 +226,26 @@ namespace Dongke.IBOSS.PRD.Client.Controls
 					return;
 				}
 
-				//// 判断票据类型输入是否正确
-				//if (this.ftcLogo.SelectedValue == null)
-				//{
-				//    MessageBox.Show(string.Format("{0}是必须输入项目,请输入{0}。", "产品商标"), this.Text,
-				//                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
-				//    this.ftcLogo.Focus();
-				//    return;
-				//}
-
-				// 判断票据名称输入是否正确
-				if (string.IsNullOrEmpty(this.txtInvoiceName.Text.Trim()))
+                //xuwei add 2019-11-26
+                if ("".Equals(this.ddlPrintType.Text.Trim()))
+                {
+                    MessageBox.Show(string.Format("{0}是必须输入项目,请输入{0}。", "打印类型"), this.Text,
+                                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    this.ddlPrintType.Focus();
+                    return;
+                }
+
+                //// 判断票据类型输入是否正确
+                //if (this.ftcLogo.SelectedValue == null)
+                //{
+                //    MessageBox.Show(string.Format("{0}是必须输入项目,请输入{0}。", "产品商标"), this.Text,
+                //                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                //    this.ftcLogo.Focus();
+                //    return;
+                //}
+
+                // 判断票据名称输入是否正确
+                if (string.IsNullOrEmpty(this.txtInvoiceName.Text.Trim()))
 				{
 					MessageBox.Show(string.Format("{0}是必须输入项目,请输入{0}。", "模板名称"), this.Text,
 														MessageBoxButtons.OK, MessageBoxIcon.Warning);

+ 20 - 11
DK.Client/Client.Controls/Layout/F_MST_012004.cs

@@ -260,17 +260,26 @@ namespace Dongke.IBOSS.PRD.Client.Controls
 					return;
 				}
 
-				//// 判断票据类型输入是否正确
-				//if (this.ftcLogo.SelectedValue == null)
-				//{
-				//    MessageBox.Show(string.Format("{0}是必须输入项目,请输入{0}。", "产品商标"), this.Text,
-				//                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
-				//    this.ftcLogo.Focus();
-				//    return;
-				//}
-
-				// 判断票据名称输入是否正确
-				if (string.IsNullOrEmpty(this.txtInvoiceName.Text.Trim()))
+                //xuwei add 2019-11-26
+                if ("".Equals(this.ddlPrintType.Text.Trim()))
+                {
+                    MessageBox.Show(string.Format("{0}是必须输入项目,请输入{0}。", "打印类型"), this.Text,
+                                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    this.ddlPrintType.Focus();
+                    return;
+                }
+
+                //// 判断票据类型输入是否正确
+                //if (this.ftcLogo.SelectedValue == null)
+                //{
+                //    MessageBox.Show(string.Format("{0}是必须输入项目,请输入{0}。", "产品商标"), this.Text,
+                //                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                //    this.ftcLogo.Focus();
+                //    return;
+                //}
+
+                // 判断票据名称输入是否正确
+                if (string.IsNullOrEmpty(this.txtInvoiceName.Text.Trim()))
 				{
 					MessageBox.Show(string.Format("{0}是必须输入项目,请输入{0}。", "模板名称"), this.Text,
 														MessageBoxButtons.OK, MessageBoxIcon.Warning);

+ 11 - 0
DK.Client/SystemModule/F_MST_0412.cs

@@ -331,6 +331,16 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
                         this.btnSave.Enabled = false;
                         return;
                     }
+                    // 判断打印类型不能为空 xuwei add 2019-11-26
+                    if (row.Cells["PrinterName"].Value == null
+                        || string.IsNullOrEmpty(row.Cells["PrintType"].Value + string.Empty))
+                    {
+                        // 单元格的错误消息
+                        this.dgvPrinter.CurrentRow.ErrorText = string.Format(Messages.MSG_CMN_W005, "打印类型");
+                        e.Cancel = true;
+                        this.btnSave.Enabled = false;
+                        return;
+                    }
                     // 清除单元格的错误消息
                     this.dgvPrinter.CurrentRow.ErrorText = string.Empty;
                 }
@@ -419,6 +429,7 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
                     this.btnSave.Enabled = false;
                     return;
                 }
+
                 // 异步处理
                 this.btnSave.Enabled = false;
                 this.btnCancel.Enabled = false;