241 lines
7.2 KiB
C#
241 lines
7.2 KiB
C#
|
/// <summary>
|
|||
|
///WCF Data Object
|
|||
|
///BASIC CLASS FOR TABLE t_online
|
|||
|
///By wm
|
|||
|
///on 06/18/2022
|
|||
|
/// </summary>
|
|||
|
|
|||
|
using System;
|
|||
|
using System.Runtime.Serialization;
|
|||
|
using System.Data;
|
|||
|
namespace DeiNiu.wms.Data.Model.Wcf
|
|||
|
{
|
|||
|
|
|||
|
#region WcfOnline
|
|||
|
/// <summary>
|
|||
|
/// This object represents the properties and methods of a WcfOnline.
|
|||
|
/// </summary>
|
|||
|
[DataContract]
|
|||
|
public class WcfOnline {
|
|||
|
|
|||
|
internal int _id;
|
|||
|
internal string _custId;
|
|||
|
internal string _custName;
|
|||
|
internal string _contact;
|
|||
|
internal string _phone;
|
|||
|
internal int _state;
|
|||
|
internal string _msg;
|
|||
|
internal string _endDate;
|
|||
|
internal bool _dr;
|
|||
|
internal int _operater;
|
|||
|
internal string _create_time;
|
|||
|
internal string _lastmodified;
|
|||
|
|
|||
|
public WcfOnline () {
|
|||
|
}
|
|||
|
|
|||
|
public WcfOnline (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("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("contact") && !(dr["contact"] is DBNull))
|
|||
|
{
|
|||
|
_contact = dr["contact"].ToString() ;
|
|||
|
}
|
|||
|
if (dr.Table.Columns.Contains("phone") && !(dr["phone"] is DBNull))
|
|||
|
{
|
|||
|
_phone = dr["phone"].ToString() ;
|
|||
|
}
|
|||
|
if (dr.Table.Columns.Contains("state") && !(dr["state"] is DBNull))
|
|||
|
{
|
|||
|
_state = Convert.ToInt32(dr["state"].ToString()); ;
|
|||
|
}
|
|||
|
if (dr.Table.Columns.Contains("msg") && !(dr["msg"] is DBNull))
|
|||
|
{
|
|||
|
_msg = dr["msg"].ToString() ;
|
|||
|
}
|
|||
|
if (dr.Table.Columns.Contains("endDate") && !(dr["endDate"] is DBNull))
|
|||
|
{
|
|||
|
_endDate = dr["endDate"].ToString() ;
|
|||
|
}
|
|||
|
if (dr.Table.Columns.Contains("dr") && !(dr["dr"] is DBNull))
|
|||
|
{
|
|||
|
_dr = Convert.ToBoolean(dr["dr"].ToString()); ;
|
|||
|
}
|
|||
|
if (dr.Table.Columns.Contains("operater") && !(dr["operater"] is DBNull))
|
|||
|
{
|
|||
|
_operater = Convert.ToInt32(dr["operater"].ToString()); ;
|
|||
|
}
|
|||
|
if (dr.Table.Columns.Contains("create_time") && !(dr["create_time"] is DBNull))
|
|||
|
{
|
|||
|
_create_time = dr["create_time"].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 custId{
|
|||
|
get {return _custId;}
|
|||
|
set {_custId = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public string custName{
|
|||
|
get {return _custName;}
|
|||
|
set {_custName = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public string contact{
|
|||
|
get {return _contact;}
|
|||
|
set {_contact = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public string phone{
|
|||
|
get {return _phone;}
|
|||
|
set {_phone = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public int state{
|
|||
|
get {return _state;}
|
|||
|
set {_state = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public string msg{
|
|||
|
get {return _msg;}
|
|||
|
set {_msg = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public string endDate{
|
|||
|
get {return _endDate;}
|
|||
|
set {_endDate = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public bool dr{
|
|||
|
get {return _dr;}
|
|||
|
set {_dr = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public int operater{
|
|||
|
get {return _operater;}
|
|||
|
set {_operater = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public string create_time{
|
|||
|
get {return _create_time;}
|
|||
|
set {_create_time = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[DataMember]
|
|||
|
public string lastmodified{
|
|||
|
get {return _lastmodified;}
|
|||
|
set {_lastmodified = value;}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
public Online getDbObject(){
|
|||
|
|
|||
|
Online dbObj = new Online(id);
|
|||
|
dbObj.ID= id ;
|
|||
|
dbObj.custId = custId;
|
|||
|
|
|||
|
dbObj.custName = custName;
|
|||
|
|
|||
|
dbObj.contact = contact;
|
|||
|
|
|||
|
dbObj.phone = phone;
|
|||
|
|
|||
|
dbObj.state = state;
|
|||
|
|
|||
|
dbObj.msg = msg;
|
|||
|
|
|||
|
dbObj.endDate = endDate;
|
|||
|
|
|||
|
dbObj.operater = operater;
|
|||
|
|
|||
|
dbObj.create_time = create_time;
|
|||
|
|
|||
|
return dbObj;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
public WcfOnline getWcfObject( Online dbObj){
|
|||
|
|
|||
|
WcfOnline wcfObj = new WcfOnline();
|
|||
|
wcfObj.id= dbObj.ID;
|
|||
|
wcfObj.custId = dbObj.custId;
|
|||
|
|
|||
|
wcfObj.custName = dbObj.custName;
|
|||
|
|
|||
|
wcfObj.contact = dbObj.contact;
|
|||
|
|
|||
|
wcfObj.phone = dbObj.phone;
|
|||
|
|
|||
|
wcfObj.state = dbObj.state;
|
|||
|
|
|||
|
wcfObj.msg = dbObj.msg;
|
|||
|
|
|||
|
wcfObj.endDate = dbObj.endDate;
|
|||
|
|
|||
|
wcfObj.operater = dbObj.operater;
|
|||
|
|
|||
|
wcfObj.create_time = dbObj.create_time;
|
|||
|
|
|||
|
return wcfObj;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|