///
///WCF Data Object
///BASIC CLASS FOR TABLE t_erp_purch_receive_pre
///By wm
///on 06/07/2023
///
using System;
using System.Runtime.Serialization;
using System.Data;
namespace DeiNiu.wms.Data.Model.Wcf
{
#region WcfErp_purch_receive_pre
///
/// This object represents the properties and methods of a WcfErp_purch_receive_pre.
///
[DataContract]
public class WcfErp_purch_receive_pre {
internal int _id;
internal string _preInOrderNo= String.Empty;
internal string _pur_order= String.Empty;
internal int _orderType;
internal int _purch_d_id;
internal int _shipId;
internal decimal _arriveCount;
internal decimal _receiveCount;
internal decimal _validCount;
internal decimal _onShelfCount;
internal string _mem= String.Empty;
internal int _operater;
internal bool _dr;
internal string _createtime= String.Empty;
internal string _lastmodified= String.Empty;
public WcfErp_purch_receive_pre () {
}
public WcfErp_purch_receive_pre (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("preInOrderNo") && !(dr["preInOrderNo"] is DBNull))
{
_preInOrderNo = dr["preInOrderNo"].ToString() ;
}
if (dr.Table.Columns.Contains("pur_order") && !(dr["pur_order"] is DBNull))
{
_pur_order = dr["pur_order"].ToString() ;
}
if (dr.Table.Columns.Contains("orderType") && !(dr["orderType"] is DBNull))
{
_orderType = Convert.ToInt32(dr["orderType"].ToString()); ;
}
if (dr.Table.Columns.Contains("purch_d_id") && !(dr["purch_d_id"] is DBNull))
{
_purch_d_id = Convert.ToInt32(dr["purch_d_id"].ToString()); ;
}
if (dr.Table.Columns.Contains("shipId") && !(dr["shipId"] is DBNull))
{
_shipId = Convert.ToInt32(dr["shipId"].ToString()); ;
}
if (dr.Table.Columns.Contains("arriveCount") && !(dr["arriveCount"] is DBNull))
{
_arriveCount = Convert.ToDecimal(dr["arriveCount"].ToString()); ;
}
if (dr.Table.Columns.Contains("receiveCount") && !(dr["receiveCount"] is DBNull))
{
_receiveCount = Convert.ToDecimal(dr["receiveCount"].ToString()); ;
}
if (dr.Table.Columns.Contains("validCount") && !(dr["validCount"] is DBNull))
{
_validCount = Convert.ToDecimal(dr["validCount"].ToString()); ;
}
if (dr.Table.Columns.Contains("onShelfCount") && !(dr["onShelfCount"] is DBNull))
{
_onShelfCount = Convert.ToDecimal(dr["onShelfCount"].ToString()); ;
}
if (dr.Table.Columns.Contains("mem") && !(dr["mem"] is DBNull))
{
_mem = dr["mem"].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 WcfErp_purch_receive_pre( Erp_purch_receive_pre dbObj){
#region get data from dbobj
_id= dbObj.ID;
preInOrderNo = dbObj.preInOrderNo;
pur_order = dbObj.pur_order;
orderType = dbObj.orderType;
purch_d_id = dbObj.purch_d_id;
shipId = dbObj.shipId;
arriveCount = dbObj.arriveCount;
receiveCount = dbObj.receiveCount;
validCount = dbObj.validCount;
onShelfCount = dbObj.onShelfCount;
mem = dbObj.mem;
operater = dbObj.operater;
#endregion
}
#region Public Properties
[DataMember]
public int id{
get {return _id;}
set {_id = value;}
}
[DataMember]
public string preInOrderNo{
get {return _preInOrderNo;}
set {_preInOrderNo = value;}
}
[DataMember]
public string pur_order{
get {return _pur_order;}
set {_pur_order = value;}
}
[DataMember]
public int orderType{
get {return _orderType;}
set {_orderType = value;}
}
[DataMember]
public int purch_d_id{
get {return _purch_d_id;}
set {_purch_d_id = value;}
}
[DataMember]
public int shipId{
get {return _shipId;}
set {_shipId = value;}
}
[DataMember]
public decimal arriveCount{
get {return _arriveCount;}
set {_arriveCount = value;}
}
[DataMember]
public decimal receiveCount{
get {return _receiveCount;}
set {_receiveCount = value;}
}
[DataMember]
public decimal validCount{
get {return _validCount;}
set {_validCount = value;}
}
[DataMember]
public decimal onShelfCount{
get {return _onShelfCount;}
set {_onShelfCount = value;}
}
[DataMember]
public string mem{
get {return _mem;}
set {_mem = 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_purch_receive_pre getDbObject(){
Erp_purch_receive_pre dbObj = new Erp_purch_receive_pre(id);
dbObj.ID= id ;
dbObj.preInOrderNo = preInOrderNo;
dbObj.pur_order = pur_order;
dbObj.orderType = orderType;
dbObj.purch_d_id = purch_d_id;
dbObj.shipId = shipId;
dbObj.arriveCount = arriveCount;
dbObj.receiveCount = receiveCount;
dbObj.validCount = validCount;
dbObj.onShelfCount = onShelfCount;
dbObj.mem = mem;
dbObj.operater = operater;
return dbObj;
}
public WcfErp_purch_receive_pre getWcfObject( Erp_purch_receive_pre dbObj){
WcfErp_purch_receive_pre wcfObj = new WcfErp_purch_receive_pre();
wcfObj.id= dbObj.ID;
wcfObj.preInOrderNo = dbObj.preInOrderNo;
wcfObj.pur_order = dbObj.pur_order;
wcfObj.orderType = dbObj.orderType;
wcfObj.purch_d_id = dbObj.purch_d_id;
wcfObj.shipId = dbObj.shipId;
wcfObj.arriveCount = dbObj.arriveCount;
wcfObj.receiveCount = dbObj.receiveCount;
wcfObj.validCount = dbObj.validCount;
wcfObj.onShelfCount = dbObj.onShelfCount;
wcfObj.mem = dbObj.mem;
wcfObj.operater = dbObj.operater;
return wcfObj;
}
}
#endregion
}