335 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			335 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			C#
		
	
	
	
| /// <summary>
 | |
| ///WCF Data Object 
 | |
| ///BASIC CLASS FOR TABLE t_erpOrgDoc
 | |
| ///By wm  
 | |
| ///on 06/06/2023
 | |
| /// </summary>
 | |
|  
 | |
| using System;
 | |
| using System.Runtime.Serialization;
 | |
| using System.Data;
 | |
| namespace DeiNiu.wms.Data.Model.Wcf 
 | |
| {
 | |
| 
 | |
| 	#region WcfErpOrgDoc
 | |
| 	/// <summary>
 | |
| 	/// This object represents the properties and methods of a WcfErpOrgDoc.
 | |
|     /// </summary>
 | |
|     [DataContract]
 | |
| 	public class WcfErpOrgDoc  { 
 | |
| 
 | |
|                     internal int _id;   
 | |
|                     internal string _ORGID= String.Empty;   
 | |
|                     internal string _ORGCODE= String.Empty;   
 | |
|                     internal string _ENTID= String.Empty;   
 | |
|                     internal string _ORGNAME= String.Empty;   
 | |
|                     internal string _alias= String.Empty;   
 | |
|                     internal string _description= String.Empty;   
 | |
|                     internal string _contact= String.Empty;   
 | |
|                     internal string _address= String.Empty;   
 | |
|                     internal string _phone= String.Empty;   
 | |
|                     internal string _fax= String.Empty;   
 | |
|                     internal int _status;   
 | |
|                     internal string _invoiceNo= String.Empty;   
 | |
|                     internal string _invoiceAddress= String.Empty;   
 | |
|                     internal string _invoiceHead= String.Empty;   
 | |
| 		
 | |
| 		public  WcfErpOrgDoc () {
 | |
| 		}
 | |
| 		 
 | |
|         public  WcfErpOrgDoc (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("ORGID") && !(dr["ORGID"] is DBNull))
 | |
|                         {
 | |
|                              _ORGID =  dr["ORGID"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("ORGCODE") && !(dr["ORGCODE"] is DBNull))
 | |
|                         {
 | |
|                              _ORGCODE =  dr["ORGCODE"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("ENTID") && !(dr["ENTID"] is DBNull))
 | |
|                         {
 | |
|                              _ENTID =  dr["ENTID"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("ORGNAME") && !(dr["ORGNAME"] is DBNull))
 | |
|                         {
 | |
|                              _ORGNAME =  dr["ORGNAME"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("alias") && !(dr["alias"] is DBNull))
 | |
|                         {
 | |
|                              _alias =  dr["alias"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("description") && !(dr["description"] is DBNull))
 | |
|                         {
 | |
|                              _description =  dr["description"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("contact") && !(dr["contact"] is DBNull))
 | |
|                         {
 | |
|                              _contact =  dr["contact"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("address") && !(dr["address"] is DBNull))
 | |
|                         {
 | |
|                              _address =  dr["address"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("phone") && !(dr["phone"] is DBNull))
 | |
|                         {
 | |
|                              _phone =  dr["phone"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("fax") && !(dr["fax"] is DBNull))
 | |
|                         {
 | |
|                              _fax =  dr["fax"].ToString() ;
 | |
|                         }
 | |
|                     if (dr.Table.Columns.Contains("status") && !(dr["status"] is DBNull))
 | |
|                         {
 | |
|                              _status =   Convert.ToInt32(dr["status"].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() ;
 | |
|                         }
 | |
|              }
 | |
|              #endregion
 | |
|           }
 | |
|           
 | |
|          public WcfErpOrgDoc( ErpOrgDoc dbObj){   
 | |
|             #region get data from dbobj 
 | |
|            
 | |
|                         _id= dbObj.ID;                                          
 | |
|                           ORGID = dbObj.ORGID;  
 | |
|                                           
 | |
|                           ORGCODE = dbObj.ORGCODE;  
 | |
|                                           
 | |
|                           ENTID = dbObj.ENTID;  
 | |
|                                           
 | |
|                           ORGNAME = dbObj.ORGNAME;  
 | |
|                                           
 | |
|                           alias = dbObj.alias;  
 | |
|                                           
 | |
|                           description = dbObj.description;  
 | |
|                                           
 | |
|                           contact = dbObj.contact;  
 | |
|                                           
 | |
|                           address = dbObj.address;  
 | |
|                                           
 | |
|                           phone = dbObj.phone;  
 | |
|                                           
 | |
|                           fax = dbObj.fax;  
 | |
|                                           
 | |
|                           status = dbObj.status;  
 | |
|                                           
 | |
|                           invoiceNo = dbObj.invoiceNo;  
 | |
|                                           
 | |
|                           invoiceAddress = dbObj.invoiceAddress;  
 | |
|                                           
 | |
|                           invoiceHead = dbObj.invoiceHead;  
 | |
|           
 | |
|            #endregion
 | |
|     
 | |
|         }
 | |
|         
 | |
|         
 | |
| 
 | |
| 		#region Public Properties 
 | |
|       
 | |
|        [DataMember]
 | |
|         public  int   id{
 | |
| 			get {return _id;}
 | |
| 			 set {_id = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  ORGID{
 | |
| 			get {return _ORGID;}
 | |
| 			 set {_ORGID = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  ORGCODE{
 | |
| 			get {return _ORGCODE;}
 | |
| 			 set {_ORGCODE = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  ENTID{
 | |
| 			get {return _ENTID;}
 | |
| 			 set {_ENTID = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  ORGNAME{
 | |
| 			get {return _ORGNAME;}
 | |
| 			 set {_ORGNAME = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  alias{
 | |
| 			get {return _alias;}
 | |
| 			 set {_alias = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  description{
 | |
| 			get {return _description;}
 | |
| 			 set {_description = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  contact{
 | |
| 			get {return _contact;}
 | |
| 			 set {_contact = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  address{
 | |
| 			get {return _address;}
 | |
| 			 set {_address = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  phone{
 | |
| 			get {return _phone;}
 | |
| 			 set {_phone = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public string  fax{
 | |
| 			get {return _fax;}
 | |
| 			 set {_fax = value;}  
 | |
| 		}  
 | |
|         
 | |
|       
 | |
|        [DataMember]
 | |
|         public  int   status{
 | |
| 			get {return _status;}
 | |
| 			 set {_status = 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;}  
 | |
| 		}  
 | |
|         
 | |
| 		 
 | |
| 		#endregion
 | |
|              
 | |
| 	public  ErpOrgDoc getDbObject(){   
 | |
|     
 | |
|           ErpOrgDoc dbObj = new  ErpOrgDoc(id);     
 | |
|                   dbObj.ID= id  ;                                        
 | |
|           dbObj.ORGID = ORGID;  
 | |
|                                         
 | |
|           dbObj.ORGCODE = ORGCODE;  
 | |
|                                         
 | |
|           dbObj.ENTID = ENTID;  
 | |
|                                         
 | |
|           dbObj.ORGNAME = ORGNAME;  
 | |
|                                         
 | |
|           dbObj.alias = alias;  
 | |
|                                         
 | |
|           dbObj.description = description;  
 | |
|                                         
 | |
|           dbObj.contact = contact;  
 | |
|                                         
 | |
|           dbObj.address = address;  
 | |
|                                         
 | |
|           dbObj.phone = phone;  
 | |
|                                         
 | |
|           dbObj.fax = fax;  
 | |
|                                         
 | |
|           dbObj.status = status;  
 | |
|                                         
 | |
|           dbObj.invoiceNo = invoiceNo;  
 | |
|                                         
 | |
|           dbObj.invoiceAddress = invoiceAddress;  
 | |
|                                         
 | |
|           dbObj.invoiceHead = invoiceHead;  
 | |
|           
 | |
|            return dbObj;
 | |
|     
 | |
|         }
 | |
|      
 | |
| 	 
 | |
|     
 | |
|     	public  WcfErpOrgDoc getWcfObject( ErpOrgDoc dbObj){   
 | |
|     
 | |
|           WcfErpOrgDoc wcfObj = new  WcfErpOrgDoc();     
 | |
|                      wcfObj.id= dbObj.ID;                                      
 | |
|                       wcfObj.ORGID = dbObj.ORGID;  
 | |
|                                       
 | |
|                       wcfObj.ORGCODE = dbObj.ORGCODE;  
 | |
|                                       
 | |
|                       wcfObj.ENTID = dbObj.ENTID;  
 | |
|                                       
 | |
|                       wcfObj.ORGNAME = dbObj.ORGNAME;  
 | |
|                                       
 | |
|                       wcfObj.alias = dbObj.alias;  
 | |
|                                       
 | |
|                       wcfObj.description = dbObj.description;  
 | |
|                                       
 | |
|                       wcfObj.contact = dbObj.contact;  
 | |
|                                       
 | |
|                       wcfObj.address = dbObj.address;  
 | |
|                                       
 | |
|                       wcfObj.phone = dbObj.phone;  
 | |
|                                       
 | |
|                       wcfObj.fax = dbObj.fax;  
 | |
|                                       
 | |
|                       wcfObj.status = dbObj.status;  
 | |
|                                       
 | |
|                       wcfObj.invoiceNo = dbObj.invoiceNo;  
 | |
|                                       
 | |
|                       wcfObj.invoiceAddress = dbObj.invoiceAddress;  
 | |
|                                       
 | |
|                       wcfObj.invoiceHead = dbObj.invoiceHead;  
 | |
|           
 | |
|            return wcfObj;
 | |
|     
 | |
|         }
 | |
|      
 | |
| 	}
 | |
|     
 | |
|     
 | |
|     
 | |
| 	#endregion
 | |
| }
 |