2023-05-23 16:13:17 +08:00
/// <summary>
///Data Implemention Object
///BASIC CRUD CLASS FOR TABLE t_wmsLocation
///By wm
2024-02-06 19:36:47 +08:00
///on 12/04/2023
2023-05-23 16:13:17 +08:00
/// </summary>
using System ;
using DeiNiu.Utils ;
using System.Data.SqlClient ;
using DeiNiu.Data.BaseObject ;
using System.Data ;
namespace DeiNiu.wms.Data.Model
{
#region WmsLocation_base_Imp
[Serializable] class WmsLocation_base_Imp : BaseModel_Imp {
protected override void datarowToModel ( DataRow dr , BaseModel obj )
{
if ( dr ! = null )
{
WmsLocation_base tmpObj = ( WmsLocation_base ) obj ;
if ( dr . Table . Columns . Contains ( "id" ) & & ! ( dr [ "id" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . ID = Convert . ToInt32 ( dr [ "id" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "id" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "locationId" ) & & ! ( dr [ "locationId" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _locationId = dr [ "locationId" ] . ToString ( ) ;
tmpObj . _OlocationId = dr [ "locationId" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "locationId" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "locationId128" ) & & ! ( dr [ "locationId128" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _locationId128 = dr [ "locationId128" ] . ToString ( ) ;
tmpObj . _OlocationId128 = dr [ "locationId128" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "locationId128" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "ownerCode" ) & & ! ( dr [ "ownerCode" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _ownerCode = dr [ "ownerCode" ] . ToString ( ) ;
tmpObj . _OownerCode = dr [ "ownerCode" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "ownerCode" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "warehouse" ) & & ! ( dr [ "warehouse" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _warehouse = Convert . ToInt32 ( dr [ "warehouse" ] . ToString ( ) ) ; ;
tmpObj . _Owarehouse = Convert . ToInt32 ( dr [ "warehouse" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "warehouse" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "channel" ) & & ! ( dr [ "channel" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _channel = Convert . ToInt32 ( dr [ "channel" ] . ToString ( ) ) ; ;
tmpObj . _Ochannel = Convert . ToInt32 ( dr [ "channel" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "channel" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "shelf" ) & & ! ( dr [ "shelf" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _shelf = Convert . ToInt32 ( dr [ "shelf" ] . ToString ( ) ) ; ;
tmpObj . _Oshelf = Convert . ToInt32 ( dr [ "shelf" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "shelf" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "layer" ) & & ! ( dr [ "layer" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _layer = Convert . ToInt32 ( dr [ "layer" ] . ToString ( ) ) ; ;
tmpObj . _Olayer = Convert . ToInt32 ( dr [ "layer" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "layer" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "col" ) & & ! ( dr [ "col" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _col = Convert . ToInt32 ( dr [ "col" ] . ToString ( ) ) ; ;
tmpObj . _Ocol = Convert . ToInt32 ( dr [ "col" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "col" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "elabId" ) & & ! ( dr [ "elabId" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _elabId = Convert . ToInt32 ( dr [ "elabId" ] . ToString ( ) ) ; ;
tmpObj . _OelabId = Convert . ToInt32 ( dr [ "elabId" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "elabId" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "elabAddress" ) & & ! ( dr [ "elabAddress" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _elabAddress = Convert . ToInt32 ( dr [ "elabAddress" ] . ToString ( ) ) ; ;
tmpObj . _OelabAddress = Convert . ToInt32 ( dr [ "elabAddress" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "elabAddress" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "height" ) & & ! ( dr [ "height" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _height = Convert . ToDecimal ( dr [ "height" ] . ToString ( ) ) ; ;
tmpObj . _Oheight = Convert . ToDecimal ( dr [ "height" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "height" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "width" ) & & ! ( dr [ "width" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _width = Convert . ToDecimal ( dr [ "width" ] . ToString ( ) ) ; ;
tmpObj . _Owidth = Convert . ToDecimal ( dr [ "width" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "width" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "length" ) & & ! ( dr [ "length" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _length = Convert . ToDecimal ( dr [ "length" ] . ToString ( ) ) ; ;
tmpObj . _Olength = Convert . ToDecimal ( dr [ "length" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "length" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "weight" ) & & ! ( dr [ "weight" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _weight = Convert . ToDecimal ( dr [ "weight" ] . ToString ( ) ) ; ;
tmpObj . _Oweight = Convert . ToDecimal ( dr [ "weight" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "weight" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "port" ) & & ! ( dr [ "port" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _port = Convert . ToInt32 ( dr [ "port" ] . ToString ( ) ) ; ;
tmpObj . _Oport = Convert . ToInt32 ( dr [ "port" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "port" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "part" ) & & ! ( dr [ "part" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _part = Convert . ToInt32 ( dr [ "part" ] . ToString ( ) ) ; ;
tmpObj . _Opart = Convert . ToInt32 ( dr [ "part" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "part" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "bigPart" ) & & ! ( dr [ "bigPart" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _bigPart = dr [ "bigPart" ] . ToString ( ) ;
tmpObj . _ObigPart = dr [ "bigPart" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "bigPart" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "goodsType" ) & & ! ( dr [ "goodsType" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _goodsType = Convert . ToInt32 ( dr [ "goodsType" ] . ToString ( ) ) ; ;
tmpObj . _OgoodsType = Convert . ToInt32 ( dr [ "goodsType" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "goodsType" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "whType" ) & & ! ( dr [ "whType" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _whType = Convert . ToInt32 ( dr [ "whType" ] . ToString ( ) ) ; ;
tmpObj . _OwhType = Convert . ToInt32 ( dr [ "whType" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "whType" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "whGoodsType" ) & & ! ( dr [ "whGoodsType" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _whGoodsType = Convert . ToInt32 ( dr [ "whGoodsType" ] . ToString ( ) ) ; ;
tmpObj . _OwhGoodsType = Convert . ToInt32 ( dr [ "whGoodsType" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "whGoodsType" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "whVolType" ) & & ! ( dr [ "whVolType" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _whVolType = Convert . ToInt32 ( dr [ "whVolType" ] . ToString ( ) ) ; ;
tmpObj . _OwhVolType = Convert . ToInt32 ( dr [ "whVolType" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "whVolType" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "volType" ) & & ! ( dr [ "volType" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _volType = Convert . ToInt32 ( dr [ "volType" ] . ToString ( ) ) ; ;
tmpObj . _OvolType = Convert . ToInt32 ( dr [ "volType" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "volType" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "ABC" ) & & ! ( dr [ "ABC" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _ABC = Convert . ToInt32 ( dr [ "ABC" ] . ToString ( ) ) ; ;
tmpObj . _OABC = Convert . ToInt32 ( dr [ "ABC" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "ABC" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "state" ) & & ! ( dr [ "state" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _state = Convert . ToInt32 ( dr [ "state" ] . ToString ( ) ) ; ;
tmpObj . _Ostate = Convert . ToInt32 ( dr [ "state" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "state" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "tranState" ) & & ! ( dr [ "tranState" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _tranState = Convert . ToInt32 ( dr [ "tranState" ] . ToString ( ) ) ; ;
tmpObj . _OtranState = Convert . ToInt32 ( dr [ "tranState" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "tranState" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "transLine" ) & & ! ( dr [ "transLine" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _transLine = Convert . ToInt32 ( dr [ "transLine" ] . ToString ( ) ) ; ;
tmpObj . _OtransLine = Convert . ToInt32 ( dr [ "transLine" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "transLine" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "x" ) & & ! ( dr [ "x" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _x = Convert . ToDecimal ( dr [ "x" ] . ToString ( ) ) ; ;
tmpObj . _Ox = Convert . ToDecimal ( dr [ "x" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "x" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "y" ) & & ! ( dr [ "y" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _y = Convert . ToDecimal ( dr [ "y" ] . ToString ( ) ) ; ;
tmpObj . _Oy = Convert . ToDecimal ( dr [ "y" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "y" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "z" ) & & ! ( dr [ "z" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _z = Convert . ToDecimal ( dr [ "z" ] . ToString ( ) ) ; ;
tmpObj . _Oz = Convert . ToDecimal ( dr [ "z" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "z" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "storeType" ) & & ! ( dr [ "storeType" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _storeType = Convert . ToInt32 ( dr [ "storeType" ] . ToString ( ) ) ; ;
tmpObj . _OstoreType = Convert . ToInt32 ( dr [ "storeType" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "storeType" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "operater" ) & & ! ( dr [ "operater" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _operater = Convert . ToInt32 ( dr [ "operater" ] . ToString ( ) ) ; ;
tmpObj . _Ooperater = Convert . ToInt32 ( dr [ "operater" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "operater" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "typetmp" ) & & ! ( dr [ "typetmp" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _typetmp = dr [ "typetmp" ] . ToString ( ) ;
tmpObj . _Otypetmp = dr [ "typetmp" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "typetmp" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "typedesc" ) & & ! ( dr [ "typedesc" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _typedesc = dr [ "typedesc" ] . ToString ( ) ;
tmpObj . _Otypedesc = dr [ "typedesc" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "typedesc" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
}
if ( dr . Table . Columns . Contains ( "pickPriority" ) & & ! ( dr [ "pickPriority" ] is DBNull ) )
{
try
{
tmpObj . _pickPriority = Convert . ToInt32 ( dr [ "pickPriority" ] . ToString ( ) ) ; ;
tmpObj . _OpickPriority = Convert . ToInt32 ( dr [ "pickPriority" ] . ToString ( ) ) ; ;
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "pickPriority" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
}
if ( dr . Table . Columns . Contains ( "upPriority" ) & & ! ( dr [ "upPriority" ] is DBNull ) )
{
try
{
tmpObj . _upPriority = Convert . ToInt32 ( dr [ "upPriority" ] . ToString ( ) ) ; ;
tmpObj . _OupPriority = Convert . ToInt32 ( dr [ "upPriority" ] . ToString ( ) ) ; ;
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "upPriority" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
}
if ( dr . Table . Columns . Contains ( "isWeightSeeds" ) & & ! ( dr [ "isWeightSeeds" ] is DBNull ) )
{
try
{
tmpObj . _isWeightSeeds = Convert . ToBoolean ( dr [ "isWeightSeeds" ] . ToString ( ) ) ; ;
tmpObj . _OisWeightSeeds = Convert . ToBoolean ( dr [ "isWeightSeeds" ] . ToString ( ) ) ; ;
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "isWeightSeeds" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2024-02-06 19:36:47 +08:00
}
if ( dr . Table . Columns . Contains ( "scaleFactor" ) & & ! ( dr [ "scaleFactor" ] is DBNull ) )
{
try
{
tmpObj . _scaleFactor = Convert . ToInt32 ( dr [ "scaleFactor" ] . ToString ( ) ) ; ;
tmpObj . _OscaleFactor = Convert . ToInt32 ( dr [ "scaleFactor" ] . ToString ( ) ) ; ;
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "scaleFactor" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "lastmodified" ) & & ! ( dr [ "lastmodified" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _lastmodified = dr [ "lastmodified" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "lastmodified" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "createtime" ) & & ! ( dr [ "createtime" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _createtime = dr [ "createtime" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "createtime" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "dr" ) & & ! ( dr [ "dr" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _dr = Convert . ToBoolean ( dr [ "dr" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "dr" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
}
}
protected override void CmdPrepare ( SqlCommand oraCmd ) {
WmsLocation_base tmpObj = ( WmsLocation_base ) modelObj ;
switch ( this . _op_flag ) {
case ( int ) op_flag . add :
_strSql = "INSERT INTO dbo.T_WMSLOCATION({0}) VALUES({1} )" ;
_strSql = String . Format ( _strSql , getFields ( tmpObj ) , getValues ( tmpObj ) ) ;
break ;
case ( int ) op_flag . update :
2024-02-06 19:36:47 +08:00
// _strSql = "UPDATE dbo.T_WMSLOCATION SET LOCATIONID = @LOCATIONID,LOCATIONID128 = @LOCATIONID128,OWNERCODE = @OWNERCODE,WAREHOUSE = @WAREHOUSE,CHANNEL = @CHANNEL,SHELF = @SHELF,LAYER = @LAYER,COL = @COL,ELABID = @ELABID,ELABADDRESS = @ELABADDRESS,HEIGHT = @HEIGHT,WIDTH = @WIDTH,LENGTH = @LENGTH,WEIGHT = @WEIGHT,PORT = @PORT,PART = @PART,BIGPART = @BIGPART,GOODSTYPE = @GOODSTYPE,WHTYPE = @WHTYPE,WHGOODSTYPE = @WHGOODSTYPE,WHVOLTYPE = @WHVOLTYPE,VOLTYPE = @VOLTYPE,ABC = @ABC,STATE = @STATE,TRANSTATE = @TRANSTATE,TRANSLINE = @TRANSLINE,X = @X,Y = @Y,Z = @Z,STORETYPE = @STORETYPE,OPERATER = @OPERATER,TYPETMP = @TYPETMP,TYPEDESC = @TYPEDESC,PICKPRIORITY = @PICKPRIORITY,UPPRIORITY = @UPPRIORITY,ISWEIGHTSEEDS = @ISWEIGHTSEEDS,SCALEFACTOR = @SCALEFACTOR,LASTMODIFIED = getdate() WHERE ID = @ID";
2023-05-23 16:13:17 +08:00
_strSql = "UPDATE dbo.T_WMSLOCATION {0} WHERE ID = @ID" ;
_strSql = String . Format ( _strSql , getChangedFields ( tmpObj ) ) ;
break ;
case ( int ) op_flag . delete :
// _strSql = "UPDATE dbo.T_WMSLOCATION SET DR =0 WHERE ID = @ID";
_strSql = "delete from dbo.T_WMSLOCATION WHERE ID = @ID" ;
break ;
case ( int ) op_flag . getObj :
_strSql = "SELECT * FROM dbo.T_WMSLOCATION WHERE ID = @ID" ;
break ;
case ( int ) op_flag . queryAll :
_strSql = "SELECT * FROM dbo.T_WMSLOCATION WHERE DR =1 " ;
// if (this.rownumEnd >0 )
{
// _strSql = "SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY ID DESC) as sortNo FROM dbo.T_WMSLOCATION WHERE DR =1 )AS SORTEDTB WHERE DR =1 AND sortNo BETWEEN @START AND @END";
}
// _strSql += ";SELECT COUNT(*) FROM T_WMSLOCATION WHERE DR =1";
break ;
case ( int ) op_flag . queryActived :
_strSql = "SELECT * FROM dbo.T_WMSLOCATION WHERE DR =1" ;
_strSql + = ";SELECT COUNT(*) FROM T_WMSLOCATION WHERE DR =1" ;
break ;
case ( int ) op_flag . getPk :
_strSql = "SELECT MAX(ID) FROM dbo.T_WMSLOCATION WHERE DR =1" ;
break ;
case ( int ) op_flag . getCount :
_strSql = "SELECT COUNT(*) FROM T_WMSLOCATION WHERE DR =1" ;
break ;
}
oraCmd . CommandText = _strSql ;
fillParameters ( oraCmd , tmpObj ) ;
}
private string getFields ( WmsLocation_base tmpObj )
{
String colums = "" ;
colums + = tmpObj . _locationId = = null ? "" : "LOCATIONID" + "," ;
colums + = tmpObj . _locationId128 = = null ? "" : "LOCATIONID128" + "," ;
colums + = tmpObj . _ownerCode = = null ? "" : "OWNERCODE" + "," ;
colums + = tmpObj . _warehouse = = null ? "" : "WAREHOUSE" + "," ;
colums + = tmpObj . _channel = = null ? "" : "CHANNEL" + "," ;
colums + = tmpObj . _shelf = = null ? "" : "SHELF" + "," ;
colums + = tmpObj . _layer = = null ? "" : "LAYER" + "," ;
colums + = tmpObj . _col = = null ? "" : "COL" + "," ;
colums + = tmpObj . _elabId = = null ? "" : "ELABID" + "," ;
colums + = tmpObj . _elabAddress = = null ? "" : "ELABADDRESS" + "," ;
colums + = tmpObj . _height = = null ? "" : "HEIGHT" + "," ;
colums + = tmpObj . _width = = null ? "" : "WIDTH" + "," ;
colums + = tmpObj . _length = = null ? "" : "LENGTH" + "," ;
colums + = tmpObj . _weight = = null ? "" : "WEIGHT" + "," ;
colums + = tmpObj . _port = = null ? "" : "PORT" + "," ;
colums + = tmpObj . _part = = null ? "" : "PART" + "," ;
colums + = tmpObj . _bigPart = = null ? "" : "BIGPART" + "," ;
colums + = tmpObj . _goodsType = = null ? "" : "GOODSTYPE" + "," ;
colums + = tmpObj . _whType = = null ? "" : "WHTYPE" + "," ;
colums + = tmpObj . _whGoodsType = = null ? "" : "WHGOODSTYPE" + "," ;
colums + = tmpObj . _whVolType = = null ? "" : "WHVOLTYPE" + "," ;
colums + = tmpObj . _volType = = null ? "" : "VOLTYPE" + "," ;
colums + = tmpObj . _ABC = = null ? "" : "ABC" + "," ;
colums + = tmpObj . _state = = null ? "" : "STATE" + "," ;
colums + = tmpObj . _tranState = = null ? "" : "TRANSTATE" + "," ;
colums + = tmpObj . _transLine = = null ? "" : "TRANSLINE" + "," ;
colums + = tmpObj . _x = = null ? "" : "X" + "," ;
colums + = tmpObj . _y = = null ? "" : "Y" + "," ;
colums + = tmpObj . _z = = null ? "" : "Z" + "," ;
colums + = tmpObj . _storeType = = null ? "" : "STORETYPE" + "," ;
colums + = tmpObj . _operater = = null ? "" : "OPERATER" + "," ;
colums + = tmpObj . _typetmp = = null ? "" : "TYPETMP" + "," ;
colums + = tmpObj . _typedesc = = null ? "" : "TYPEDESC" + "," ;
2023-12-03 22:13:49 +08:00
colums + = tmpObj . _pickPriority = = null ? "" : "PICKPRIORITY" + "," ;
colums + = tmpObj . _upPriority = = null ? "" : "UPPRIORITY" + "," ;
colums + = tmpObj . _isWeightSeeds = = null ? "" : "ISWEIGHTSEEDS" + "," ;
2024-02-06 19:36:47 +08:00
colums + = tmpObj . _scaleFactor = = null ? "" : "SCALEFACTOR" + "," ;
2023-05-23 16:13:17 +08:00
return colums . Substring ( 0 , colums . Length - 1 ) ;
}
private string getValues ( WmsLocation_base tmpObj )
{
String values = "" ;
values + = tmpObj . _locationId = = null ? "" : "@LOCATIONID" + "," ;
values + = tmpObj . _locationId128 = = null ? "" : "@LOCATIONID128" + "," ;
values + = tmpObj . _ownerCode = = null ? "" : "@OWNERCODE" + "," ;
values + = tmpObj . _warehouse = = null ? "" : "@WAREHOUSE" + "," ;
values + = tmpObj . _channel = = null ? "" : "@CHANNEL" + "," ;
values + = tmpObj . _shelf = = null ? "" : "@SHELF" + "," ;
values + = tmpObj . _layer = = null ? "" : "@LAYER" + "," ;
values + = tmpObj . _col = = null ? "" : "@COL" + "," ;
values + = tmpObj . _elabId = = null ? "" : "@ELABID" + "," ;
values + = tmpObj . _elabAddress = = null ? "" : "@ELABADDRESS" + "," ;
values + = tmpObj . _height = = null ? "" : "@HEIGHT" + "," ;
values + = tmpObj . _width = = null ? "" : "@WIDTH" + "," ;
values + = tmpObj . _length = = null ? "" : "@LENGTH" + "," ;
values + = tmpObj . _weight = = null ? "" : "@WEIGHT" + "," ;
values + = tmpObj . _port = = null ? "" : "@PORT" + "," ;
values + = tmpObj . _part = = null ? "" : "@PART" + "," ;
values + = tmpObj . _bigPart = = null ? "" : "@BIGPART" + "," ;
values + = tmpObj . _goodsType = = null ? "" : "@GOODSTYPE" + "," ;
values + = tmpObj . _whType = = null ? "" : "@WHTYPE" + "," ;
values + = tmpObj . _whGoodsType = = null ? "" : "@WHGOODSTYPE" + "," ;
values + = tmpObj . _whVolType = = null ? "" : "@WHVOLTYPE" + "," ;
values + = tmpObj . _volType = = null ? "" : "@VOLTYPE" + "," ;
values + = tmpObj . _ABC = = null ? "" : "@ABC" + "," ;
values + = tmpObj . _state = = null ? "" : "@STATE" + "," ;
values + = tmpObj . _tranState = = null ? "" : "@TRANSTATE" + "," ;
values + = tmpObj . _transLine = = null ? "" : "@TRANSLINE" + "," ;
values + = tmpObj . _x = = null ? "" : "@X" + "," ;
values + = tmpObj . _y = = null ? "" : "@Y" + "," ;
values + = tmpObj . _z = = null ? "" : "@Z" + "," ;
values + = tmpObj . _storeType = = null ? "" : "@STORETYPE" + "," ;
values + = tmpObj . _operater = = null ? "" : "@OPERATER" + "," ;
values + = tmpObj . _typetmp = = null ? "" : "@TYPETMP" + "," ;
values + = tmpObj . _typedesc = = null ? "" : "@TYPEDESC" + "," ;
2023-12-03 22:13:49 +08:00
values + = tmpObj . _pickPriority = = null ? "" : "@PICKPRIORITY" + "," ;
values + = tmpObj . _upPriority = = null ? "" : "@UPPRIORITY" + "," ;
values + = tmpObj . _isWeightSeeds = = null ? "" : "@ISWEIGHTSEEDS" + "," ;
2024-02-06 19:36:47 +08:00
values + = tmpObj . _scaleFactor = = null ? "" : "@SCALEFACTOR" + "," ;
2023-05-23 16:13:17 +08:00
return values . Substring ( 0 , values . Length - 1 ) ;
}
private string getChangedFields ( WmsLocation_base tmpObj )
{
string updateFields = " set " ;
2023-09-04 22:41:19 +08:00
if ( tmpObj . _locationId ! = null & & tmpObj . _locationId ! = tmpObj . _OlocationId )
2023-05-23 16:13:17 +08:00
{
updateFields + = "LOCATIONID = @LOCATIONID," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _locationId128 ! = null & & tmpObj . _locationId128 ! = tmpObj . _OlocationId128 )
2023-05-23 16:13:17 +08:00
{
updateFields + = "LOCATIONID128 = @LOCATIONID128," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _ownerCode ! = null & & tmpObj . _ownerCode ! = tmpObj . _OownerCode )
2023-05-23 16:13:17 +08:00
{
updateFields + = "OWNERCODE = @OWNERCODE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _warehouse ! = null & & tmpObj . _warehouse ! = tmpObj . _Owarehouse )
2023-05-23 16:13:17 +08:00
{
updateFields + = "WAREHOUSE = @WAREHOUSE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _channel ! = null & & tmpObj . _channel ! = tmpObj . _Ochannel )
2023-05-23 16:13:17 +08:00
{
updateFields + = "CHANNEL = @CHANNEL," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _shelf ! = null & & tmpObj . _shelf ! = tmpObj . _Oshelf )
2023-05-23 16:13:17 +08:00
{
updateFields + = "SHELF = @SHELF," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _layer ! = null & & tmpObj . _layer ! = tmpObj . _Olayer )
2023-05-23 16:13:17 +08:00
{
updateFields + = "LAYER = @LAYER," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _col ! = null & & tmpObj . _col ! = tmpObj . _Ocol )
2023-05-23 16:13:17 +08:00
{
updateFields + = "COL = @COL," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _elabId ! = null & & tmpObj . _elabId ! = tmpObj . _OelabId )
2023-05-23 16:13:17 +08:00
{
updateFields + = "ELABID = @ELABID," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _elabAddress ! = null & & tmpObj . _elabAddress ! = tmpObj . _OelabAddress )
2023-05-23 16:13:17 +08:00
{
updateFields + = "ELABADDRESS = @ELABADDRESS," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _height ! = null & & tmpObj . _height ! = tmpObj . _Oheight )
2023-05-23 16:13:17 +08:00
{
updateFields + = "HEIGHT = @HEIGHT," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _width ! = null & & tmpObj . _width ! = tmpObj . _Owidth )
2023-05-23 16:13:17 +08:00
{
updateFields + = "WIDTH = @WIDTH," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _length ! = null & & tmpObj . _length ! = tmpObj . _Olength )
2023-05-23 16:13:17 +08:00
{
updateFields + = "LENGTH = @LENGTH," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _weight ! = null & & tmpObj . _weight ! = tmpObj . _Oweight )
2023-05-23 16:13:17 +08:00
{
updateFields + = "WEIGHT = @WEIGHT," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _port ! = null & & tmpObj . _port ! = tmpObj . _Oport )
2023-05-23 16:13:17 +08:00
{
updateFields + = "PORT = @PORT," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _part ! = null & & tmpObj . _part ! = tmpObj . _Opart )
2023-05-23 16:13:17 +08:00
{
updateFields + = "PART = @PART," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _bigPart ! = null & & tmpObj . _bigPart ! = tmpObj . _ObigPart )
2023-05-23 16:13:17 +08:00
{
updateFields + = "BIGPART = @BIGPART," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _goodsType ! = null & & tmpObj . _goodsType ! = tmpObj . _OgoodsType )
2023-05-23 16:13:17 +08:00
{
updateFields + = "GOODSTYPE = @GOODSTYPE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _whType ! = null & & tmpObj . _whType ! = tmpObj . _OwhType )
2023-05-23 16:13:17 +08:00
{
updateFields + = "WHTYPE = @WHTYPE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _whGoodsType ! = null & & tmpObj . _whGoodsType ! = tmpObj . _OwhGoodsType )
2023-05-23 16:13:17 +08:00
{
updateFields + = "WHGOODSTYPE = @WHGOODSTYPE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _whVolType ! = null & & tmpObj . _whVolType ! = tmpObj . _OwhVolType )
2023-05-23 16:13:17 +08:00
{
updateFields + = "WHVOLTYPE = @WHVOLTYPE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _volType ! = null & & tmpObj . _volType ! = tmpObj . _OvolType )
2023-05-23 16:13:17 +08:00
{
updateFields + = "VOLTYPE = @VOLTYPE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _ABC ! = null & & tmpObj . _ABC ! = tmpObj . _OABC )
2023-05-23 16:13:17 +08:00
{
updateFields + = "ABC = @ABC," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _state ! = null & & tmpObj . _state ! = tmpObj . _Ostate )
2023-05-23 16:13:17 +08:00
{
updateFields + = "STATE = @STATE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _tranState ! = null & & tmpObj . _tranState ! = tmpObj . _OtranState )
2023-05-23 16:13:17 +08:00
{
updateFields + = "TRANSTATE = @TRANSTATE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _transLine ! = null & & tmpObj . _transLine ! = tmpObj . _OtransLine )
2023-05-23 16:13:17 +08:00
{
updateFields + = "TRANSLINE = @TRANSLINE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _x ! = null & & tmpObj . _x ! = tmpObj . _Ox )
2023-05-23 16:13:17 +08:00
{
updateFields + = "X = @X," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _y ! = null & & tmpObj . _y ! = tmpObj . _Oy )
2023-05-23 16:13:17 +08:00
{
updateFields + = "Y = @Y," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _z ! = null & & tmpObj . _z ! = tmpObj . _Oz )
2023-05-23 16:13:17 +08:00
{
updateFields + = "Z = @Z," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _storeType ! = null & & tmpObj . _storeType ! = tmpObj . _OstoreType )
2023-05-23 16:13:17 +08:00
{
updateFields + = "STORETYPE = @STORETYPE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _operater ! = null & & tmpObj . _operater ! = tmpObj . _Ooperater )
2023-05-23 16:13:17 +08:00
{
updateFields + = "OPERATER = @OPERATER," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _typetmp ! = null & & tmpObj . _typetmp ! = tmpObj . _Otypetmp )
2023-05-23 16:13:17 +08:00
{
updateFields + = "TYPETMP = @TYPETMP," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _typedesc ! = null & & tmpObj . _typedesc ! = tmpObj . _Otypedesc )
2023-05-23 16:13:17 +08:00
{
updateFields + = "TYPEDESC = @TYPEDESC," ;
2023-12-03 22:13:49 +08:00
}
if ( tmpObj . _pickPriority ! = null & & tmpObj . _pickPriority ! = tmpObj . _OpickPriority )
{
updateFields + = "PICKPRIORITY = @PICKPRIORITY," ;
}
if ( tmpObj . _upPriority ! = null & & tmpObj . _upPriority ! = tmpObj . _OupPriority )
{
updateFields + = "UPPRIORITY = @UPPRIORITY," ;
}
if ( tmpObj . _isWeightSeeds ! = null & & tmpObj . _isWeightSeeds ! = tmpObj . _OisWeightSeeds )
{
updateFields + = "ISWEIGHTSEEDS = @ISWEIGHTSEEDS," ;
2024-02-06 19:36:47 +08:00
}
if ( tmpObj . _scaleFactor ! = null & & tmpObj . _scaleFactor ! = tmpObj . _OscaleFactor )
{
updateFields + = "SCALEFACTOR = @SCALEFACTOR," ;
2023-05-23 16:13:17 +08:00
}
updateFields + = "LASTMODIFIED = getdate()" ;
return updateFields ;
}
private void fillParameters ( SqlCommand oraCmd , WmsLocation_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 ( "@LOCATIONID" , VerifyDbnull ( tmpObj . _locationId ) ) ;
oraCmd . Parameters . AddWithValue ( "@LOCATIONID128" , VerifyDbnull ( tmpObj . _locationId128 ) ) ;
oraCmd . Parameters . AddWithValue ( "@OWNERCODE" , VerifyDbnull ( tmpObj . _ownerCode ) ) ;
oraCmd . Parameters . AddWithValue ( "@WAREHOUSE" , VerifyDbnull ( tmpObj . _warehouse ) ) ;
oraCmd . Parameters . AddWithValue ( "@CHANNEL" , VerifyDbnull ( tmpObj . _channel ) ) ;
oraCmd . Parameters . AddWithValue ( "@SHELF" , VerifyDbnull ( tmpObj . _shelf ) ) ;
oraCmd . Parameters . AddWithValue ( "@LAYER" , VerifyDbnull ( tmpObj . _layer ) ) ;
oraCmd . Parameters . AddWithValue ( "@COL" , VerifyDbnull ( tmpObj . _col ) ) ;
oraCmd . Parameters . AddWithValue ( "@ELABID" , VerifyDbnull ( tmpObj . _elabId ) ) ;
oraCmd . Parameters . AddWithValue ( "@ELABADDRESS" , VerifyDbnull ( tmpObj . _elabAddress ) ) ;
oraCmd . Parameters . AddWithValue ( "@HEIGHT" , VerifyDbnull ( tmpObj . _height ) ) ;
oraCmd . Parameters . AddWithValue ( "@WIDTH" , VerifyDbnull ( tmpObj . _width ) ) ;
oraCmd . Parameters . AddWithValue ( "@LENGTH" , VerifyDbnull ( tmpObj . _length ) ) ;
oraCmd . Parameters . AddWithValue ( "@WEIGHT" , VerifyDbnull ( tmpObj . _weight ) ) ;
oraCmd . Parameters . AddWithValue ( "@PORT" , VerifyDbnull ( tmpObj . _port ) ) ;
oraCmd . Parameters . AddWithValue ( "@PART" , VerifyDbnull ( tmpObj . _part ) ) ;
oraCmd . Parameters . AddWithValue ( "@BIGPART" , VerifyDbnull ( tmpObj . _bigPart ) ) ;
oraCmd . Parameters . AddWithValue ( "@GOODSTYPE" , VerifyDbnull ( tmpObj . _goodsType ) ) ;
oraCmd . Parameters . AddWithValue ( "@WHTYPE" , VerifyDbnull ( tmpObj . _whType ) ) ;
oraCmd . Parameters . AddWithValue ( "@WHGOODSTYPE" , VerifyDbnull ( tmpObj . _whGoodsType ) ) ;
oraCmd . Parameters . AddWithValue ( "@WHVOLTYPE" , VerifyDbnull ( tmpObj . _whVolType ) ) ;
oraCmd . Parameters . AddWithValue ( "@VOLTYPE" , VerifyDbnull ( tmpObj . _volType ) ) ;
oraCmd . Parameters . AddWithValue ( "@ABC" , VerifyDbnull ( tmpObj . _ABC ) ) ;
oraCmd . Parameters . AddWithValue ( "@STATE" , VerifyDbnull ( tmpObj . _state ) ) ;
oraCmd . Parameters . AddWithValue ( "@TRANSTATE" , VerifyDbnull ( tmpObj . _tranState ) ) ;
oraCmd . Parameters . AddWithValue ( "@TRANSLINE" , VerifyDbnull ( tmpObj . _transLine ) ) ;
oraCmd . Parameters . AddWithValue ( "@X" , VerifyDbnull ( tmpObj . _x ) ) ;
oraCmd . Parameters . AddWithValue ( "@Y" , VerifyDbnull ( tmpObj . _y ) ) ;
oraCmd . Parameters . AddWithValue ( "@Z" , VerifyDbnull ( tmpObj . _z ) ) ;
oraCmd . Parameters . AddWithValue ( "@STORETYPE" , VerifyDbnull ( tmpObj . _storeType ) ) ;
oraCmd . Parameters . AddWithValue ( "@OPERATER" , VerifyDbnull ( tmpObj . _operater ) ) ;
oraCmd . Parameters . AddWithValue ( "@TYPETMP" , VerifyDbnull ( tmpObj . _typetmp ) ) ;
oraCmd . Parameters . AddWithValue ( "@TYPEDESC" , VerifyDbnull ( tmpObj . _typedesc ) ) ;
2023-12-03 22:13:49 +08:00
oraCmd . Parameters . AddWithValue ( "@PICKPRIORITY" , VerifyDbnull ( tmpObj . _pickPriority ) ) ;
oraCmd . Parameters . AddWithValue ( "@UPPRIORITY" , VerifyDbnull ( tmpObj . _upPriority ) ) ;
oraCmd . Parameters . AddWithValue ( "@ISWEIGHTSEEDS" , VerifyDbnull ( tmpObj . _isWeightSeeds ) ) ;
2024-02-06 19:36:47 +08:00
oraCmd . Parameters . AddWithValue ( "@SCALEFACTOR" , VerifyDbnull ( tmpObj . _scaleFactor ) ) ;
2023-05-23 16:13:17 +08:00
// oraCmd.Parameters.AddWithValue("@LASTMODIFIED", "getdate()") ;
return ;
case ( int ) op_flag . add :
if ( tmpObj . _locationId ! = null )
oraCmd . Parameters . AddWithValue ( "@LOCATIONID" , VerifyDbnull ( tmpObj . _locationId ) ) ;
if ( tmpObj . _locationId128 ! = null )
oraCmd . Parameters . AddWithValue ( "@LOCATIONID128" , VerifyDbnull ( tmpObj . _locationId128 ) ) ;
if ( tmpObj . _ownerCode ! = null )
oraCmd . Parameters . AddWithValue ( "@OWNERCODE" , VerifyDbnull ( tmpObj . _ownerCode ) ) ;
if ( tmpObj . _warehouse ! = null )
oraCmd . Parameters . AddWithValue ( "@WAREHOUSE" , VerifyDbnull ( tmpObj . _warehouse ) ) ;
if ( tmpObj . _channel ! = null )
oraCmd . Parameters . AddWithValue ( "@CHANNEL" , VerifyDbnull ( tmpObj . _channel ) ) ;
if ( tmpObj . _shelf ! = null )
oraCmd . Parameters . AddWithValue ( "@SHELF" , VerifyDbnull ( tmpObj . _shelf ) ) ;
if ( tmpObj . _layer ! = null )
oraCmd . Parameters . AddWithValue ( "@LAYER" , VerifyDbnull ( tmpObj . _layer ) ) ;
if ( tmpObj . _col ! = null )
oraCmd . Parameters . AddWithValue ( "@COL" , VerifyDbnull ( tmpObj . _col ) ) ;
if ( tmpObj . _elabId ! = null )
oraCmd . Parameters . AddWithValue ( "@ELABID" , VerifyDbnull ( tmpObj . _elabId ) ) ;
if ( tmpObj . _elabAddress ! = null )
oraCmd . Parameters . AddWithValue ( "@ELABADDRESS" , VerifyDbnull ( tmpObj . _elabAddress ) ) ;
if ( tmpObj . _height ! = null )
oraCmd . Parameters . AddWithValue ( "@HEIGHT" , VerifyDbnull ( tmpObj . _height ) ) ;
if ( tmpObj . _width ! = null )
oraCmd . Parameters . AddWithValue ( "@WIDTH" , VerifyDbnull ( tmpObj . _width ) ) ;
if ( tmpObj . _length ! = null )
oraCmd . Parameters . AddWithValue ( "@LENGTH" , VerifyDbnull ( tmpObj . _length ) ) ;
if ( tmpObj . _weight ! = null )
oraCmd . Parameters . AddWithValue ( "@WEIGHT" , VerifyDbnull ( tmpObj . _weight ) ) ;
if ( tmpObj . _port ! = null )
oraCmd . Parameters . AddWithValue ( "@PORT" , VerifyDbnull ( tmpObj . _port ) ) ;
if ( tmpObj . _part ! = null )
oraCmd . Parameters . AddWithValue ( "@PART" , VerifyDbnull ( tmpObj . _part ) ) ;
if ( tmpObj . _bigPart ! = null )
oraCmd . Parameters . AddWithValue ( "@BIGPART" , VerifyDbnull ( tmpObj . _bigPart ) ) ;
if ( tmpObj . _goodsType ! = null )
oraCmd . Parameters . AddWithValue ( "@GOODSTYPE" , VerifyDbnull ( tmpObj . _goodsType ) ) ;
if ( tmpObj . _whType ! = null )
oraCmd . Parameters . AddWithValue ( "@WHTYPE" , VerifyDbnull ( tmpObj . _whType ) ) ;
if ( tmpObj . _whGoodsType ! = null )
oraCmd . Parameters . AddWithValue ( "@WHGOODSTYPE" , VerifyDbnull ( tmpObj . _whGoodsType ) ) ;
if ( tmpObj . _whVolType ! = null )
oraCmd . Parameters . AddWithValue ( "@WHVOLTYPE" , VerifyDbnull ( tmpObj . _whVolType ) ) ;
if ( tmpObj . _volType ! = null )
oraCmd . Parameters . AddWithValue ( "@VOLTYPE" , VerifyDbnull ( tmpObj . _volType ) ) ;
if ( tmpObj . _ABC ! = null )
oraCmd . Parameters . AddWithValue ( "@ABC" , VerifyDbnull ( tmpObj . _ABC ) ) ;
if ( tmpObj . _state ! = null )
oraCmd . Parameters . AddWithValue ( "@STATE" , VerifyDbnull ( tmpObj . _state ) ) ;
if ( tmpObj . _tranState ! = null )
oraCmd . Parameters . AddWithValue ( "@TRANSTATE" , VerifyDbnull ( tmpObj . _tranState ) ) ;
if ( tmpObj . _transLine ! = null )
oraCmd . Parameters . AddWithValue ( "@TRANSLINE" , VerifyDbnull ( tmpObj . _transLine ) ) ;
if ( tmpObj . _x ! = null )
oraCmd . Parameters . AddWithValue ( "@X" , VerifyDbnull ( tmpObj . _x ) ) ;
if ( tmpObj . _y ! = null )
oraCmd . Parameters . AddWithValue ( "@Y" , VerifyDbnull ( tmpObj . _y ) ) ;
if ( tmpObj . _z ! = null )
oraCmd . Parameters . AddWithValue ( "@Z" , VerifyDbnull ( tmpObj . _z ) ) ;
if ( tmpObj . _storeType ! = null )
oraCmd . Parameters . AddWithValue ( "@STORETYPE" , VerifyDbnull ( tmpObj . _storeType ) ) ;
if ( tmpObj . _operater ! = null )
oraCmd . Parameters . AddWithValue ( "@OPERATER" , VerifyDbnull ( tmpObj . _operater ) ) ;
if ( tmpObj . _typetmp ! = null )
oraCmd . Parameters . AddWithValue ( "@TYPETMP" , VerifyDbnull ( tmpObj . _typetmp ) ) ;
if ( tmpObj . _typedesc ! = null )
oraCmd . Parameters . AddWithValue ( "@TYPEDESC" , VerifyDbnull ( tmpObj . _typedesc ) ) ;
2023-12-03 22:13:49 +08:00
if ( tmpObj . _pickPriority ! = null )
oraCmd . Parameters . AddWithValue ( "@PICKPRIORITY" , VerifyDbnull ( tmpObj . _pickPriority ) ) ;
if ( tmpObj . _upPriority ! = null )
oraCmd . Parameters . AddWithValue ( "@UPPRIORITY" , VerifyDbnull ( tmpObj . _upPriority ) ) ;
if ( tmpObj . _isWeightSeeds ! = null )
oraCmd . Parameters . AddWithValue ( "@ISWEIGHTSEEDS" , VerifyDbnull ( tmpObj . _isWeightSeeds ) ) ;
2024-02-06 19:36:47 +08:00
if ( tmpObj . _scaleFactor ! = null )
oraCmd . Parameters . AddWithValue ( "@SCALEFACTOR" , VerifyDbnull ( tmpObj . _scaleFactor ) ) ;
2023-05-23 16:13:17 +08:00
return ;
}
}
protected override enumDbInstance instance
{
get
{
return enumDbInstance . wms ;
}
}
}
#endregion
}