541 lines
		
	
	
		
			18 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			541 lines
		
	
	
		
			18 KiB
		
	
	
	
		
			C#
		
	
	
	
| /// <summary>
 | |
| ///WCF Data Object 
 | |
| ///BASIC CLASS FOR TABLE t_erp_customer
 | |
| ///By wm  
 | |
| ///on 04/24/2022
 | |
| /// </summary>
 | |
|  
 | |
| using System;
 | |
| using System.Runtime.Serialization;
 | |
| using System.Data;
 | |
| namespace DeiNiu.wms.Data.Model.Wcf 
 | |
| {
 | |
| 
 | |
| 	#region WcfErp_customer
 | |
| 	/// <summary>
 | |
| 	/// This object represents the properties and methods of a WcfErp_customer.
 | |
|     /// </summary>
 | |
|     [DataContract]
 | |
| 	public class WcfErp_customer  { 
 | |
| 
 | |
|                     internal int _id;   
 | |
|                     internal string _entId;   
 | |
|                     internal string _custId;   
 | |
|                     internal string _custName;   
 | |
|                     internal int _custType;   
 | |
|                     internal string _alias;   
 | |
|                     internal string _address;   
 | |
|                     internal string _delivery;   
 | |
|                     internal string _phone1;   
 | |
|                     internal string _phone2;   
 | |
|                     internal string _manager;   
 | |
|                     internal string _contact;   
 | |
|                     internal string _zipcode;   
 | |
|                     internal string _fax;   
 | |
|                     internal string _eMail;   
 | |
|                     internal int _status;   
 | |
|                     internal string _province;   
 | |
|                     internal string _city;   
 | |
|                     internal string _district;   
 | |
|                     internal string _invoiceNo;   
 | |
|                     internal string _invoiceAddress;   
 | |
|                     internal string _invoiceHead;   
 | |
|                     internal string _pinyin;   
 | |
|                     internal string _ext1;   
 | |
|                     internal string _ext2;   
 | |
|                     internal string _ext3;   
 | |
|                     internal string _ext4;   
 | |
|                     internal int _operater;   
 | |
|                     internal bool _dr;   
 | |
|                     internal string _createtime;   
 | |
|                     internal string _lastmodified;   
 | |
| 		
 | |
| 		public  WcfErp_customer () {
 | |
| 		}
 | |
| 		 
 | |
|         public  WcfErp_customer (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("entId") && !(dr["entId"] is DBNull))
 | |
|                         {
 | |
|                              _entId =  dr["entId"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("custId") && !(dr["custId"] is DBNull))
 | |
|                         {
 | |
|                              _custId =  dr["custId"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("custName") && !(dr["custName"] is DBNull))
 | |
|                         {
 | |
|                              _custName =  dr["custName"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("custType") && !(dr["custType"] is DBNull))
 | |
|                         {
 | |
|                              _custType =   Convert.ToInt32(dr["custType"].ToString()); ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("alias") && !(dr["alias"] is DBNull))
 | |
|                         {
 | |
|                              _alias =  dr["alias"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("address") && !(dr["address"] is DBNull))
 | |
|                         {
 | |
|                              _address =  dr["address"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("delivery") && !(dr["delivery"] is DBNull))
 | |
|                         {
 | |
|                              _delivery =  dr["delivery"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("phone1") && !(dr["phone1"] is DBNull))
 | |
|                         {
 | |
|                              _phone1 =  dr["phone1"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("phone2") && !(dr["phone2"] is DBNull))
 | |
|                         {
 | |
|                              _phone2 =  dr["phone2"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("manager") && !(dr["manager"] is DBNull))
 | |
|                         {
 | |
|                              _manager =  dr["manager"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("contact") && !(dr["contact"] is DBNull))
 | |
|                         {
 | |
|                              _contact =  dr["contact"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("zipcode") && !(dr["zipcode"] is DBNull))
 | |
|                         {
 | |
|                              _zipcode =  dr["zipcode"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("fax") && !(dr["fax"] is DBNull))
 | |
|                         {
 | |
|                              _fax =  dr["fax"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("eMail") && !(dr["eMail"] is DBNull))
 | |
|                         {
 | |
|                              _eMail =  dr["eMail"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("status") && !(dr["status"] is DBNull))
 | |
|                         {
 | |
|                              _status =   Convert.ToInt32(dr["status"].ToString()); ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("province") && !(dr["province"] is DBNull))
 | |
|                         {
 | |
|                              _province =  dr["province"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("city") && !(dr["city"] is DBNull))
 | |
|                         {
 | |
|                              _city =  dr["city"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("district") && !(dr["district"] is DBNull))
 | |
|                         {
 | |
|                              _district =  dr["district"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("invoiceNo") && !(dr["invoiceNo"] is DBNull))
 | |
|                         {
 | |
|                              _invoiceNo =  dr["invoiceNo"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("invoiceAddress") && !(dr["invoiceAddress"] is DBNull))
 | |
|                         {
 | |
|                              _invoiceAddress =  dr["invoiceAddress"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("invoiceHead") && !(dr["invoiceHead"] is DBNull))
 | |
|                         {
 | |
|                              _invoiceHead =  dr["invoiceHead"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("pinyin") && !(dr["pinyin"] is DBNull))
 | |
|                         {
 | |
|                              _pinyin =  dr["pinyin"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("ext1") && !(dr["ext1"] is DBNull))
 | |
|                         {
 | |
|                              _ext1 =  dr["ext1"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("ext2") && !(dr["ext2"] is DBNull))
 | |
|                         {
 | |
|                              _ext2 =  dr["ext2"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("ext3") && !(dr["ext3"] is DBNull))
 | |
|                         {
 | |
|                              _ext3 =  dr["ext3"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("ext4") && !(dr["ext4"] is DBNull))
 | |
|                         {
 | |
|                              _ext4 =  dr["ext4"].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
 | |
|           }
 | |
| 
 | |
| 		#region Public Properties 
 | |
|       
 | |
|        [DataMember]
 | |
|         public  int   id{
 | |
| 			get {return _id;}
 | |
| 			 set {_id = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  entId{
 | |
| 			get {return _entId;}
 | |
| 			 set {_entId = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  custId{
 | |
| 			get {return _custId;}
 | |
| 			 set {_custId = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  custName{
 | |
| 			get {return _custName;}
 | |
| 			 set {_custName = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public  int   custType{
 | |
| 			get {return _custType;}
 | |
| 			 set {_custType = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  alias{
 | |
| 			get {return _alias;}
 | |
| 			 set {_alias = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  address{
 | |
| 			get {return _address;}
 | |
| 			 set {_address = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  delivery{
 | |
| 			get {return _delivery;}
 | |
| 			 set {_delivery = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  phone1{
 | |
| 			get {return _phone1;}
 | |
| 			 set {_phone1 = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  phone2{
 | |
| 			get {return _phone2;}
 | |
| 			 set {_phone2 = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  manager{
 | |
| 			get {return _manager;}
 | |
| 			 set {_manager = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  contact{
 | |
| 			get {return _contact;}
 | |
| 			 set {_contact = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  zipcode{
 | |
| 			get {return _zipcode;}
 | |
| 			 set {_zipcode = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  fax{
 | |
| 			get {return _fax;}
 | |
| 			 set {_fax = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  eMail{
 | |
| 			get {return _eMail;}
 | |
| 			 set {_eMail = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public  int   status{
 | |
| 			get {return _status;}
 | |
| 			 set {_status = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  province{
 | |
| 			get {return _province;}
 | |
| 			 set {_province = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  city{
 | |
| 			get {return _city;}
 | |
| 			 set {_city = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  district{
 | |
| 			get {return _district;}
 | |
| 			 set {_district = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  invoiceNo{
 | |
| 			get {return _invoiceNo;}
 | |
| 			 set {_invoiceNo = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  invoiceAddress{
 | |
| 			get {return _invoiceAddress;}
 | |
| 			 set {_invoiceAddress = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  invoiceHead{
 | |
| 			get {return _invoiceHead;}
 | |
| 			 set {_invoiceHead = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  pinyin{
 | |
| 			get {return _pinyin;}
 | |
| 			 set {_pinyin = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  ext1{
 | |
| 			get {return _ext1;}
 | |
| 			 set {_ext1 = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  ext2{
 | |
| 			get {return _ext2;}
 | |
| 			 set {_ext2 = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  ext3{
 | |
| 			get {return _ext3;}
 | |
| 			 set {_ext3 = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  ext4{
 | |
| 			get {return _ext4;}
 | |
| 			 set {_ext4 = 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  Erp_customer getDbObject(){   
 | |
|     
 | |
|           Erp_customer dbObj = new  Erp_customer(id);     
 | |
|                   dbObj.ID= id  ;                                        
 | |
|           dbObj.entId = entId;  
 | |
|                                         
 | |
|           dbObj.custId = custId;  
 | |
|                                         
 | |
|           dbObj.custName = custName;  
 | |
|                                         
 | |
|           dbObj.custType = custType;  
 | |
|                                         
 | |
|           dbObj.alias = alias;  
 | |
|                                         
 | |
|           dbObj.address = address;  
 | |
|                                         
 | |
|           dbObj.delivery = delivery;  
 | |
|                                         
 | |
|           dbObj.phone1 = phone1;  
 | |
|                                         
 | |
|           dbObj.phone2 = phone2;  
 | |
|                                         
 | |
|           dbObj.manager = manager;  
 | |
|                                         
 | |
|           dbObj.contact = contact;  
 | |
|                                         
 | |
|           dbObj.zipcode = zipcode;  
 | |
|                                         
 | |
|           dbObj.fax = fax;  
 | |
|                                         
 | |
|           dbObj.eMail = eMail;  
 | |
|                                         
 | |
|           dbObj.status = status;  
 | |
|                                         
 | |
|           dbObj.province = province;  
 | |
|                                         
 | |
|           dbObj.city = city;  
 | |
|                                         
 | |
|           dbObj.district = district;  
 | |
|                                         
 | |
|           dbObj.invoiceNo = invoiceNo;  
 | |
|                                         
 | |
|           dbObj.invoiceAddress = invoiceAddress;  
 | |
|                                         
 | |
|           dbObj.invoiceHead = invoiceHead;  
 | |
|                                         
 | |
|           dbObj.pinyin = pinyin;  
 | |
|                                         
 | |
|           dbObj.ext1 = ext1;  
 | |
|                                         
 | |
|           dbObj.ext2 = ext2;  
 | |
|                                         
 | |
|           dbObj.ext3 = ext3;  
 | |
|                                         
 | |
|           dbObj.ext4 = ext4;  
 | |
|                                         
 | |
|           dbObj.operater = operater;  
 | |
|           
 | |
|            return dbObj;
 | |
|     
 | |
|         }
 | |
|      
 | |
| 	 
 | |
|     
 | |
|     	public  WcfErp_customer getWcfObject( Erp_customer dbObj){   
 | |
|     
 | |
|           WcfErp_customer wcfObj = new  WcfErp_customer();     
 | |
|                      wcfObj.id= dbObj.ID;                                      
 | |
|                       wcfObj.entId = dbObj.entId;  
 | |
|                                       
 | |
|                       wcfObj.custId = dbObj.custId;  
 | |
|                                       
 | |
|                       wcfObj.custName = dbObj.custName;  
 | |
|                                       
 | |
|                       wcfObj.custType = dbObj.custType;  
 | |
|                                       
 | |
|                       wcfObj.alias = dbObj.alias;  
 | |
|                                       
 | |
|                       wcfObj.address = dbObj.address;  
 | |
|                                       
 | |
|                       wcfObj.delivery = dbObj.delivery;  
 | |
|                                       
 | |
|                       wcfObj.phone1 = dbObj.phone1;  
 | |
|                                       
 | |
|                       wcfObj.phone2 = dbObj.phone2;  
 | |
|                                       
 | |
|                       wcfObj.manager = dbObj.manager;  
 | |
|                                       
 | |
|                       wcfObj.contact = dbObj.contact;  
 | |
|                                       
 | |
|                       wcfObj.zipcode = dbObj.zipcode;  
 | |
|                                       
 | |
|                       wcfObj.fax = dbObj.fax;  
 | |
|                                       
 | |
|                       wcfObj.eMail = dbObj.eMail;  
 | |
|                                       
 | |
|                       wcfObj.status = dbObj.status;  
 | |
|                                       
 | |
|                       wcfObj.province = dbObj.province;  
 | |
|                                       
 | |
|                       wcfObj.city = dbObj.city;  
 | |
|                                       
 | |
|                       wcfObj.district = dbObj.district;  
 | |
|                                       
 | |
|                       wcfObj.invoiceNo = dbObj.invoiceNo;  
 | |
|                                       
 | |
|                       wcfObj.invoiceAddress = dbObj.invoiceAddress;  
 | |
|                                       
 | |
|                       wcfObj.invoiceHead = dbObj.invoiceHead;  
 | |
|                                       
 | |
|                       wcfObj.pinyin = dbObj.pinyin;  
 | |
|                                       
 | |
|                       wcfObj.ext1 = dbObj.ext1;  
 | |
|                                       
 | |
|                       wcfObj.ext2 = dbObj.ext2;  
 | |
|                                       
 | |
|                       wcfObj.ext3 = dbObj.ext3;  
 | |
|                                       
 | |
|                       wcfObj.ext4 = dbObj.ext4;  
 | |
|                                       
 | |
|                       wcfObj.operater = dbObj.operater;  
 | |
|           
 | |
|            return wcfObj;
 | |
|     
 | |
|         }
 | |
|      
 | |
| 	}
 | |
|     
 | |
|     
 | |
|     
 | |
| 	#endregion
 | |
| }
 |