2023-05-23 16:13:17 +08:00
/// <summary>
///Data Implemention Object
///BASIC CRUD CLASS FOR TABLE t_wmsGoods
///By wm
2023-12-03 22:13:49 +08:00
///on 11/27/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 WmsGoods_base_Imp
[Serializable] class WmsGoods_base_Imp : BaseModel_Imp {
protected override void datarowToModel ( DataRow dr , BaseModel obj )
{
if ( dr ! = null )
{
WmsGoods_base tmpObj = ( WmsGoods_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 ( "goodsId" ) & & ! ( dr [ "goodsId" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _goodsId = dr [ "goodsId" ] . ToString ( ) ;
tmpObj . _OgoodsId = dr [ "goodsId" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "goodsId" ] . 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 ( "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 ( "plotId" ) & & ! ( dr [ "plotId" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _plotId = Convert . ToInt32 ( dr [ "plotId" ] . ToString ( ) ) ; ;
tmpObj . _OplotId = Convert . ToInt32 ( dr [ "plotId" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "plotId" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "pIsDateValid" ) & & ! ( dr [ "pIsDateValid" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _pIsDateValid = Convert . ToBoolean ( dr [ "pIsDateValid" ] . ToString ( ) ) ; ;
tmpObj . _OpIsDateValid = Convert . ToBoolean ( dr [ "pIsDateValid" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
2024-02-06 19:36:47 +08:00
LogHelper . debug ( this . GetType ( ) , "pIsDateValid value :" + dr [ "pIsDateValid" ] . ToString ( ) ) ;
2023-12-03 22:13:49 +08:00
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 ( "full_max" ) & & ! ( dr [ "full_max" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _full_max = Convert . ToDecimal ( dr [ "full_max" ] . ToString ( ) ) ; ;
tmpObj . _Ofull_max = Convert . ToDecimal ( dr [ "full_max" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "full_max" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "bulkMax" ) & & ! ( dr [ "bulkMax" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _bulkMax = Convert . ToDecimal ( dr [ "bulkMax" ] . ToString ( ) ) ; ;
tmpObj . _ObulkMax = Convert . ToDecimal ( dr [ "bulkMax" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "bulkMax" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "bulkMax1" ) & & ! ( dr [ "bulkMax1" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _bulkMax1 = Convert . ToDecimal ( dr [ "bulkMax1" ] . ToString ( ) ) ; ;
tmpObj . _ObulkMax1 = Convert . ToDecimal ( dr [ "bulkMax1" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "bulkMax1" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "batchMax1" ) & & ! ( dr [ "batchMax1" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _batchMax1 = Convert . ToDecimal ( dr [ "batchMax1" ] . ToString ( ) ) ; ;
tmpObj . _ObatchMax1 = Convert . ToDecimal ( dr [ "batchMax1" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "batchMax1" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "batchMax2" ) & & ! ( dr [ "batchMax2" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _batchMax2 = Convert . ToDecimal ( dr [ "batchMax2" ] . ToString ( ) ) ; ;
tmpObj . _ObatchMax2 = Convert . ToDecimal ( dr [ "batchMax2" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "batchMax2" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "batchMax3" ) & & ! ( dr [ "batchMax3" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _batchMax3 = Convert . ToDecimal ( dr [ "batchMax3" ] . ToString ( ) ) ; ;
tmpObj . _ObatchMax3 = Convert . ToDecimal ( dr [ "batchMax3" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "batchMax3" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "batchMax4" ) & & ! ( dr [ "batchMax4" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _batchMax4 = Convert . ToDecimal ( dr [ "batchMax4" ] . ToString ( ) ) ; ;
tmpObj . _ObatchMax4 = Convert . ToDecimal ( dr [ "batchMax4" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "batchMax4" ] . 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 ( "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 ( "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 ( "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 ( "validTermDays" ) & & ! ( dr [ "validTermDays" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _validTermDays = Convert . ToInt32 ( dr [ "validTermDays" ] . ToString ( ) ) ; ;
tmpObj . _OvalidTermDays = Convert . ToInt32 ( dr [ "validTermDays" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "validTermDays" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "bigCount" ) & & ! ( dr [ "bigCount" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _bigCount = Convert . ToDecimal ( dr [ "bigCount" ] . ToString ( ) ) ; ;
tmpObj . _ObigCount = Convert . ToDecimal ( dr [ "bigCount" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "bigCount" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "repType" ) & & ! ( dr [ "repType" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _repType = Convert . ToInt32 ( dr [ "repType" ] . ToString ( ) ) ; ;
tmpObj . _OrepType = Convert . ToInt32 ( dr [ "repType" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "repType" ] . 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 ( "lowStore" ) & & ! ( dr [ "lowStore" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _lowStore = Convert . ToDecimal ( dr [ "lowStore" ] . ToString ( ) ) ; ;
tmpObj . _OlowStore = Convert . ToDecimal ( dr [ "lowStore" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "lowStore" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "highStore" ) & & ! ( dr [ "highStore" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _highStore = Convert . ToDecimal ( dr [ "highStore" ] . ToString ( ) ) ; ;
tmpObj . _OhighStore = Convert . ToDecimal ( dr [ "highStore" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "highStore" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "tempRequired" ) & & ! ( dr [ "tempRequired" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _tempRequired = Convert . ToBoolean ( dr [ "tempRequired" ] . ToString ( ) ) ; ;
tmpObj . _OtempRequired = Convert . ToBoolean ( dr [ "tempRequired" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
2024-02-06 19:36:47 +08:00
LogHelper . debug ( this . GetType ( ) , " tempRequired value :" + dr [ "tempRequired" ] . ToString ( ) ) ;
2023-12-03 22:13:49 +08:00
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "temperature" ) & & ! ( dr [ "temperature" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _temperature = Convert . ToDecimal ( dr [ "temperature" ] . ToString ( ) ) ; ;
tmpObj . _Otemperature = Convert . ToDecimal ( dr [ "temperature" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "temperature" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
2023-09-04 22:41:19 +08:00
if ( dr . Table . Columns . Contains ( "canSeedOut" ) & & ! ( dr [ "canSeedOut" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-09-04 22:41:19 +08:00
tmpObj . _canSeedOut = Convert . ToBoolean ( dr [ "canSeedOut" ] . ToString ( ) ) ; ;
tmpObj . _OcanSeedOut = Convert . ToBoolean ( dr [ "canSeedOut" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
2024-02-06 19:36:47 +08:00
LogHelper . debug ( this . GetType ( ) , "canSeedOut value :" + dr [ "canSeedOut" ] . ToString ( ) ) ;
2023-12-03 22:13:49 +08:00
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-09-04 22:41:19 +08:00
}
2023-11-21 19:18:23 +08:00
if ( dr . Table . Columns . Contains ( "canZhitong" ) & & ! ( dr [ "canZhitong" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-11-21 19:18:23 +08:00
tmpObj . _canZhitong = Convert . ToBoolean ( dr [ "canZhitong" ] . ToString ( ) ) ; ;
tmpObj . _OcanZhitong = Convert . ToBoolean ( dr [ "canZhitong" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
2024-02-06 19:36:47 +08:00
LogHelper . debug ( this . GetType ( ) , "canZhitong value :" + dr [ "canZhitong" ] . ToString ( ) ) ;
2023-12-03 22:13:49 +08:00
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-11-21 19:18:23 +08:00
}
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 ( "minOperateUnit" ) & & ! ( dr [ "minOperateUnit" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _minOperateUnit = dr [ "minOperateUnit" ] . ToString ( ) ;
tmpObj . _OminOperateUnit = dr [ "minOperateUnit" ] . ToString ( ) ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "minOperateUnit" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
if ( dr . Table . Columns . Contains ( "minOperateCount" ) & & ! ( dr [ "minOperateCount" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-05-23 16:13:17 +08:00
tmpObj . _minOperateCount = Convert . ToDecimal ( dr [ "minOperateCount" ] . ToString ( ) ) ; ;
tmpObj . _OminOperateCount = Convert . ToDecimal ( dr [ "minOperateCount" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "minOperateCount" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
}
if ( dr . Table . Columns . Contains ( "barcode" ) & & ! ( dr [ "barcode" ] is DBNull ) )
{
try
{
tmpObj . _barcode = dr [ "barcode" ] . ToString ( ) ;
tmpObj . _Obarcode = dr [ "barcode" ] . ToString ( ) ;
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "barcode" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
2023-09-04 22:41:19 +08:00
if ( dr . Table . Columns . Contains ( "expiryDays" ) & & ! ( dr [ "expiryDays" ] is DBNull ) )
{
2023-12-03 22:13:49 +08:00
try
{
2023-09-04 22:41:19 +08:00
tmpObj . _expiryDays = Convert . ToInt32 ( dr [ "expiryDays" ] . ToString ( ) ) ; ;
tmpObj . _OexpiryDays = Convert . ToInt32 ( dr [ "expiryDays" ] . ToString ( ) ) ; ;
2023-12-03 22:13:49 +08:00
}
catch ( Exception er )
{
LogHelper . debug ( this . GetType ( ) , "value :" + dr [ "expiryDays" ] . ToString ( ) ) ;
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-09-04 22:41:19 +08:00
}
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 )
{
2024-02-06 19:36:47 +08:00
LogHelper . debug ( this . GetType ( ) , "dr value :" + dr [ "dr" ] . ToString ( ) ) ;
2023-12-03 22:13:49 +08:00
LogHelper . debug ( this . GetType ( ) , er . Message ) ;
}
2023-05-23 16:13:17 +08:00
}
}
}
protected override void CmdPrepare ( SqlCommand oraCmd ) {
WmsGoods_base tmpObj = ( WmsGoods_base ) modelObj ;
switch ( this . _op_flag ) {
case ( int ) op_flag . add :
_strSql = "INSERT INTO dbo.T_WMSGOODS({0}) VALUES({1} )" ;
_strSql = String . Format ( _strSql , getFields ( tmpObj ) , getValues ( tmpObj ) ) ;
break ;
case ( int ) op_flag . update :
2023-12-03 22:13:49 +08:00
// _strSql = "UPDATE dbo.T_WMSGOODS SET GOODSID = @GOODSID,GOODSTYPE = @GOODSTYPE,OWNERCODE = @OWNERCODE,PLOTID = @PLOTID,PISDATEVALID = @PISDATEVALID,PART = @PART,FULL_MAX = @FULL_MAX,BULKMAX = @BULKMAX,BULKMAX1 = @BULKMAX1,BATCHMAX1 = @BATCHMAX1,BATCHMAX2 = @BATCHMAX2,BATCHMAX3 = @BATCHMAX3,BATCHMAX4 = @BATCHMAX4,LENGTH = @LENGTH,WIDTH = @WIDTH,HEIGHT = @HEIGHT,WEIGHT = @WEIGHT,VALIDTERMDAYS = @VALIDTERMDAYS,BIGCOUNT = @BIGCOUNT,REPTYPE = @REPTYPE,ABC = @ABC,LOWSTORE = @LOWSTORE,HIGHSTORE = @HIGHSTORE,TEMPREQUIRED = @TEMPREQUIRED,TEMPERATURE = @TEMPERATURE,CANSEEDOUT = @CANSEEDOUT,CANZHITONG = @CANZHITONG,OPERATER = @OPERATER,MINOPERATEUNIT = @MINOPERATEUNIT,MINOPERATECOUNT = @MINOPERATECOUNT,BARCODE = @BARCODE,EXPIRYDAYS = @EXPIRYDAYS,LASTMODIFIED = getdate() WHERE ID = @ID";
2023-05-23 16:13:17 +08:00
_strSql = "UPDATE dbo.T_WMSGOODS {0} WHERE ID = @ID" ;
_strSql = String . Format ( _strSql , getChangedFields ( tmpObj ) ) ;
break ;
case ( int ) op_flag . delete :
// _strSql = "UPDATE dbo.T_WMSGOODS SET DR =0 WHERE ID = @ID";
_strSql = "delete from dbo.T_WMSGOODS WHERE ID = @ID" ;
break ;
case ( int ) op_flag . getObj :
_strSql = "SELECT * FROM dbo.T_WMSGOODS WHERE ID = @ID" ;
break ;
case ( int ) op_flag . queryAll :
_strSql = "SELECT * FROM dbo.T_WMSGOODS WHERE DR =1 " ;
// if (this.rownumEnd >0 )
{
// _strSql = "SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY ID DESC) as sortNo FROM dbo.T_WMSGOODS WHERE DR =1 )AS SORTEDTB WHERE DR =1 AND sortNo BETWEEN @START AND @END";
}
// _strSql += ";SELECT COUNT(*) FROM T_WMSGOODS WHERE DR =1";
break ;
case ( int ) op_flag . queryActived :
_strSql = "SELECT * FROM dbo.T_WMSGOODS WHERE DR =1" ;
_strSql + = ";SELECT COUNT(*) FROM T_WMSGOODS WHERE DR =1" ;
break ;
case ( int ) op_flag . getPk :
_strSql = "SELECT MAX(ID) FROM dbo.T_WMSGOODS WHERE DR =1" ;
break ;
case ( int ) op_flag . getCount :
_strSql = "SELECT COUNT(*) FROM T_WMSGOODS WHERE DR =1" ;
break ;
}
oraCmd . CommandText = _strSql ;
fillParameters ( oraCmd , tmpObj ) ;
}
private string getFields ( WmsGoods_base tmpObj )
{
String colums = "" ;
colums + = tmpObj . _goodsId = = null ? "" : "GOODSID" + "," ;
colums + = tmpObj . _goodsType = = null ? "" : "GOODSTYPE" + "," ;
colums + = tmpObj . _ownerCode = = null ? "" : "OWNERCODE" + "," ;
colums + = tmpObj . _plotId = = null ? "" : "PLOTID" + "," ;
colums + = tmpObj . _pIsDateValid = = null ? "" : "PISDATEVALID" + "," ;
colums + = tmpObj . _part = = null ? "" : "PART" + "," ;
colums + = tmpObj . _full_max = = null ? "" : "FULL_MAX" + "," ;
colums + = tmpObj . _bulkMax = = null ? "" : "BULKMAX" + "," ;
colums + = tmpObj . _bulkMax1 = = null ? "" : "BULKMAX1" + "," ;
colums + = tmpObj . _batchMax1 = = null ? "" : "BATCHMAX1" + "," ;
colums + = tmpObj . _batchMax2 = = null ? "" : "BATCHMAX2" + "," ;
colums + = tmpObj . _batchMax3 = = null ? "" : "BATCHMAX3" + "," ;
colums + = tmpObj . _batchMax4 = = null ? "" : "BATCHMAX4" + "," ;
colums + = tmpObj . _length = = null ? "" : "LENGTH" + "," ;
colums + = tmpObj . _width = = null ? "" : "WIDTH" + "," ;
colums + = tmpObj . _height = = null ? "" : "HEIGHT" + "," ;
colums + = tmpObj . _weight = = null ? "" : "WEIGHT" + "," ;
colums + = tmpObj . _validTermDays = = null ? "" : "VALIDTERMDAYS" + "," ;
colums + = tmpObj . _bigCount = = null ? "" : "BIGCOUNT" + "," ;
colums + = tmpObj . _repType = = null ? "" : "REPTYPE" + "," ;
colums + = tmpObj . _ABC = = null ? "" : "ABC" + "," ;
colums + = tmpObj . _lowStore = = null ? "" : "LOWSTORE" + "," ;
colums + = tmpObj . _highStore = = null ? "" : "HIGHSTORE" + "," ;
colums + = tmpObj . _tempRequired = = null ? "" : "TEMPREQUIRED" + "," ;
colums + = tmpObj . _temperature = = null ? "" : "TEMPERATURE" + "," ;
2023-09-04 22:41:19 +08:00
colums + = tmpObj . _canSeedOut = = null ? "" : "CANSEEDOUT" + "," ;
2023-11-21 19:18:23 +08:00
colums + = tmpObj . _canZhitong = = null ? "" : "CANZHITONG" + "," ;
2023-05-23 16:13:17 +08:00
colums + = tmpObj . _operater = = null ? "" : "OPERATER" + "," ;
colums + = tmpObj . _minOperateUnit = = null ? "" : "MINOPERATEUNIT" + "," ;
colums + = tmpObj . _minOperateCount = = null ? "" : "MINOPERATECOUNT" + "," ;
2023-12-03 22:13:49 +08:00
colums + = tmpObj . _barcode = = null ? "" : "BARCODE" + "," ;
2023-09-04 22:41:19 +08:00
colums + = tmpObj . _expiryDays = = null ? "" : "EXPIRYDAYS" + "," ;
2023-05-23 16:13:17 +08:00
return colums . Substring ( 0 , colums . Length - 1 ) ;
}
private string getValues ( WmsGoods_base tmpObj )
{
String values = "" ;
values + = tmpObj . _goodsId = = null ? "" : "@GOODSID" + "," ;
values + = tmpObj . _goodsType = = null ? "" : "@GOODSTYPE" + "," ;
values + = tmpObj . _ownerCode = = null ? "" : "@OWNERCODE" + "," ;
values + = tmpObj . _plotId = = null ? "" : "@PLOTID" + "," ;
values + = tmpObj . _pIsDateValid = = null ? "" : "@PISDATEVALID" + "," ;
values + = tmpObj . _part = = null ? "" : "@PART" + "," ;
values + = tmpObj . _full_max = = null ? "" : "@FULL_MAX" + "," ;
values + = tmpObj . _bulkMax = = null ? "" : "@BULKMAX" + "," ;
values + = tmpObj . _bulkMax1 = = null ? "" : "@BULKMAX1" + "," ;
values + = tmpObj . _batchMax1 = = null ? "" : "@BATCHMAX1" + "," ;
values + = tmpObj . _batchMax2 = = null ? "" : "@BATCHMAX2" + "," ;
values + = tmpObj . _batchMax3 = = null ? "" : "@BATCHMAX3" + "," ;
values + = tmpObj . _batchMax4 = = null ? "" : "@BATCHMAX4" + "," ;
values + = tmpObj . _length = = null ? "" : "@LENGTH" + "," ;
values + = tmpObj . _width = = null ? "" : "@WIDTH" + "," ;
values + = tmpObj . _height = = null ? "" : "@HEIGHT" + "," ;
values + = tmpObj . _weight = = null ? "" : "@WEIGHT" + "," ;
values + = tmpObj . _validTermDays = = null ? "" : "@VALIDTERMDAYS" + "," ;
values + = tmpObj . _bigCount = = null ? "" : "@BIGCOUNT" + "," ;
values + = tmpObj . _repType = = null ? "" : "@REPTYPE" + "," ;
values + = tmpObj . _ABC = = null ? "" : "@ABC" + "," ;
values + = tmpObj . _lowStore = = null ? "" : "@LOWSTORE" + "," ;
values + = tmpObj . _highStore = = null ? "" : "@HIGHSTORE" + "," ;
values + = tmpObj . _tempRequired = = null ? "" : "@TEMPREQUIRED" + "," ;
values + = tmpObj . _temperature = = null ? "" : "@TEMPERATURE" + "," ;
2023-09-04 22:41:19 +08:00
values + = tmpObj . _canSeedOut = = null ? "" : "@CANSEEDOUT" + "," ;
2023-11-21 19:18:23 +08:00
values + = tmpObj . _canZhitong = = null ? "" : "@CANZHITONG" + "," ;
2023-05-23 16:13:17 +08:00
values + = tmpObj . _operater = = null ? "" : "@OPERATER" + "," ;
values + = tmpObj . _minOperateUnit = = null ? "" : "@MINOPERATEUNIT" + "," ;
values + = tmpObj . _minOperateCount = = null ? "" : "@MINOPERATECOUNT" + "," ;
2023-12-03 22:13:49 +08:00
values + = tmpObj . _barcode = = null ? "" : "@BARCODE" + "," ;
2023-09-04 22:41:19 +08:00
values + = tmpObj . _expiryDays = = null ? "" : "@EXPIRYDAYS" + "," ;
2023-05-23 16:13:17 +08:00
return values . Substring ( 0 , values . Length - 1 ) ;
}
private string getChangedFields ( WmsGoods_base tmpObj )
{
string updateFields = " set " ;
2023-09-04 22:41:19 +08:00
if ( tmpObj . _goodsId ! = null & & tmpObj . _goodsId ! = tmpObj . _OgoodsId )
2023-05-23 16:13:17 +08:00
{
updateFields + = "GOODSID = @GOODSID," ;
}
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 . _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 . _plotId ! = null & & tmpObj . _plotId ! = tmpObj . _OplotId )
2023-05-23 16:13:17 +08:00
{
updateFields + = "PLOTID = @PLOTID," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _pIsDateValid ! = null & & tmpObj . _pIsDateValid ! = tmpObj . _OpIsDateValid )
2023-05-23 16:13:17 +08:00
{
updateFields + = "PISDATEVALID = @PISDATEVALID," ;
}
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 . _full_max ! = null & & tmpObj . _full_max ! = tmpObj . _Ofull_max )
2023-05-23 16:13:17 +08:00
{
updateFields + = "FULL_MAX = @FULL_MAX," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _bulkMax ! = null & & tmpObj . _bulkMax ! = tmpObj . _ObulkMax )
2023-05-23 16:13:17 +08:00
{
updateFields + = "BULKMAX = @BULKMAX," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _bulkMax1 ! = null & & tmpObj . _bulkMax1 ! = tmpObj . _ObulkMax1 )
2023-05-23 16:13:17 +08:00
{
updateFields + = "BULKMAX1 = @BULKMAX1," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _batchMax1 ! = null & & tmpObj . _batchMax1 ! = tmpObj . _ObatchMax1 )
2023-05-23 16:13:17 +08:00
{
updateFields + = "BATCHMAX1 = @BATCHMAX1," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _batchMax2 ! = null & & tmpObj . _batchMax2 ! = tmpObj . _ObatchMax2 )
2023-05-23 16:13:17 +08:00
{
updateFields + = "BATCHMAX2 = @BATCHMAX2," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _batchMax3 ! = null & & tmpObj . _batchMax3 ! = tmpObj . _ObatchMax3 )
2023-05-23 16:13:17 +08:00
{
updateFields + = "BATCHMAX3 = @BATCHMAX3," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _batchMax4 ! = null & & tmpObj . _batchMax4 ! = tmpObj . _ObatchMax4 )
2023-05-23 16:13:17 +08:00
{
updateFields + = "BATCHMAX4 = @BATCHMAX4," ;
}
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 . _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 . _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 . _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 . _validTermDays ! = null & & tmpObj . _validTermDays ! = tmpObj . _OvalidTermDays )
2023-05-23 16:13:17 +08:00
{
updateFields + = "VALIDTERMDAYS = @VALIDTERMDAYS," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _bigCount ! = null & & tmpObj . _bigCount ! = tmpObj . _ObigCount )
2023-05-23 16:13:17 +08:00
{
updateFields + = "BIGCOUNT = @BIGCOUNT," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _repType ! = null & & tmpObj . _repType ! = tmpObj . _OrepType )
2023-05-23 16:13:17 +08:00
{
updateFields + = "REPTYPE = @REPTYPE," ;
}
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 . _lowStore ! = null & & tmpObj . _lowStore ! = tmpObj . _OlowStore )
2023-05-23 16:13:17 +08:00
{
updateFields + = "LOWSTORE = @LOWSTORE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _highStore ! = null & & tmpObj . _highStore ! = tmpObj . _OhighStore )
2023-05-23 16:13:17 +08:00
{
updateFields + = "HIGHSTORE = @HIGHSTORE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _tempRequired ! = null & & tmpObj . _tempRequired ! = tmpObj . _OtempRequired )
2023-05-23 16:13:17 +08:00
{
updateFields + = "TEMPREQUIRED = @TEMPREQUIRED," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _temperature ! = null & & tmpObj . _temperature ! = tmpObj . _Otemperature )
2023-05-23 16:13:17 +08:00
{
updateFields + = "TEMPERATURE = @TEMPERATURE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _canSeedOut ! = null & & tmpObj . _canSeedOut ! = tmpObj . _OcanSeedOut )
{
updateFields + = "CANSEEDOUT = @CANSEEDOUT," ;
}
2023-11-21 19:18:23 +08:00
if ( tmpObj . _canZhitong ! = null & & tmpObj . _canZhitong ! = tmpObj . _OcanZhitong )
{
updateFields + = "CANZHITONG = @CANZHITONG," ;
}
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 . _minOperateUnit ! = null & & tmpObj . _minOperateUnit ! = tmpObj . _OminOperateUnit )
2023-05-23 16:13:17 +08:00
{
updateFields + = "MINOPERATEUNIT = @MINOPERATEUNIT," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _minOperateCount ! = null & & tmpObj . _minOperateCount ! = tmpObj . _OminOperateCount )
2023-05-23 16:13:17 +08:00
{
updateFields + = "MINOPERATECOUNT = @MINOPERATECOUNT," ;
2023-09-04 22:41:19 +08:00
}
2023-12-03 22:13:49 +08:00
if ( tmpObj . _barcode ! = null & & tmpObj . _barcode ! = tmpObj . _Obarcode )
{
updateFields + = "BARCODE = @BARCODE," ;
}
2023-09-04 22:41:19 +08:00
if ( tmpObj . _expiryDays ! = null & & tmpObj . _expiryDays ! = tmpObj . _OexpiryDays )
{
updateFields + = "EXPIRYDAYS = @EXPIRYDAYS," ;
2023-05-23 16:13:17 +08:00
}
updateFields + = "LASTMODIFIED = getdate()" ;
return updateFields ;
}
private void fillParameters ( SqlCommand oraCmd , WmsGoods_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 ( "@GOODSID" , VerifyDbnull ( tmpObj . _goodsId ) ) ;
oraCmd . Parameters . AddWithValue ( "@GOODSTYPE" , VerifyDbnull ( tmpObj . _goodsType ) ) ;
oraCmd . Parameters . AddWithValue ( "@OWNERCODE" , VerifyDbnull ( tmpObj . _ownerCode ) ) ;
oraCmd . Parameters . AddWithValue ( "@PLOTID" , VerifyDbnull ( tmpObj . _plotId ) ) ;
oraCmd . Parameters . AddWithValue ( "@PISDATEVALID" , VerifyDbnull ( tmpObj . _pIsDateValid ) ) ;
oraCmd . Parameters . AddWithValue ( "@PART" , VerifyDbnull ( tmpObj . _part ) ) ;
oraCmd . Parameters . AddWithValue ( "@FULL_MAX" , VerifyDbnull ( tmpObj . _full_max ) ) ;
oraCmd . Parameters . AddWithValue ( "@BULKMAX" , VerifyDbnull ( tmpObj . _bulkMax ) ) ;
oraCmd . Parameters . AddWithValue ( "@BULKMAX1" , VerifyDbnull ( tmpObj . _bulkMax1 ) ) ;
oraCmd . Parameters . AddWithValue ( "@BATCHMAX1" , VerifyDbnull ( tmpObj . _batchMax1 ) ) ;
oraCmd . Parameters . AddWithValue ( "@BATCHMAX2" , VerifyDbnull ( tmpObj . _batchMax2 ) ) ;
oraCmd . Parameters . AddWithValue ( "@BATCHMAX3" , VerifyDbnull ( tmpObj . _batchMax3 ) ) ;
oraCmd . Parameters . AddWithValue ( "@BATCHMAX4" , VerifyDbnull ( tmpObj . _batchMax4 ) ) ;
oraCmd . Parameters . AddWithValue ( "@LENGTH" , VerifyDbnull ( tmpObj . _length ) ) ;
oraCmd . Parameters . AddWithValue ( "@WIDTH" , VerifyDbnull ( tmpObj . _width ) ) ;
oraCmd . Parameters . AddWithValue ( "@HEIGHT" , VerifyDbnull ( tmpObj . _height ) ) ;
oraCmd . Parameters . AddWithValue ( "@WEIGHT" , VerifyDbnull ( tmpObj . _weight ) ) ;
oraCmd . Parameters . AddWithValue ( "@VALIDTERMDAYS" , VerifyDbnull ( tmpObj . _validTermDays ) ) ;
oraCmd . Parameters . AddWithValue ( "@BIGCOUNT" , VerifyDbnull ( tmpObj . _bigCount ) ) ;
oraCmd . Parameters . AddWithValue ( "@REPTYPE" , VerifyDbnull ( tmpObj . _repType ) ) ;
oraCmd . Parameters . AddWithValue ( "@ABC" , VerifyDbnull ( tmpObj . _ABC ) ) ;
oraCmd . Parameters . AddWithValue ( "@LOWSTORE" , VerifyDbnull ( tmpObj . _lowStore ) ) ;
oraCmd . Parameters . AddWithValue ( "@HIGHSTORE" , VerifyDbnull ( tmpObj . _highStore ) ) ;
oraCmd . Parameters . AddWithValue ( "@TEMPREQUIRED" , VerifyDbnull ( tmpObj . _tempRequired ) ) ;
oraCmd . Parameters . AddWithValue ( "@TEMPERATURE" , VerifyDbnull ( tmpObj . _temperature ) ) ;
2023-09-04 22:41:19 +08:00
oraCmd . Parameters . AddWithValue ( "@CANSEEDOUT" , VerifyDbnull ( tmpObj . _canSeedOut ) ) ;
2023-11-21 19:18:23 +08:00
oraCmd . Parameters . AddWithValue ( "@CANZHITONG" , VerifyDbnull ( tmpObj . _canZhitong ) ) ;
2023-05-23 16:13:17 +08:00
oraCmd . Parameters . AddWithValue ( "@OPERATER" , VerifyDbnull ( tmpObj . _operater ) ) ;
oraCmd . Parameters . AddWithValue ( "@MINOPERATEUNIT" , VerifyDbnull ( tmpObj . _minOperateUnit ) ) ;
oraCmd . Parameters . AddWithValue ( "@MINOPERATECOUNT" , VerifyDbnull ( tmpObj . _minOperateCount ) ) ;
2023-12-03 22:13:49 +08:00
oraCmd . Parameters . AddWithValue ( "@BARCODE" , VerifyDbnull ( tmpObj . _barcode ) ) ;
2023-09-04 22:41:19 +08:00
oraCmd . Parameters . AddWithValue ( "@EXPIRYDAYS" , VerifyDbnull ( tmpObj . _expiryDays ) ) ;
2023-05-23 16:13:17 +08:00
// oraCmd.Parameters.AddWithValue("@LASTMODIFIED", "getdate()") ;
return ;
case ( int ) op_flag . add :
if ( tmpObj . _goodsId ! = null )
oraCmd . Parameters . AddWithValue ( "@GOODSID" , VerifyDbnull ( tmpObj . _goodsId ) ) ;
if ( tmpObj . _goodsType ! = null )
oraCmd . Parameters . AddWithValue ( "@GOODSTYPE" , VerifyDbnull ( tmpObj . _goodsType ) ) ;
if ( tmpObj . _ownerCode ! = null )
oraCmd . Parameters . AddWithValue ( "@OWNERCODE" , VerifyDbnull ( tmpObj . _ownerCode ) ) ;
if ( tmpObj . _plotId ! = null )
oraCmd . Parameters . AddWithValue ( "@PLOTID" , VerifyDbnull ( tmpObj . _plotId ) ) ;
if ( tmpObj . _pIsDateValid ! = null )
oraCmd . Parameters . AddWithValue ( "@PISDATEVALID" , VerifyDbnull ( tmpObj . _pIsDateValid ) ) ;
if ( tmpObj . _part ! = null )
oraCmd . Parameters . AddWithValue ( "@PART" , VerifyDbnull ( tmpObj . _part ) ) ;
if ( tmpObj . _full_max ! = null )
oraCmd . Parameters . AddWithValue ( "@FULL_MAX" , VerifyDbnull ( tmpObj . _full_max ) ) ;
if ( tmpObj . _bulkMax ! = null )
oraCmd . Parameters . AddWithValue ( "@BULKMAX" , VerifyDbnull ( tmpObj . _bulkMax ) ) ;
if ( tmpObj . _bulkMax1 ! = null )
oraCmd . Parameters . AddWithValue ( "@BULKMAX1" , VerifyDbnull ( tmpObj . _bulkMax1 ) ) ;
if ( tmpObj . _batchMax1 ! = null )
oraCmd . Parameters . AddWithValue ( "@BATCHMAX1" , VerifyDbnull ( tmpObj . _batchMax1 ) ) ;
if ( tmpObj . _batchMax2 ! = null )
oraCmd . Parameters . AddWithValue ( "@BATCHMAX2" , VerifyDbnull ( tmpObj . _batchMax2 ) ) ;
if ( tmpObj . _batchMax3 ! = null )
oraCmd . Parameters . AddWithValue ( "@BATCHMAX3" , VerifyDbnull ( tmpObj . _batchMax3 ) ) ;
if ( tmpObj . _batchMax4 ! = null )
oraCmd . Parameters . AddWithValue ( "@BATCHMAX4" , VerifyDbnull ( tmpObj . _batchMax4 ) ) ;
if ( tmpObj . _length ! = null )
oraCmd . Parameters . AddWithValue ( "@LENGTH" , VerifyDbnull ( tmpObj . _length ) ) ;
if ( tmpObj . _width ! = null )
oraCmd . Parameters . AddWithValue ( "@WIDTH" , VerifyDbnull ( tmpObj . _width ) ) ;
if ( tmpObj . _height ! = null )
oraCmd . Parameters . AddWithValue ( "@HEIGHT" , VerifyDbnull ( tmpObj . _height ) ) ;
if ( tmpObj . _weight ! = null )
oraCmd . Parameters . AddWithValue ( "@WEIGHT" , VerifyDbnull ( tmpObj . _weight ) ) ;
if ( tmpObj . _validTermDays ! = null )
oraCmd . Parameters . AddWithValue ( "@VALIDTERMDAYS" , VerifyDbnull ( tmpObj . _validTermDays ) ) ;
if ( tmpObj . _bigCount ! = null )
oraCmd . Parameters . AddWithValue ( "@BIGCOUNT" , VerifyDbnull ( tmpObj . _bigCount ) ) ;
if ( tmpObj . _repType ! = null )
oraCmd . Parameters . AddWithValue ( "@REPTYPE" , VerifyDbnull ( tmpObj . _repType ) ) ;
if ( tmpObj . _ABC ! = null )
oraCmd . Parameters . AddWithValue ( "@ABC" , VerifyDbnull ( tmpObj . _ABC ) ) ;
if ( tmpObj . _lowStore ! = null )
oraCmd . Parameters . AddWithValue ( "@LOWSTORE" , VerifyDbnull ( tmpObj . _lowStore ) ) ;
if ( tmpObj . _highStore ! = null )
oraCmd . Parameters . AddWithValue ( "@HIGHSTORE" , VerifyDbnull ( tmpObj . _highStore ) ) ;
if ( tmpObj . _tempRequired ! = null )
oraCmd . Parameters . AddWithValue ( "@TEMPREQUIRED" , VerifyDbnull ( tmpObj . _tempRequired ) ) ;
if ( tmpObj . _temperature ! = null )
oraCmd . Parameters . AddWithValue ( "@TEMPERATURE" , VerifyDbnull ( tmpObj . _temperature ) ) ;
2023-09-04 22:41:19 +08:00
if ( tmpObj . _canSeedOut ! = null )
oraCmd . Parameters . AddWithValue ( "@CANSEEDOUT" , VerifyDbnull ( tmpObj . _canSeedOut ) ) ;
2023-11-21 19:18:23 +08:00
if ( tmpObj . _canZhitong ! = null )
oraCmd . Parameters . AddWithValue ( "@CANZHITONG" , VerifyDbnull ( tmpObj . _canZhitong ) ) ;
2023-05-23 16:13:17 +08:00
if ( tmpObj . _operater ! = null )
oraCmd . Parameters . AddWithValue ( "@OPERATER" , VerifyDbnull ( tmpObj . _operater ) ) ;
if ( tmpObj . _minOperateUnit ! = null )
oraCmd . Parameters . AddWithValue ( "@MINOPERATEUNIT" , VerifyDbnull ( tmpObj . _minOperateUnit ) ) ;
if ( tmpObj . _minOperateCount ! = null )
oraCmd . Parameters . AddWithValue ( "@MINOPERATECOUNT" , VerifyDbnull ( tmpObj . _minOperateCount ) ) ;
2023-12-03 22:13:49 +08:00
if ( tmpObj . _barcode ! = null )
oraCmd . Parameters . AddWithValue ( "@BARCODE" , VerifyDbnull ( tmpObj . _barcode ) ) ;
2023-09-04 22:41:19 +08:00
if ( tmpObj . _expiryDays ! = null )
oraCmd . Parameters . AddWithValue ( "@EXPIRYDAYS" , VerifyDbnull ( tmpObj . _expiryDays ) ) ;
2023-05-23 16:13:17 +08:00
return ;
}
}
protected override enumDbInstance instance
{
get
{
return enumDbInstance . wms ;
}
}
}
#endregion
}