Browse Source

1.卸货点 增加多个地点代码

2.LAB解析时更新地点、地点代码的校验逻辑
master
hao.jin 3 years ago
parent
commit
17658ca65d
  1. 5
      Stone.WinForm/Stone.WinBiz/BasicData/F_Location.cs
  2. 2
      Stone.WinForm/Stone.WinBiz/JISAdmin/F_EDI_JIS5000Sequence.cs
  3. 5
      Stone.WinForm/Stone.WinModule/BasicData/frmLocation.cs
  4. 121
      Stone.WinForm/Stone.WinModule/BasicData/frmLocationDetail.Designer.cs
  5. 12
      Stone.WinForm/Stone.WinModule/BasicData/frmLocationDetail.cs
  6. 7
      Stone.WinForm/Stone.WinService/frmTest.cs

5
Stone.WinForm/Stone.WinBiz/BasicData/F_Location.cs

@ -26,7 +26,10 @@ namespace Stone.WinBiz.BasicData
dgv.Columns["Address1"].HeaderText = "地址1";
dgv.Columns["Address2"].HeaderText = "地址2";
dgv.Columns["Address3"].HeaderText = "地址3";
dgv.Columns["LocCode"].HeaderText = "卸货点代码";
dgv.Columns["LocCode1"].HeaderText = "卸货点代码1";
dgv.Columns["LocCode2"].HeaderText = "卸货点代码2";
dgv.Columns["LocCode3"].HeaderText = "卸货点代码3";
dgv.Columns["LocCode4"].HeaderText = "卸货点代码4";
dgv.Columns["State"].HeaderText = "状态";
}

2
Stone.WinForm/Stone.WinBiz/JISAdmin/F_EDI_JIS5000Sequence.cs

@ -295,7 +295,7 @@ namespace Stone.WinBiz.JISAdmin
//校验卸货点、卸货点代码是否匹配
strsql = "select top 1 * from t_Location" +
" where Code = '" + location + "'" +
" and LocCode = '" + LocationCode + "'" +
" and (LocCode1 = '" + LocationCode + "' or LocCode2 = '" + LocationCode + "' or LocCode3 = '" + LocationCode + "' or LocCode4 = '" + LocationCode + "')"+
" order by id desc";
dsLoc = db.Exec_DataSet(strsql);
if (dsLoc.Tables[0].Rows.Count == 0)

5
Stone.WinForm/Stone.WinModule/BasicData/frmLocation.cs

@ -23,7 +23,10 @@ namespace Stone.WinModule.BasicData
strWhere += " or [Address1] like '%" + code + "%'";
strWhere += " or [Address2] like '%" + code + "%'";
strWhere += " or [Address3] like '%" + code + "%'";
strWhere += " or [LocCode] like '%" + code + "%'";
strWhere += " or [LocCode1] like '%" + code + "%'";
strWhere += " or [LocCode2] like '%" + code + "%'";
strWhere += " or [LocCode3] like '%" + code + "%'";
strWhere += " or [LocCode4] like '%" + code + "%'";
}
}
}

121
Stone.WinForm/Stone.WinModule/BasicData/frmLocationDetail.Designer.cs

@ -39,23 +39,29 @@
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.cbState = new System.Windows.Forms.CheckBox();
this.txtLocCode = new System.Windows.Forms.TextBox();
this.txtLocCode1 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtLocCode2 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.txtLocCode3 = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.txtLocCode4 = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// btnAddNewLine
//
this.btnAddNewLine.Location = new System.Drawing.Point(62, 320);
this.btnAddNewLine.Location = new System.Drawing.Point(62, 449);
this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(6);
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(381, 320);
this.btnClose.Location = new System.Drawing.Point(381, 449);
this.btnClose.Margin = new System.Windows.Forms.Padding(6);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(250, 320);
this.btnOK.Location = new System.Drawing.Point(250, 449);
this.btnOK.Margin = new System.Windows.Forms.Padding(6);
//
// txtAddress2
@ -137,7 +143,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(88, 283);
this.label5.Location = new System.Drawing.Point(88, 417);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(62, 18);
@ -149,37 +155,100 @@
this.cbState.AutoSize = true;
this.cbState.Checked = true;
this.cbState.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbState.Location = new System.Drawing.Point(170, 282);
this.cbState.Location = new System.Drawing.Point(170, 416);
this.cbState.Name = "cbState";
this.cbState.Size = new System.Drawing.Size(70, 22);
this.cbState.TabIndex = 116;
this.cbState.Text = "启用";
this.cbState.UseVisualStyleBackColor = true;
//
// txtLocCode
// txtLocCode1
//
this.txtLocCode.Location = new System.Drawing.Point(172, 246);
this.txtLocCode.Margin = new System.Windows.Forms.Padding(4);
this.txtLocCode.MaxLength = 200;
this.txtLocCode.Name = "txtLocCode";
this.txtLocCode.Size = new System.Drawing.Size(331, 28);
this.txtLocCode.TabIndex = 117;
this.txtLocCode1.Location = new System.Drawing.Point(172, 246);
this.txtLocCode1.Margin = new System.Windows.Forms.Padding(4);
this.txtLocCode1.MaxLength = 200;
this.txtLocCode1.Name = "txtLocCode1";
this.txtLocCode1.Size = new System.Drawing.Size(331, 28);
this.txtLocCode1.TabIndex = 117;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(41, 247);
this.label6.Location = new System.Drawing.Point(32, 247);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(116, 18);
this.label6.Size = new System.Drawing.Size(125, 18);
this.label6.TabIndex = 118;
this.label6.Text = "卸货点代码:";
this.label6.Text = "卸货点代码1:";
//
// txtLocCode2
//
this.txtLocCode2.Location = new System.Drawing.Point(170, 289);
this.txtLocCode2.Margin = new System.Windows.Forms.Padding(4);
this.txtLocCode2.MaxLength = 200;
this.txtLocCode2.Name = "txtLocCode2";
this.txtLocCode2.Size = new System.Drawing.Size(331, 28);
this.txtLocCode2.TabIndex = 119;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(32, 290);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(125, 18);
this.label7.TabIndex = 120;
this.label7.Text = "卸货点代码2:";
//
// txtLocCode3
//
this.txtLocCode3.Location = new System.Drawing.Point(172, 331);
this.txtLocCode3.Margin = new System.Windows.Forms.Padding(4);
this.txtLocCode3.MaxLength = 200;
this.txtLocCode3.Name = "txtLocCode3";
this.txtLocCode3.Size = new System.Drawing.Size(331, 28);
this.txtLocCode3.TabIndex = 121;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(32, 334);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(125, 18);
this.label8.TabIndex = 122;
this.label8.Text = "卸货点代码3:";
//
// txtLocCode4
//
this.txtLocCode4.Location = new System.Drawing.Point(172, 372);
this.txtLocCode4.Margin = new System.Windows.Forms.Padding(4);
this.txtLocCode4.MaxLength = 200;
this.txtLocCode4.Name = "txtLocCode4";
this.txtLocCode4.Size = new System.Drawing.Size(331, 28);
this.txtLocCode4.TabIndex = 123;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(32, 382);
this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(125, 18);
this.label9.TabIndex = 124;
this.label9.Text = "卸货点代码4:";
//
// frmLocationDetail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.ClientSize = new System.Drawing.Size(572, 416);
this.Controls.Add(this.txtLocCode);
this.ClientSize = new System.Drawing.Size(572, 531);
this.Controls.Add(this.txtLocCode4);
this.Controls.Add(this.label9);
this.Controls.Add(this.txtLocCode3);
this.Controls.Add(this.label8);
this.Controls.Add(this.txtLocCode2);
this.Controls.Add(this.label7);
this.Controls.Add(this.txtLocCode1);
this.Controls.Add(this.label6);
this.Controls.Add(this.cbState);
this.Controls.Add(this.label5);
@ -208,7 +277,13 @@
this.Controls.SetChildIndex(this.label5, 0);
this.Controls.SetChildIndex(this.cbState, 0);
this.Controls.SetChildIndex(this.label6, 0);
this.Controls.SetChildIndex(this.txtLocCode, 0);
this.Controls.SetChildIndex(this.txtLocCode1, 0);
this.Controls.SetChildIndex(this.label7, 0);
this.Controls.SetChildIndex(this.txtLocCode2, 0);
this.Controls.SetChildIndex(this.label8, 0);
this.Controls.SetChildIndex(this.txtLocCode3, 0);
this.Controls.SetChildIndex(this.label9, 0);
this.Controls.SetChildIndex(this.txtLocCode4, 0);
this.ResumeLayout(false);
this.PerformLayout();
@ -227,7 +302,13 @@
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox cbState;
private System.Windows.Forms.TextBox txtLocCode;
private System.Windows.Forms.TextBox txtLocCode1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtLocCode2;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtLocCode3;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtLocCode4;
private System.Windows.Forms.Label label9;
}
}

12
Stone.WinForm/Stone.WinModule/BasicData/frmLocationDetail.cs

@ -33,7 +33,10 @@ namespace Stone.WinModule.BasicData
drData["Address1"] = MyStrings.GetString(this.txtAddress1.Text.Trim());
drData["Address2"] = MyStrings.GetString(this.txtAddress2.Text.Trim());
drData["Address3"] = MyStrings.GetString(this.txtAddress3.Text.Trim());
drData["LocCode"] = MyStrings.GetString(this.txtLocCode.Text.Trim());
drData["LocCode1"] = MyStrings.GetString(this.txtLocCode1.Text.Trim());
drData["LocCode2"] = MyStrings.GetString(this.txtLocCode2.Text.Trim());
drData["LocCode3"] = MyStrings.GetString(this.txtLocCode3.Text.Trim());
drData["LocCode4"] = MyStrings.GetString(this.txtLocCode4.Text.Trim());
if (cbState.Checked)
{
drData["State"] = "1";
@ -57,7 +60,10 @@ namespace Stone.WinModule.BasicData
this.txtAddress1.Text = drData["Address1"].ToString();
this.txtAddress2.Text = drData["Address2"].ToString();
this.txtAddress3.Text = drData["Address3"].ToString();
this.txtLocCode.Text = drData["LocCode"].ToString();
this.txtLocCode1.Text = drData["LocCode1"].ToString();
this.txtLocCode2.Text = drData["LocCode2"].ToString();
this.txtLocCode3.Text = drData["LocCode3"].ToString();
this.txtLocCode4.Text = drData["LocCode4"].ToString();
var strState = drData["State"].ToString();
if (strState == "1")
{
@ -79,7 +85,7 @@ namespace Stone.WinModule.BasicData
this.txtAddress1.Text = "";
this.txtAddress2.Text = "";
this.txtAddress3.Text = "";
this.txtLocCode.Text = "";
this.txtLocCode1.Text = "";
cbState.Checked = true;
this.txtCode.Focus();

7
Stone.WinForm/Stone.WinService/frmTest.cs

@ -26,13 +26,14 @@ namespace Stone.WinService
{
try
{
// F_Mail.Send(" 处理失败,原因为:测你玩" );
LocalDBService.m_conn = MyAppconfig.ReadValue("LocalDB");
F_EDI_JIS5000Sequence.IsRun = true;
F_EDI_JIS5000Sequence.Run();
MyLogger.Write("服务启动成功!");
MyMessageBox.ShowInfoMessage("服务启动成功");
}
catch (Exception ex)

Loading…
Cancel
Save