Jelajahi Sumber

产品编码的空格回车

姜永辉 1 tahun lalu
induk
melakukan
9209b7c849
2 mengubah file dengan 11 tambahan dan 6 penghapusan
  1. 8 3
      DK.Client/SystemModule/F_MST_0502.cs
  2. 3 3
      WCF.Service/WCF.Hosting/Config.ini

+ 8 - 3
DK.Client/SystemModule/F_MST_0502.cs

@@ -273,7 +273,8 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
                 if ((this.txtGoodsCode.Text != this._thisGoodsEntity.GoodsCode && _formStatus == Constant.FormMode.Edit)
 					|| this._formStatus == Constant.FormMode.Add)
 				{
-					if (ValidationCode(this.txtGoodsCode.Text) == false)
+					// 250327 产品编码的回车和空格 去除
+					if (ValidationCode(this.txtGoodsCode.Text.Trim().Replace(" ", "").Replace("\r", "").Replace("\n", "")) == false)
 					{
 						MessageBox.Show(string.Format(Messages.MSG_CMN_W006, "产品编码"), this.Text,
 							MessageBoxButtons.OK, MessageBoxIcon.Warning);
@@ -285,7 +286,8 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 				{
 					this._thisGoodsEntity = new GoodsEntity();
 				}
-				this._thisGoodsEntity.GoodsCode = this.txtGoodsCode.Text;
+				// 250327 产品编码的回车和空格 去除
+				this._thisGoodsEntity.GoodsCode = this.txtGoodsCode.Text.Trim().Replace(" ", "").Replace("\r", "").Replace("\n", "");
 				this._thisGoodsEntity.GoodsModel = this.txtGoodsModel.Text;
 				this._thisGoodsEntity.GoodsName = this.txtGoodsName.Text;
 				this._thisGoodsEntity.GoodsSpecification = this.txtGoodsSpecification.Text;
@@ -720,7 +722,10 @@ namespace Dongke.IBOSS.PRD.Client.SystemModule
 			{
 				ErrorID = 6;
 			}
-			if (this.txtGoodsCode.Text == string.Empty)
+			if (this.txtGoodsCode.Text == string.Empty 
+				|| String.IsNullOrEmpty(this.txtGoodsCode.Text.Trim())
+				|| String.IsNullOrEmpty(this.txtGoodsCode.Text.Trim().Replace(" ","").Replace("\r","").Replace("\n", ""))
+				)
 			{
 				ErrorID = 1;
 			}

+ 3 - 3
WCF.Service/WCF.Hosting/Config.ini

@@ -3,12 +3,12 @@ ServiceName=
 Description=
 
 [DBSetting]
-DBIP=10.0.8.4
+DBIP=10.0.8.2
 DBPort=1521
 #SID=ibossmes
 #DBUser=devhgcz
-SID=mestest
-DBUser=mestest
+SID=dkmes
+DBUser=mes
 DBPassword=etLHPkLTOLw=
 
 [WCFSetting]