From f97949ee8af6032c2a1573453e2c4d90eb02c698 Mon Sep 17 00:00:00 2001 From: bobwang <8205347@qq.com> Date: Fri, 22 Mar 2024 09:59:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=95=B4=E5=90=88epick?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Model.csproj | 4 + Model/wms/data/WmsDeskCustomer_Imp.cs | 69 +++ Model/wms/data/basic/WmsDeskCustomer_base.cs | 120 +++++ .../data/basic/WmsDeskCustomer_base_Imp.cs | 418 ++++++++++++++++++ Model/wms/tables/WmsDeskCustomer.cs | 73 +++ Model/wms/tables/WmsStock.cs | 2 +- WcfService1/BLL/lWmsDeskCustomer.cs | 146 ++++++ WcfService1/BLL/lWmsInRequest.cs | 2 +- WcfService1/CustomerService.svc.cs | 41 ++ WcfService1/ICustomerService.cs | 14 +- .../PublishProfiles/IISProfile1.pubxml.user | 2 +- WcfService1/WmsWcfService.csproj | 2 + WcfService1/wcfData/wcfWmsDeskCustomer.cs | 263 +++++++++++ winform/App.config | 6 + .../ServiceCustomer/CustomerService1.disco | 4 - .../ServiceCustomer/CustomerService1.wsdl | 97 ---- .../ServiceCustomer/CustomerService4.xsd | 19 +- .../ServiceCustomer/CustomerService41.xsd | 16 - .../ServiceCustomer/CustomerService42.xsd | 42 -- .../ServiceCustomer/CustomerService43.xsd | 77 ---- .../ServiceCustomer/Reference.cs | 251 +++++++++++ .../ServiceCustomer/Reference.svcmap | 15 +- .../ServiceCustomer/configuration.svcinfo | 2 +- .../ServiceCustomer/configuration91.svcinfo | 6 +- winform/epick/DeskCustomer.cs | 161 ++++--- winform/epick/DeskCustomer.designer.cs | 2 +- winform/wms.csproj | 35 +- 27 files changed, 1567 insertions(+), 322 deletions(-) create mode 100644 Model/wms/data/WmsDeskCustomer_Imp.cs create mode 100644 Model/wms/data/basic/WmsDeskCustomer_base.cs create mode 100644 Model/wms/data/basic/WmsDeskCustomer_base_Imp.cs create mode 100644 Model/wms/tables/WmsDeskCustomer.cs create mode 100644 WcfService1/BLL/lWmsDeskCustomer.cs create mode 100644 WcfService1/wcfData/wcfWmsDeskCustomer.cs delete mode 100644 winform/Service References/ServiceCustomer/CustomerService1.disco delete mode 100644 winform/Service References/ServiceCustomer/CustomerService1.wsdl delete mode 100644 winform/Service References/ServiceCustomer/CustomerService41.xsd delete mode 100644 winform/Service References/ServiceCustomer/CustomerService42.xsd delete mode 100644 winform/Service References/ServiceCustomer/CustomerService43.xsd diff --git a/Model/Model.csproj b/Model/Model.csproj index 616fa9b..71698d2 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -148,6 +148,8 @@ + + @@ -197,6 +199,7 @@ + @@ -415,6 +418,7 @@ + diff --git a/Model/wms/data/WmsDeskCustomer_Imp.cs b/Model/wms/data/WmsDeskCustomer_Imp.cs new file mode 100644 index 0000000..5f3bbf5 --- /dev/null +++ b/Model/wms/data/WmsDeskCustomer_Imp.cs @@ -0,0 +1,69 @@ + +/// +///INTERFACE IMPLIMENT FOR TABLE t_wmsDeskCustomer +///By wm with codesmith. +///on 07/21/2019 +/// + +using System; +using System.Data.SqlClient; +namespace DeiNiu.wms.Data.Model +{ + [Serializable] class WmsDeskCustomer_Imp : WmsDeskCustomer_base_Imp + { + protected override void CmdPrepare(SqlCommand sqlCmd) + { + base.CmdPrepare(sqlCmd); + WmsDeskCustomer mObj = ( WmsDeskCustomer)modelObj; + switch (_cust_op_flag) + { + case 99: //query with dic + _strSql = "SELECT *,ROW_NUMBER() OVER (ORDER BY ID DESC) as sortNo FROM [t_wmsDeskCustomer] WHERE DR = 1 " + mObj.CmdParameters[0].ToString(); + _strSql = "SELECT * FROM (" + _strSql + " )AS SORTEDTB WHERE sortNo BETWEEN @START AND @END" + " ORDER BY deskId,custId"; + _strSql += ";SELECT COUNT(*) FROM [t_wmsDeskCustomer] WHERE DR = 1 " + mObj.CmdParameters[0].ToString(); + sqlCmd.CommandText = _strSql; + sqlCmd.Parameters.AddWithValue("@START", this._rownumStart); + sqlCmd.Parameters.AddWithValue("@END", this._rownumEnd); + sqlCmd.CommandText = _strSql; + + break; + case 100: //by name + _strSql = "SELECT * FROM t_wmsDeskCustomer WHERE NAME = @NAME"; + sqlCmd.CommandText = _strSql; + sqlCmd.Parameters.AddWithValue("@NAME", mObj.CmdParameters[0] ); + break; + + case 101: //truncate table + _strSql = "truncate table [t_wmsDeskCustomer];"; + sqlCmd.CommandText = _strSql; + + break; + case 200: //update port number + _strSql = "update [t_wmsDeskCustomer] set portNo =@portNo, lastmodified =getdate() where deskId=@deskId"; + + sqlCmd.CommandText = _strSql; + sqlCmd.Parameters.AddWithValue("@deskId", mObj.CmdParameters[0]); + sqlCmd.Parameters.AddWithValue("@portNo", mObj.CmdParameters[1]); + + break; + case 201: //update port number with cust id + _strSql = "update [t_wmsDeskCustomer] set portNo =@portNo, lastmodified =getdate() where deskId=@deskId"; + + _strSql += " and custid >= @startId and custid <=@endId"; + sqlCmd.CommandText = _strSql; + sqlCmd.Parameters.AddWithValue("@deskId", mObj.CmdParameters[0]); + sqlCmd.Parameters.AddWithValue("@portNo", mObj.CmdParameters[1]); + sqlCmd.Parameters.AddWithValue("@startId", mObj.CmdParameters[2]); + sqlCmd.Parameters.AddWithValue("@endId", mObj.CmdParameters[3]); + break; + + case 300: //by custName deskId + _strSql = "SELECT * FROM t_wmsDeskCustomer WHERE deskId = @deskId and custName =@custName"; + sqlCmd.CommandText = _strSql; + sqlCmd.Parameters.AddWithValue("@custName", mObj.CmdParameters[0]); + sqlCmd.Parameters.AddWithValue("@deskId", mObj.CmdParameters[1]); + break; + } + } + } +} \ No newline at end of file diff --git a/Model/wms/data/basic/WmsDeskCustomer_base.cs b/Model/wms/data/basic/WmsDeskCustomer_base.cs new file mode 100644 index 0000000..3ee7da6 --- /dev/null +++ b/Model/wms/data/basic/WmsDeskCustomer_base.cs @@ -0,0 +1,120 @@ +/// +///Data Object +///BASIC CLASS FOR TABLE t_wmsDeskCustomer +///By wm +///on 03/21/2024 +/// + +using System; +using System.Data; +using DeiNiu.Data.BaseObject; + +namespace DeiNiu.wms.Data.Model +{ + + #region WmsDeskCustomer_base + /// + /// This object represents the properties and methods of a WmsDeskCustomer_base. + /// + [Serializable] + public class WmsDeskCustomer_base : BaseModel { + + + internal int _partion,_Opartion; + internal int _deskId,_OdeskId; + internal int _custid,_Ocustid; + internal string _custName = String.Empty,_OcustName= String.Empty; + internal string _partionName = String.Empty,_OpartionName= String.Empty; + internal string _mem = String.Empty,_Omem= String.Empty; + internal int _portNo,_OportNo; + internal int _Ooperater; + + internal string _createtime = String.Empty,_Ocreatetime= String.Empty; + + + public WmsDeskCustomer_base () { + } + public WmsDeskCustomer_base (int id) { + _id=id; + getModel(); + } + public WmsDeskCustomer_base(DataRow dr) + { + getModel(dr); + } + public WmsDeskCustomer_base(System.Data.SqlClient.SqlConnection _Conn) + : base(_Conn) + { + + } + protected override void getImp() + { + model_imp = new WmsDeskCustomer_base_Imp(); + } + #region Public Properties + public int partion{ + get {return _partion;} + set {_partion = value;} + } + + public int deskId{ + get {return _deskId;} + set {_deskId = value;} + } + + public int custid{ + get {return _custid;} + set {_custid = value;} + } + + public string custName{ + get {return _custName;} + set {_custName = value;} + } + + public string partionName{ + get {return _partionName;} + set {_partionName = value;} + } + + public string mem{ + get {return _mem;} + set {_mem = value;} + } + + public int portNo{ + get {return _portNo;} + set {_portNo = value;} + } + + public int operater{ + get {return _operater;} + set {_operater = value;} + } + + public bool dr{ + get {return _dr;} + + } + + public string createtime{ + get {return _createtime;} + set {_createtime = value;} + } + + public string lastmodified{ + get {return _lastmodified;} + + } + + + #endregion + + #region fieldNames + public enum fields{partion,deskId,custid,custName,partionName,mem,portNo,operater} + #endregion + + + } + #endregion +} diff --git a/Model/wms/data/basic/WmsDeskCustomer_base_Imp.cs b/Model/wms/data/basic/WmsDeskCustomer_base_Imp.cs new file mode 100644 index 0000000..33099ce --- /dev/null +++ b/Model/wms/data/basic/WmsDeskCustomer_base_Imp.cs @@ -0,0 +1,418 @@ +/// +///Data Implemention Object +///BASIC CRUD CLASS FOR TABLE t_wmsDeskCustomer +///By wm +///on 03/21/2024 +/// + + +using System; +using DeiNiu.Utils; +using System.Data.SqlClient; +using DeiNiu.Data.BaseObject; +using System.Data; +namespace DeiNiu.wms.Data.Model +{ + #region WmsDeskCustomer_base_Imp + [Serializable] class WmsDeskCustomer_base_Imp: BaseModel_Imp{ + + protected override void datarowToModel(DataRow dr, BaseModel obj) + { + if (dr != null ) + { + WmsDeskCustomer_base tmpObj = (WmsDeskCustomer_base)obj; + if (dr.Table.Columns.Contains("id") && !(dr["id"] is DBNull)) + { + try + { + tmpObj.ID = Convert.ToInt32(dr["id"].ToString()); ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "id value :"+ dr["id"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("partion") && !(dr["partion"] is DBNull)) + { + try + { + tmpObj._partion = Convert.ToInt32(dr["partion"].ToString()); ; + tmpObj._Opartion = Convert.ToInt32(dr["partion"].ToString()); ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "partion value :"+ dr["partion"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("deskId") && !(dr["deskId"] is DBNull)) + { + try + { + tmpObj._deskId = Convert.ToInt32(dr["deskId"].ToString()); ; + tmpObj._OdeskId = Convert.ToInt32(dr["deskId"].ToString()); ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "deskId value :"+ dr["deskId"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("custid") && !(dr["custid"] is DBNull)) + { + try + { + tmpObj._custid = Convert.ToInt32(dr["custid"].ToString()); ; + tmpObj._Ocustid = Convert.ToInt32(dr["custid"].ToString()); ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "custid value :"+ dr["custid"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("custName") && !(dr["custName"] is DBNull)) + { + try + { + tmpObj._custName = dr["custName"].ToString() ; + tmpObj._OcustName = dr["custName"].ToString() ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "custName value :"+ dr["custName"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("partionName") && !(dr["partionName"] is DBNull)) + { + try + { + tmpObj._partionName = dr["partionName"].ToString() ; + tmpObj._OpartionName = dr["partionName"].ToString() ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "partionName value :"+ dr["partionName"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("mem") && !(dr["mem"] is DBNull)) + { + try + { + tmpObj._mem = dr["mem"].ToString() ; + tmpObj._Omem = dr["mem"].ToString() ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "mem value :"+ dr["mem"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("portNo") && !(dr["portNo"] is DBNull)) + { + try + { + tmpObj._portNo = Convert.ToInt32(dr["portNo"].ToString()); ; + tmpObj._OportNo = Convert.ToInt32(dr["portNo"].ToString()); ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "portNo value :"+ dr["portNo"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("operater") && !(dr["operater"] is DBNull)) + { + try + { + tmpObj._operater = Convert.ToInt32(dr["operater"].ToString()); ; + tmpObj._Ooperater = Convert.ToInt32(dr["operater"].ToString()); ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "operater value :"+ dr["operater"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("dr") && !(dr["dr"] is DBNull)) + { + try + { + tmpObj._dr = Convert.ToBoolean(dr["dr"].ToString()); ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "dr value :"+ dr["dr"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("createtime") && !(dr["createtime"] is DBNull)) + { + try + { + tmpObj._createtime = dr["createtime"].ToString() ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "createtime value :"+ dr["createtime"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + if (dr.Table.Columns.Contains("lastmodified") && !(dr["lastmodified"] is DBNull)) + { + try + { + tmpObj._lastmodified = dr["lastmodified"].ToString() ; + } + catch (Exception er) + { + LogHelper.debug(this.GetType(), "lastmodified value :"+ dr["lastmodified"].ToString()); + + LogHelper.debug(this.GetType(), er.Message); + + + } + + + } + } + } + + protected override void CmdPrepare(SqlCommand oraCmd) { + WmsDeskCustomer_base tmpObj = (WmsDeskCustomer_base)modelObj; + switch (this._op_flag) { + case (int)op_flag.add: + _strSql = "INSERT INTO dbo.T_WMSDESKCUSTOMER({0}) VALUES({1} )"; + _strSql = String.Format(_strSql, getFields(tmpObj), getValues(tmpObj)); + + break; + case (int)op_flag.update: + // _strSql = "UPDATE dbo.T_WMSDESKCUSTOMER SET PARTION = @PARTION,DESKID = @DESKID,CUSTID = @CUSTID,CUSTNAME = @CUSTNAME,PARTIONNAME = @PARTIONNAME,MEM = @MEM,PORTNO = @PORTNO,OPERATER = @OPERATER,LASTMODIFIED = getdate() WHERE ID = @ID"; + _strSql = "UPDATE dbo.T_WMSDESKCUSTOMER {0} WHERE ID = @ID"; + _strSql = String.Format(_strSql, getChangedFields(tmpObj) ); + break; + case (int)op_flag.delete: + // _strSql = "UPDATE dbo.T_WMSDESKCUSTOMER SET DR =0 WHERE ID = @ID"; + _strSql = "delete from dbo.T_WMSDESKCUSTOMER WHERE ID = @ID"; + break; + case (int)op_flag.getObj: + _strSql = "SELECT * FROM dbo.T_WMSDESKCUSTOMER WHERE ID = @ID"; + break; + case (int)op_flag.queryAll: + _strSql = "SELECT * FROM dbo.T_WMSDESKCUSTOMER WHERE DR =1 "; + // if (this.rownumEnd >0 ) + { + // _strSql = "SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY ID DESC) as sortNo FROM dbo.T_WMSDESKCUSTOMER WHERE DR =1 )AS SORTEDTB WHERE DR =1 AND sortNo BETWEEN @START AND @END"; + } + // _strSql += ";SELECT COUNT(*) FROM T_WMSDESKCUSTOMER WHERE DR =1"; + break; + case (int)op_flag.queryActived: + _strSql = "SELECT * FROM dbo.T_WMSDESKCUSTOMER WHERE DR =1"; + _strSql += ";SELECT COUNT(*) FROM T_WMSDESKCUSTOMER WHERE DR =1"; + break; + case (int)op_flag.getPk: + _strSql = "SELECT MAX(ID) FROM dbo.T_WMSDESKCUSTOMER WHERE DR =1"; + break; + case (int) op_flag.getCount: + _strSql = "SELECT COUNT(*) FROM T_WMSDESKCUSTOMER WHERE DR =1"; + break; + } + oraCmd.CommandText = _strSql; + fillParameters(oraCmd,tmpObj); + } + + private string getFields(WmsDeskCustomer_base tmpObj) + { + String colums =""; + colums+= tmpObj._partion == null ? "" : "PARTION" + ","; + colums+= tmpObj._deskId == null ? "" : "DESKID" + ","; + colums+= tmpObj._custid == null ? "" : "CUSTID" + ","; + colums+= tmpObj._custName == null ? "" : "CUSTNAME" + ","; + colums+= tmpObj._partionName == null ? "" : "PARTIONNAME" + ","; + colums+= tmpObj._mem == null ? "" : "MEM" + ","; + colums+= tmpObj._portNo == null ? "" : "PORTNO" + ","; + colums+= tmpObj._operater == null ? "" : "OPERATER" + ","; + return colums.Substring(0,colums.Length -1) ; + + } + + private string getValues(WmsDeskCustomer_base tmpObj) + { + String values =""; + values+= tmpObj._partion == null ? "" : "@PARTION" + ","; + values+= tmpObj._deskId == null ? "" : "@DESKID" + ","; + values+= tmpObj._custid == null ? "" : "@CUSTID" + ","; + values+= tmpObj._custName == null ? "" : "@CUSTNAME" + ","; + values+= tmpObj._partionName == null ? "" : "@PARTIONNAME" + ","; + values+= tmpObj._mem == null ? "" : "@MEM" + ","; + values+= tmpObj._portNo == null ? "" : "@PORTNO" + ","; + values+= tmpObj._operater == null ? "" : "@OPERATER" + ","; + return values.Substring(0,values.Length -1) ; + + } + + private string getChangedFields(WmsDeskCustomer_base tmpObj) + { + string updateFields = " set "; + if (tmpObj._partion !=null && tmpObj._partion != tmpObj._Opartion) + { + updateFields +="PARTION = @PARTION," ; + } + if (tmpObj._deskId !=null && tmpObj._deskId != tmpObj._OdeskId) + { + updateFields +="DESKID = @DESKID," ; + } + if (tmpObj._custid !=null && tmpObj._custid != tmpObj._Ocustid) + { + updateFields +="CUSTID = @CUSTID," ; + } + if (tmpObj._custName !=null && tmpObj._custName != tmpObj._OcustName) + { + updateFields +="CUSTNAME = @CUSTNAME," ; + } + if (tmpObj._partionName !=null && tmpObj._partionName != tmpObj._OpartionName) + { + updateFields +="PARTIONNAME = @PARTIONNAME," ; + } + if (tmpObj._mem !=null && tmpObj._mem != tmpObj._Omem) + { + updateFields +="MEM = @MEM," ; + } + if (tmpObj._portNo !=null && tmpObj._portNo != tmpObj._OportNo) + { + updateFields +="PORTNO = @PORTNO," ; + } + if (tmpObj._operater !=null && tmpObj._operater != tmpObj._Ooperater) + { + updateFields +="OPERATER = @OPERATER," ; + } + updateFields +="LASTMODIFIED = getdate()" ; + return updateFields ; + + } + + private void fillParameters(SqlCommand oraCmd, WmsDeskCustomer_base tmpObj) { + switch (this._op_flag) { + case (int)op_flag.getObj: + case (int)op_flag.delete: + oraCmd.Parameters.AddWithValue("@ID", tmpObj.ID); + return; + case (int)op_flag.getPk: + oraCmd.Parameters.AddWithValue("@ID", tmpObj.ID); + return; + case (int)op_flag.queryAll: + if (this.rownumEnd > 0) + { + oraCmd.Parameters.AddWithValue("@START", this._rownumStart); + oraCmd.Parameters.AddWithValue("@END", this._rownumEnd); + } + return; + case 0: + case (int)op_flag.queryActived: + return; + case (int)op_flag.update: + oraCmd.Parameters.AddWithValue("@ID", tmpObj.ID); + oraCmd.Parameters.AddWithValue("@PARTION", VerifyDbnull(tmpObj._partion)) ; + oraCmd.Parameters.AddWithValue("@DESKID", VerifyDbnull(tmpObj._deskId)) ; + oraCmd.Parameters.AddWithValue("@CUSTID", VerifyDbnull(tmpObj._custid)) ; + oraCmd.Parameters.AddWithValue("@CUSTNAME", VerifyDbnull(tmpObj._custName)) ; + oraCmd.Parameters.AddWithValue("@PARTIONNAME", VerifyDbnull(tmpObj._partionName)) ; + oraCmd.Parameters.AddWithValue("@MEM", VerifyDbnull(tmpObj._mem)) ; + oraCmd.Parameters.AddWithValue("@PORTNO", VerifyDbnull(tmpObj._portNo)) ; + oraCmd.Parameters.AddWithValue("@OPERATER", VerifyDbnull(tmpObj._operater)) ; + // oraCmd.Parameters.AddWithValue("@LASTMODIFIED", "getdate()") ; + return; + case (int)op_flag.add: + if(tmpObj._partion!=null) + oraCmd.Parameters.AddWithValue("@PARTION", VerifyDbnull(tmpObj._partion)) ; + if(tmpObj._deskId!=null) + oraCmd.Parameters.AddWithValue("@DESKID", VerifyDbnull(tmpObj._deskId)) ; + if(tmpObj._custid!=null) + oraCmd.Parameters.AddWithValue("@CUSTID", VerifyDbnull(tmpObj._custid)) ; + if(tmpObj._custName!=null) + oraCmd.Parameters.AddWithValue("@CUSTNAME", VerifyDbnull(tmpObj._custName)) ; + if(tmpObj._partionName!=null) + oraCmd.Parameters.AddWithValue("@PARTIONNAME", VerifyDbnull(tmpObj._partionName)) ; + if(tmpObj._mem!=null) + oraCmd.Parameters.AddWithValue("@MEM", VerifyDbnull(tmpObj._mem)) ; + if(tmpObj._portNo!=null) + oraCmd.Parameters.AddWithValue("@PORTNO", VerifyDbnull(tmpObj._portNo)) ; + if(tmpObj._operater!=null) + oraCmd.Parameters.AddWithValue("@OPERATER", VerifyDbnull(tmpObj._operater)) ; + return; + + } + + } + + protected override enumDbInstance instance + { + get + { + + return enumDbInstance.wms; + } + } + + } + #endregion +} + \ No newline at end of file diff --git a/Model/wms/tables/WmsDeskCustomer.cs b/Model/wms/tables/WmsDeskCustomer.cs new file mode 100644 index 0000000..af96b94 --- /dev/null +++ b/Model/wms/tables/WmsDeskCustomer.cs @@ -0,0 +1,73 @@ + +/// +///INTERFACE CLASS FOR TABLE t_wmsDeskCustomer +///By wm +///on 07/21/2019 +/// + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data; + +namespace DeiNiu.wms.Data.Model +{ + [Serializable] + public class WmsDeskCustomer : WmsDeskCustomer_base + { + public WmsDeskCustomer() + { + + } + + public WmsDeskCustomer(int id): base(id) + { + + } + public WmsDeskCustomer(DataRow dr): base(dr) + { + + } + protected override void getImp() + { + model_imp = new WmsDeskCustomer_Imp(); + } + + //begin cust db operation, query, excute sql etc. + public DataSet QueryByName(string name) + { + cmdParameters[0] = name; + return CustQuery(100); + } + public void getByCustNameDesk(int deskId, string custName) + { + cmdParameters[0] = custName; + cmdParameters[1] = deskId; + DataTable dt = CustQuery(300).Tables[0]; + foreach(DataRow dr in dt.Rows){ + getModel(dr); + break; + } + + } + public void trunckData() + { + CustOper(101); + } + + public int updatePorts(int deskId, int portNo, int startId, int endId) + { + cmdParameters[0] = deskId; + cmdParameters[1] = portNo; + cmdParameters[2] = startId; + cmdParameters[3] = endId; + + if (startId ==0 && startId == endId) + return CustOper(200); + else + return CustOper(201); + } + } +} + \ No newline at end of file diff --git a/Model/wms/tables/WmsStock.cs b/Model/wms/tables/WmsStock.cs index 3c774a4..9a1bc38 100644 --- a/Model/wms/tables/WmsStock.cs +++ b/Model/wms/tables/WmsStock.cs @@ -268,7 +268,7 @@ public WmsStock( string locationId) && count - countOut == 0 //架上库存 && adjustingCnt == 0 && countOuting == 0 - && plateCount <= 0 + // && plateCount <= 0 && virtialCount == 0; } diff --git a/WcfService1/BLL/lWmsDeskCustomer.cs b/WcfService1/BLL/lWmsDeskCustomer.cs new file mode 100644 index 0000000..bc7147c --- /dev/null +++ b/WcfService1/BLL/lWmsDeskCustomer.cs @@ -0,0 +1,146 @@ + +/// +///LOGIC CLASS FOR TABLE t_wmsDeskCustomer +///By wm with codesmith. +///on 07/21/2019 +/// + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using DeiNiu.wms.Data.Model; +using System.Data; +using System.Transactions; + +namespace DeiNiu.wms.Logical +{ + [Serializable] + public class lWmsDeskCustomer : lbase + { + WmsDeskCustomer _obj; + public lWmsDeskCustomer() + { + initialize(); + } + + public WmsDeskCustomer getWmsDeskCustomer + { + get + { + if (_obj == null) + { + _obj = new WmsDeskCustomer(); + + } + _obj.operater = operId; + return _obj; + } + } + + public lWmsDeskCustomer(int operId) + : base(operId) + { + initialize(); + } + + protected override DeiNiu.Data.BaseObject.BaseModel getModel() + { + return getWmsDeskCustomer; + } + + /// + /// get all data + /// + public DataSet getAllData() + { + return _obj.Query(); + } + + /// + /// get all data + /// + public DataSet getAllActiveData() + { + return _obj.QueryActived(); + } + + + + /// + /// get a record by id + /// + public void initialize(int id) + { + _obj = id != 0 ? new WmsDeskCustomer(id) : new WmsDeskCustomer(); + } + + /// + /// get a record by id 0 + /// + public void initialize() + { + initialize(0); + } + + /// + /// get a record by id + /// + public void initialize(DataRow dr) + { + _obj = new WmsDeskCustomer(dr); + } + + + + //begin cust db operation, query, excute sql etc. + + internal int add(WmsDeskCustomer obj) + { + return obj.Add(); + } + + /// + /// update in a transaction scrop + /// + + public void update() + { + if (valid()) + { + using (TransactionScope scope = new TransactionScope()) + { + + //Node tmp = new Node(); + //tmp.parentid = 1; + //tmp.name = "test trans" + DateTime.Now; + //tmp.description = "this is for transTest"; + //tmp.Add(); + _obj.Update(); + + scope.Complete(); + } + } + } + + private bool valid() + { + return true; + } + + public void trunckData() + { + + getWmsDeskCustomer.trunckData(); + + } + + public int setupPort(int deskId, int portNo, int startId, int endId) + { + return getWmsDeskCustomer.updatePorts(deskId,portNo,startId,endId); + } + } + + +} + \ No newline at end of file diff --git a/WcfService1/BLL/lWmsInRequest.cs b/WcfService1/BLL/lWmsInRequest.cs index 1ef8222..5ded4e8 100644 --- a/WcfService1/BLL/lWmsInRequest.cs +++ b/WcfService1/BLL/lWmsInRequest.cs @@ -2696,7 +2696,7 @@ namespace DeiNiu.wms.Logical epd.operater = this.operId; epd.Update(); - if (epd.wms_state == (int)enumReceiveStockDetailStatus.已验收 && validIn.preInOrder!=null) + // if (epd.wms_state == (int)enumReceiveStockDetailStatus.已验收 && validIn.preInOrder!=null) //到货可能大于验收数量,所以不做此限制 { WmsFlow flow = new WmsFlow(validIn.preInOrder); /* diff --git a/WcfService1/CustomerService.svc.cs b/WcfService1/CustomerService.svc.cs index f6d0cd0..a0e166d 100644 --- a/WcfService1/CustomerService.svc.cs +++ b/WcfService1/CustomerService.svc.cs @@ -6,6 +6,7 @@ using System.ServiceModel; using System.Text; using System.Data; using DeiNiu.wms.Logical; +using DeiNiu.wms.Data.Model; namespace DeiNiu.Wcf { @@ -30,6 +31,7 @@ namespace DeiNiu.Wcf return lCustomerObj.Query(querystr, rownumStart, rownumEnd); } + public int updateJdGroup(string[] ids, int group) { @@ -46,5 +48,44 @@ namespace DeiNiu.Wcf return lCustomerObj.updatePickInterval(ids, point); } + + //--- 播种亮灯工作台设置 + + + private lWmsDeskCustomer _ldCust; + + lWmsDeskCustomer ldCust + { + get + { + if (_ldCust == null || _ldCust.operId != getOperId()) + { + _ldCust = new lWmsDeskCustomer(getOperId()); + } + return _ldCust; + } + } + + + + public int add(WcfWmsDeskCustomer wcfData ) + { + return ldCust.add(wcfData.getDbObject()); + } + + public int delete(int id) + { + return new WmsDeskCustomer(id).Delete(); + } + + public int update(WcfWmsDeskCustomer wcfData) + { + return wcfData.getDbObject().Update(); + } + + public DataSet queryDesks(string querystr, int rownumStart, int rownumEnd) + { + return ldCust.Query(querystr, rownumStart, rownumEnd); + } } } diff --git a/WcfService1/ICustomerService.cs b/WcfService1/ICustomerService.cs index 33748f5..143b2e5 100644 --- a/WcfService1/ICustomerService.cs +++ b/WcfService1/ICustomerService.cs @@ -20,7 +20,19 @@ using System.Data; [OperationContract] int updateJdHourPoint(string[] Ids, int point); [OperationContract] - int updatePickInterval(string[] Ids, int point); + int updatePickInterval(string[] Ids, int point); + + //---customer desk 灯光播种台设置 + [OperationContract] + DataSet queryDesks(string querystr, int rownumStart, int rownumEnd); + [OperationContract] + int add(WcfWmsDeskCustomer wcfData); + + [OperationContract] + int delete(int id); + [OperationContract] + int update(WcfWmsDeskCustomer wcfData); + } } diff --git a/WcfService1/Properties/PublishProfiles/IISProfile1.pubxml.user b/WcfService1/Properties/PublishProfiles/IISProfile1.pubxml.user index 682a1de..136f005 100644 --- a/WcfService1/Properties/PublishProfiles/IISProfile1.pubxml.user +++ b/WcfService1/Properties/PublishProfiles/IISProfile1.pubxml.user @@ -7,6 +7,6 @@ - True|2024-03-20T14:55:40.0397610Z;True|2024-03-20T22:42:21.0790187+08:00;True|2024-03-20T22:36:09.2791989+08:00;True|2024-03-20T22:22:12.9730279+08:00;True|2024-03-20T19:54:32.1698921+08:00;True|2024-03-20T19:54:09.8789983+08:00;True|2024-03-20T19:21:19.0080195+08:00;True|2024-03-20T15:40:39.8706246+08:00;True|2024-03-20T08:55:54.5146171+08:00;True|2024-03-19T19:43:40.4120707+08:00;True|2024-03-19T18:44:16.3121326+08:00;True|2024-03-19T13:39:00.7981191+08:00;True|2024-03-19T13:35:01.7794426+08:00;True|2024-03-19T11:32:08.9351827+08:00;False|2024-03-19T11:31:34.3574177+08:00;True|2024-03-15T22:20:49.9543261+08:00;True|2024-03-14T18:05:27.5226179+08:00;True|2024-03-14T18:04:22.9552845+08:00;True|2024-03-13T21:12:28.9157626+08:00;True|2024-03-10T19:33:40.9271322+08:00;True|2024-03-06T18:49:41.0345462+08:00;True|2024-03-06T18:17:41.7374273+08:00;True|2024-03-06T18:12:23.8953777+08:00;True|2024-03-05T14:41:43.0493268+08:00;True|2024-03-05T10:34:01.8181582+08:00;True|2024-03-05T10:33:41.6827293+08:00;True|2024-03-04T21:44:07.3387316+08:00;True|2024-03-04T21:15:19.6954718+08:00;True|2024-03-04T21:14:57.9591923+08:00;True|2024-03-04T19:47:10.4489216+08:00;True|2024-03-03T09:25:24.1437972+08:00;True|2024-03-02T16:10:09.9360774+08:00;True|2024-03-02T12:39:56.7993047+08:00;True|2024-03-01T17:51:52.7749703+08:00;True|2024-03-01T17:44:53.9566064+08:00;True|2024-03-01T17:39:23.0891734+08:00;True|2024-03-01T14:27:56.7473404+08:00;True|2024-03-01T13:32:26.9532310+08:00;True|2024-03-01T09:46:11.9247046+08:00;True|2024-02-28T21:56:14.6129398+08:00;True|2024-02-27T10:15:36.1332202+08:00;True|2024-02-27T10:14:34.9579768+08:00;True|2024-02-27T09:57:11.5785797+08:00;True|2024-02-21T12:58:18.0087896+08:00;True|2024-02-19T12:47:50.8170331+08:00;True|2024-02-19T12:14:18.6431662+08:00;True|2024-02-19T12:11:35.2671748+08:00;True|2024-02-06T21:10:42.6568450+08:00; + True|2024-03-22T01:31:42.8760994Z;True|2024-03-22T09:31:10.8088318+08:00;True|2024-03-22T09:30:08.1914035+08:00;True|2024-03-22T09:25:02.5305528+08:00;True|2024-03-20T22:55:40.0397610+08:00;True|2024-03-20T22:42:21.0790187+08:00;True|2024-03-20T22:36:09.2791989+08:00;True|2024-03-20T22:22:12.9730279+08:00;True|2024-03-20T19:54:32.1698921+08:00;True|2024-03-20T19:54:09.8789983+08:00;True|2024-03-20T19:21:19.0080195+08:00;True|2024-03-20T15:40:39.8706246+08:00;True|2024-03-20T08:55:54.5146171+08:00;True|2024-03-19T19:43:40.4120707+08:00;True|2024-03-19T18:44:16.3121326+08:00;True|2024-03-19T13:39:00.7981191+08:00;True|2024-03-19T13:35:01.7794426+08:00;True|2024-03-19T11:32:08.9351827+08:00;False|2024-03-19T11:31:34.3574177+08:00;True|2024-03-15T22:20:49.9543261+08:00;True|2024-03-14T18:05:27.5226179+08:00;True|2024-03-14T18:04:22.9552845+08:00;True|2024-03-13T21:12:28.9157626+08:00;True|2024-03-10T19:33:40.9271322+08:00;True|2024-03-06T18:49:41.0345462+08:00;True|2024-03-06T18:17:41.7374273+08:00;True|2024-03-06T18:12:23.8953777+08:00;True|2024-03-05T14:41:43.0493268+08:00;True|2024-03-05T10:34:01.8181582+08:00;True|2024-03-05T10:33:41.6827293+08:00;True|2024-03-04T21:44:07.3387316+08:00;True|2024-03-04T21:15:19.6954718+08:00;True|2024-03-04T21:14:57.9591923+08:00;True|2024-03-04T19:47:10.4489216+08:00;True|2024-03-03T09:25:24.1437972+08:00;True|2024-03-02T16:10:09.9360774+08:00;True|2024-03-02T12:39:56.7993047+08:00;True|2024-03-01T17:51:52.7749703+08:00;True|2024-03-01T17:44:53.9566064+08:00;True|2024-03-01T17:39:23.0891734+08:00;True|2024-03-01T14:27:56.7473404+08:00;True|2024-03-01T13:32:26.9532310+08:00;True|2024-03-01T09:46:11.9247046+08:00;True|2024-02-28T21:56:14.6129398+08:00;True|2024-02-27T10:15:36.1332202+08:00;True|2024-02-27T10:14:34.9579768+08:00;True|2024-02-27T09:57:11.5785797+08:00;True|2024-02-21T12:58:18.0087896+08:00;True|2024-02-19T12:47:50.8170331+08:00;True|2024-02-19T12:14:18.6431662+08:00;True|2024-02-19T12:11:35.2671748+08:00;True|2024-02-06T21:10:42.6568450+08:00; \ No newline at end of file diff --git a/WcfService1/WmsWcfService.csproj b/WcfService1/WmsWcfService.csproj index 6a6c81b..9092a54 100644 --- a/WcfService1/WmsWcfService.csproj +++ b/WcfService1/WmsWcfService.csproj @@ -149,6 +149,7 @@ + @@ -244,6 +245,7 @@ + diff --git a/WcfService1/wcfData/wcfWmsDeskCustomer.cs b/WcfService1/wcfData/wcfWmsDeskCustomer.cs new file mode 100644 index 0000000..e50e00e --- /dev/null +++ b/WcfService1/wcfData/wcfWmsDeskCustomer.cs @@ -0,0 +1,263 @@ +/// +///WCF Data Object +///BASIC CLASS FOR TABLE t_wmsDeskCustomer +///By wm +///on 03/21/2024 +/// + +using System; +using System.Runtime.Serialization; +using System.Data; +using DeiNiu.wms.Data.Model; +namespace DeiNiu.Wcf +{ + + #region WcfWmsDeskCustomer + /// + /// This object represents the properties and methods of a WcfWmsDeskCustomer. + /// + [DataContract] + public class WcfWmsDeskCustomer { + + internal int _id; + internal int _partion; + internal int _deskId; + internal int _custid; + internal string _custName= String.Empty; + internal string _partionName= String.Empty; + internal string _mem= String.Empty; + internal int _portNo; + internal int _operater; + internal bool _dr; + internal string _createtime= String.Empty; + internal string _lastmodified= String.Empty; + + public WcfWmsDeskCustomer () { + } + + public WcfWmsDeskCustomer (DataRow dr) { + #region get data from dr + if (dr != null ) + { + if (dr.Table.Columns.Contains("id") && !(dr["id"] is DBNull)) + { + _id = Convert.ToInt32(dr["id"].ToString()); ; + } + if (dr.Table.Columns.Contains("partion") && !(dr["partion"] is DBNull)) + { + _partion = Convert.ToInt32(dr["partion"].ToString()); ; + } + if (dr.Table.Columns.Contains("deskId") && !(dr["deskId"] is DBNull)) + { + _deskId = Convert.ToInt32(dr["deskId"].ToString()); ; + } + if (dr.Table.Columns.Contains("custid") && !(dr["custid"] is DBNull)) + { + _custid = Convert.ToInt32(dr["custid"].ToString()); ; + } + if (dr.Table.Columns.Contains("custName") && !(dr["custName"] is DBNull)) + { + _custName = dr["custName"].ToString() ; + } + if (dr.Table.Columns.Contains("partionName") && !(dr["partionName"] is DBNull)) + { + _partionName = dr["partionName"].ToString() ; + } + if (dr.Table.Columns.Contains("mem") && !(dr["mem"] is DBNull)) + { + _mem = dr["mem"].ToString() ; + } + if (dr.Table.Columns.Contains("portNo") && !(dr["portNo"] is DBNull)) + { + _portNo = Convert.ToInt32(dr["portNo"].ToString()); ; + } + if (dr.Table.Columns.Contains("operater") && !(dr["operater"] is DBNull)) + { + _operater = Convert.ToInt32(dr["operater"].ToString()); ; + } + if (dr.Table.Columns.Contains("dr") && !(dr["dr"] is DBNull)) + { + _dr = Convert.ToBoolean(dr["dr"].ToString()); ; + } + if (dr.Table.Columns.Contains("createtime") && !(dr["createtime"] is DBNull)) + { + _createtime = dr["createtime"].ToString() ; + } + if (dr.Table.Columns.Contains("lastmodified") && !(dr["lastmodified"] is DBNull)) + { + _lastmodified = dr["lastmodified"].ToString() ; + } + } + #endregion + } + + public WcfWmsDeskCustomer( WmsDeskCustomer dbObj){ + #region get data from dbobj + + _id= dbObj.ID; + partion = dbObj.partion; + + deskId = dbObj.deskId; + + custid = dbObj.custid; + + custName = dbObj.custName; + + partionName = dbObj.partionName; + + mem = dbObj.mem; + + portNo = dbObj.portNo; + + operater = dbObj.operater; + + #endregion + + } + + + + #region Public Properties + + [DataMember] + public int id{ + get {return _id;} + set {_id = value;} + } + + + [DataMember] + public int partion{ + get {return _partion;} + set {_partion = value;} + } + + + [DataMember] + public int deskId{ + get {return _deskId;} + set {_deskId = value;} + } + + + [DataMember] + public int custid{ + get {return _custid;} + set {_custid = value;} + } + + + [DataMember] + public string custName{ + get {return _custName;} + set {_custName = value;} + } + + + [DataMember] + public string partionName{ + get {return _partionName;} + set {_partionName = value;} + } + + + [DataMember] + public string mem{ + get {return _mem;} + set {_mem = value;} + } + + + [DataMember] + public int portNo{ + get {return _portNo;} + set {_portNo = value;} + } + + + [DataMember] + public int operater{ + get {return _operater;} + set {_operater = value;} + } + + + [DataMember] + public bool dr{ + get {return _dr;} + set {_dr = value;} + } + + + [DataMember] + public string createtime{ + get {return _createtime;} + set {_createtime = value;} + } + + + [DataMember] + public string lastmodified{ + get {return _lastmodified;} + set {_lastmodified = value;} + } + + + #endregion + + public WmsDeskCustomer getDbObject(){ + + WmsDeskCustomer dbObj = new WmsDeskCustomer(id); + dbObj.ID= id ; + dbObj.partion = partion; + + dbObj.deskId = deskId; + + dbObj.custid = custid; + + dbObj.custName = custName; + + dbObj.partionName = partionName; + + dbObj.mem = mem; + + dbObj.portNo = portNo; + + dbObj.operater = operater; + + return dbObj; + + } + + + + public WcfWmsDeskCustomer getWcfObject( WmsDeskCustomer dbObj){ + + WcfWmsDeskCustomer wcfObj = new WcfWmsDeskCustomer(); + wcfObj.id= dbObj.ID; + wcfObj.partion = dbObj.partion; + + wcfObj.deskId = dbObj.deskId; + + wcfObj.custid = dbObj.custid; + + wcfObj.custName = dbObj.custName; + + wcfObj.partionName = dbObj.partionName; + + wcfObj.mem = dbObj.mem; + + wcfObj.portNo = dbObj.portNo; + + wcfObj.operater = dbObj.operater; + + return wcfObj; + + } + + } + + + + #endregion +} diff --git a/winform/App.config b/winform/App.config index 2594902..333bede 100644 --- a/winform/App.config +++ b/winform/App.config @@ -152,6 +152,9 @@ openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" /> + @@ -249,6 +252,9 @@ + \ No newline at end of file diff --git a/winform/Service References/ServiceCustomer/CustomerService1.disco b/winform/Service References/ServiceCustomer/CustomerService1.disco deleted file mode 100644 index 097fb34..0000000 --- a/winform/Service References/ServiceCustomer/CustomerService1.disco +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/winform/Service References/ServiceCustomer/CustomerService1.wsdl b/winform/Service References/ServiceCustomer/CustomerService1.wsdl deleted file mode 100644 index 9751450..0000000 --- a/winform/Service References/ServiceCustomer/CustomerService1.wsdl +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/winform/Service References/ServiceCustomer/CustomerService4.xsd b/winform/Service References/ServiceCustomer/CustomerService4.xsd index 04a74a4..efc92e3 100644 --- a/winform/Service References/ServiceCustomer/CustomerService4.xsd +++ b/winform/Service References/ServiceCustomer/CustomerService4.xsd @@ -1,9 +1,20 @@ - - + + - + + + + + + + + + + + + - + \ No newline at end of file diff --git a/winform/Service References/ServiceCustomer/CustomerService41.xsd b/winform/Service References/ServiceCustomer/CustomerService41.xsd deleted file mode 100644 index 28a836a..0000000 --- a/winform/Service References/ServiceCustomer/CustomerService41.xsd +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/winform/Service References/ServiceCustomer/CustomerService42.xsd b/winform/Service References/ServiceCustomer/CustomerService42.xsd deleted file mode 100644 index d58e7f3..0000000 --- a/winform/Service References/ServiceCustomer/CustomerService42.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/winform/Service References/ServiceCustomer/CustomerService43.xsd b/winform/Service References/ServiceCustomer/CustomerService43.xsd deleted file mode 100644 index 0c0fb7a..0000000 --- a/winform/Service References/ServiceCustomer/CustomerService43.xsd +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/winform/Service References/ServiceCustomer/Reference.cs b/winform/Service References/ServiceCustomer/Reference.cs index 3dd27c3..a37f1fe 100644 --- a/winform/Service References/ServiceCustomer/Reference.cs +++ b/winform/Service References/ServiceCustomer/Reference.cs @@ -9,8 +9,231 @@ //------------------------------------------------------------------------------ namespace DeiNiu.wms.win.ServiceCustomer { + using System.Runtime.Serialization; + using System; + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] + [System.Runtime.Serialization.DataContractAttribute(Name="WcfWmsDeskCustomer", Namespace="http://schemas.datacontract.org/2004/07/DeiNiu.Wcf")] + [System.SerializableAttribute()] + public partial class WcfWmsDeskCustomer : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string createtimeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string custNameField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int custidField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int deskIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private bool drField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int idField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string lastmodifiedField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string memField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int operaterField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int partionField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string partionNameField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private int portNoField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData { + get { + return this.extensionDataField; + } + set { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string createtime { + get { + return this.createtimeField; + } + set { + if ((object.ReferenceEquals(this.createtimeField, value) != true)) { + this.createtimeField = value; + this.RaisePropertyChanged("createtime"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string custName { + get { + return this.custNameField; + } + set { + if ((object.ReferenceEquals(this.custNameField, value) != true)) { + this.custNameField = value; + this.RaisePropertyChanged("custName"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int custid { + get { + return this.custidField; + } + set { + if ((this.custidField.Equals(value) != true)) { + this.custidField = value; + this.RaisePropertyChanged("custid"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int deskId { + get { + return this.deskIdField; + } + set { + if ((this.deskIdField.Equals(value) != true)) { + this.deskIdField = value; + this.RaisePropertyChanged("deskId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public bool dr { + get { + return this.drField; + } + set { + if ((this.drField.Equals(value) != true)) { + this.drField = value; + this.RaisePropertyChanged("dr"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int id { + get { + return this.idField; + } + set { + if ((this.idField.Equals(value) != true)) { + this.idField = value; + this.RaisePropertyChanged("id"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string lastmodified { + get { + return this.lastmodifiedField; + } + set { + if ((object.ReferenceEquals(this.lastmodifiedField, value) != true)) { + this.lastmodifiedField = value; + this.RaisePropertyChanged("lastmodified"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string mem { + get { + return this.memField; + } + set { + if ((object.ReferenceEquals(this.memField, value) != true)) { + this.memField = value; + this.RaisePropertyChanged("mem"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int operater { + get { + return this.operaterField; + } + set { + if ((this.operaterField.Equals(value) != true)) { + this.operaterField = value; + this.RaisePropertyChanged("operater"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int partion { + get { + return this.partionField; + } + set { + if ((this.partionField.Equals(value) != true)) { + this.partionField = value; + this.RaisePropertyChanged("partion"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string partionName { + get { + return this.partionNameField; + } + set { + if ((object.ReferenceEquals(this.partionNameField, value) != true)) { + this.partionNameField = value; + this.RaisePropertyChanged("partionName"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public int portNo { + get { + return this.portNoField; + } + set { + if ((this.portNoField.Equals(value) != true)) { + this.portNoField = value; + this.RaisePropertyChanged("portNo"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] [System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceCustomer.ICustomer")] public interface ICustomer { @@ -26,6 +249,18 @@ namespace DeiNiu.wms.win.ServiceCustomer { [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomer/updatePickInterval", ReplyAction="http://tempuri.org/ICustomer/updatePickIntervalResponse")] int updatePickInterval(string[] Ids, int point); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomer/queryDesks", ReplyAction="http://tempuri.org/ICustomer/queryDesksResponse")] + System.Data.DataSet queryDesks(string querystr, int rownumStart, int rownumEnd); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomer/add", ReplyAction="http://tempuri.org/ICustomer/addResponse")] + int add(DeiNiu.wms.win.ServiceCustomer.WcfWmsDeskCustomer wcfData); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomer/delete", ReplyAction="http://tempuri.org/ICustomer/deleteResponse")] + int delete(int id); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomer/update", ReplyAction="http://tempuri.org/ICustomer/updateResponse")] + int update(DeiNiu.wms.win.ServiceCustomer.WcfWmsDeskCustomer wcfData); } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] @@ -70,5 +305,21 @@ namespace DeiNiu.wms.win.ServiceCustomer { public int updatePickInterval(string[] Ids, int point) { return base.Channel.updatePickInterval(Ids, point); } + + public System.Data.DataSet queryDesks(string querystr, int rownumStart, int rownumEnd) { + return base.Channel.queryDesks(querystr, rownumStart, rownumEnd); + } + + public int add(DeiNiu.wms.win.ServiceCustomer.WcfWmsDeskCustomer wcfData) { + return base.Channel.add(wcfData); + } + + public int delete(int id) { + return base.Channel.delete(id); + } + + public int update(DeiNiu.wms.win.ServiceCustomer.WcfWmsDeskCustomer wcfData) { + return base.Channel.update(wcfData); + } } } diff --git a/winform/Service References/ServiceCustomer/Reference.svcmap b/winform/Service References/ServiceCustomer/Reference.svcmap index d710bf3..eca4c89 100644 --- a/winform/Service References/ServiceCustomer/Reference.svcmap +++ b/winform/Service References/ServiceCustomer/Reference.svcmap @@ -18,15 +18,16 @@ - + - - - - - - + + + + + + + diff --git a/winform/Service References/ServiceCustomer/configuration.svcinfo b/winform/Service References/ServiceCustomer/configuration.svcinfo index 69387d0..05a0ef9 100644 --- a/winform/Service References/ServiceCustomer/configuration.svcinfo +++ b/winform/Service References/ServiceCustomer/configuration.svcinfo @@ -5,6 +5,6 @@ - + \ No newline at end of file diff --git a/winform/Service References/ServiceCustomer/configuration91.svcinfo b/winform/Service References/ServiceCustomer/configuration91.svcinfo index a88e295..8b40bb6 100644 --- a/winform/Service References/ServiceCustomer/configuration91.svcinfo +++ b/winform/Service References/ServiceCustomer/configuration91.svcinfo @@ -1,5 +1,5 @@ - + @@ -112,10 +112,10 @@ - + - http://localhost:10002/CustomerService.svc + http://localhost:12349/CustomerService.svc diff --git a/winform/epick/DeskCustomer.cs b/winform/epick/DeskCustomer.cs index ccc3325..65a2c69 100644 --- a/winform/epick/DeskCustomer.cs +++ b/winform/epick/DeskCustomer.cs @@ -11,7 +11,7 @@ using DevExpress.XtraEditors.Controls; using DevExpress.XtraGrid.Columns; using DevExpress.XtraGrid.Views.Base; using DevExpress.XtraGrid.Views.Grid; - +using DeiNiu.wms.Data.Model; namespace DeiNiu.wms.win { @@ -20,9 +20,10 @@ namespace DeiNiu.wms.win // lWmsDeskCustomer lwmsDc = new lWmsDeskCustomer(); - // WmsDeskCustomer deskCust = new WmsDeskCustomer(); + WmsDeskCustomer deskCust = new WmsDeskCustomer(); + ServiceCustomer.WcfWmsDeskCustomer wcfDesk = new ServiceCustomer.WcfWmsDeskCustomer(); - // private string fieldName = Wmslocation.fields.locationId.ToString(); + // private string fieldName = Wmslocation.fields.locationId.ToString(); private string lastQuery = ""; private DataTable dt; @@ -224,7 +225,8 @@ namespace DeiNiu.wms.win int start = (pager1.PageSize * (pager1.PageCurrent - 1) + 1); int end = (pager1.PageSize * pager1.PageCurrent); lastQuery = query; - DataSet ds = lwmsDc.Query(query, start, end); + DataSet ds = custClient.queryDesks(query, start, end); + custClient.Close(); dt = ds.Tables[0]; int cnt = Convert.ToInt32(ds.Tables[1].Rows[0][0].ToString()); @@ -341,8 +343,13 @@ namespace DeiNiu.wms.win deskCust.partionName = this.txtLine.Text; // deskCust.deskName = ""; deskCust.custName = this.txtCustName.Text; - return deskCust.partion > 0 && deskCust.deskId > 0 && deskCust.portNo > 0 && deskCust.custid > 0 && !string.IsNullOrEmpty(deskCust.custName); + + wcfDesk = WcfWmsDeskCustomer(deskCust); + + + return (deskCust.partion > 0 && deskCust.deskId > 0 && deskCust.portNo > 0 && deskCust.custid > 0 && !string.IsNullOrEmpty(deskCust.custName)); + } private bool validData() @@ -363,6 +370,30 @@ namespace DeiNiu.wms.win //return true; } + ServiceCustomer.WcfWmsDeskCustomer WcfWmsDeskCustomer(WmsDeskCustomer dbObj) + { + #region get data from dbobj + ServiceCustomer.WcfWmsDeskCustomer wcfDesk = new ServiceCustomer.WcfWmsDeskCustomer(); + wcfDesk.id = dbObj.ID; + wcfDesk.partion = dbObj.partion; + + wcfDesk.deskId = dbObj.deskId; + + wcfDesk.custid = dbObj.custid; + wcfDesk. custName = dbObj.custName; + + wcfDesk.partionName = dbObj.partionName; + + wcfDesk.mem = dbObj.mem; + + wcfDesk.portNo = dbObj.portNo; + + wcfDesk.operater = dbObj.operater; + return wcfDesk; + #endregion + + } + private void btnSave_Click(object sender, EventArgs e) @@ -578,13 +609,7 @@ namespace DeiNiu.wms.win } void startLocations() { - - if (!validNewLocations()) - { - return; - } - - + //Thread th = new Thread(new ThreadStart(this.newLocations)); //th.Start(); @@ -645,23 +670,6 @@ namespace DeiNiu.wms.win - void printLocations(DataTable dt) - { - if (dt == null || dt.Rows.Count == 0) - { - showErrorMsg("请先查询需要打印的数据,然后才能打印。"); - return; - } - MessageBoxButtons messButton = MessageBoxButtons.OKCancel; - DialogResult dr = MessageBox.Show(String.Format("确定要打印 {0}个标签吗?", dt.Rows.Count), "删除记录", messButton); - if (dr == DialogResult.OK) - { - //lgt.printLocations(dt); - string reportName = "wmsLocationCode.rdlc"; - BillPrint.Run(dt, reportName, PrinterType.code); - } - } - private void DeskCustomer_FormClosing(object sender, FormClosingEventArgs e) { @@ -747,7 +755,7 @@ namespace DeiNiu.wms.win private void bbiExport_ItemClick(object sender, ItemClickEventArgs e) { - exportExcel("", gridView1); + exportExcel( gridView1); } private void bbiImport_ItemClick(object sender, ItemClickEventArgs e) @@ -760,7 +768,7 @@ namespace DeiNiu.wms.win private void clearDeskCustmer() { - lwmsDc.trunckData(); + // custClient.trunckData(); } @@ -845,9 +853,11 @@ namespace DeiNiu.wms.win dc.custName = custName; dc.portNo = Convert.ToInt16(portNo); dc.mem = mem; - dc.partion = partion; - dc.Add(); + dc.partion = partion; + custClient.add(WcfWmsDeskCustomer(dc)); + closeClient(); + } } catch { } @@ -874,9 +884,9 @@ namespace DeiNiu.wms.win { if (validPorts()) { - int cnt = lwmsDc.setupPort(deskId, portNo, startId, endId); + // int cnt = lwmsDc.setupPort(deskId, portNo, startId, endId); closeWaitForm(); - showInfoMsg("共更新了 " + cnt + " 条记录"); + // showInfoMsg("共更新了 " + cnt + " 条记录"); } closeWaitForm(); } @@ -922,7 +932,7 @@ namespace DeiNiu.wms.win } private void btnExport_Click(object sender, EventArgs e) { - exportExcel("门店列表", gridView1); + exportExcel( gridView1,"门店列表"); } private void simpleButton1_Click_1(object sender, EventArgs e) @@ -940,18 +950,29 @@ namespace DeiNiu.wms.win } try { - if (setDataBack() && deskCust.Update() > 0) + if (setDataBack()) { - MessageBox.Show(deskCust.custName + "更新成功!"); - query(); - } - else - { - MessageBox.Show("更新失败"); + showWaitForm(); + if (custClient.update(wcfDesk) > 0) + { + MessageBox.Show(deskCust.custName + "更新成功!"); + query(); + closeWaitForm(); + } + else + { + closeWaitForm(); + MessageBox.Show("更新失败"); + } + closeClient(); + } + } catch (Exception er) { + closeWaitForm(); + closeClient(); showErrorMsg(er.Message); } } @@ -960,18 +981,32 @@ namespace DeiNiu.wms.win { try { - if (setDataBack() && deskCust.Add() > 0) + if (setDataBack()) { - MessageBox.Show(deskCust.custName + "新增成功!"); - query(); - } - else - { - MessageBox.Show("新增失败"); + // deskCust + showWaitForm(); + if (custClient.add(wcfDesk) > 0) + { + MessageBox.Show(deskCust.custName + "新增成功!"); + query(); + closeWaitForm(); + } + else + { + closeWaitForm(); + MessageBox.Show("新增失败"); + } + + closeClient(); + } + + } catch (Exception er) { + closeWaitForm(); + closeClient(); showErrorMsg(er.Message); } } @@ -990,12 +1025,30 @@ namespace DeiNiu.wms.win { return; } - - if (deskCust.Delete() > 0) + showWaitForm(); + try { - MessageBox.Show("删除成功"); - query(); + if (custClient.delete(deskCust.ID) > 0) + { + closeWaitForm(); + + MessageBox.Show("删除成功"); + query(); + } + else + { + MessageBox.Show("删除失败"); + } + closeWaitForm(); + closeClient(); } + catch (Exception er) + { + closeWaitForm(); + closeClient(); + showErrorMsg(er.Message); + } + } } } \ No newline at end of file diff --git a/winform/epick/DeskCustomer.designer.cs b/winform/epick/DeskCustomer.designer.cs index cafdd22..336afa6 100644 --- a/winform/epick/DeskCustomer.designer.cs +++ b/winform/epick/DeskCustomer.designer.cs @@ -878,7 +878,7 @@ this.btnDel.StyleController = this.layoutControl1; this.btnDel.TabIndex = 82; this.btnDel.Text = "删除"; - this.btnDel.Click += new System.EventHandler(this.btnDel_Click); + //this.btnDel.Click += new System.EventHandler(this.btnDel_Click); // // btnImport // diff --git a/winform/wms.csproj b/winform/wms.csproj index c932a40..585eaa1 100644 --- a/winform/wms.csproj +++ b/winform/wms.csproj @@ -212,6 +212,12 @@ True deiniuWMSDataSet5.xsd + + Form + + + DeskCustomer.cs + Form @@ -855,6 +861,9 @@ True 随货同行单3.xsd + + DeskCustomer.cs + Login.cs Designer @@ -1023,19 +1032,22 @@ Designer - + + + Designer + + + Designer + + + Designer + + + Designer + Designer - - Designer - - - Designer - - - Designer - Designer @@ -1263,7 +1275,6 @@ - @@ -1271,6 +1282,7 @@ + PreserveNewest @@ -2152,7 +2164,6 @@ -