1066 lines
		
	
	
		
			56 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			1066 lines
		
	
	
		
			56 KiB
		
	
	
	
		
			C#
		
	
	
	
| /// <summary>
 | |
| ///Data  Implemention Object 
 | |
| ///BASIC CRUD CLASS FOR TABLE t_wmsGoods
 | |
| ///By wm 
 | |
| ///on 11/27/2023
 | |
| /// </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))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj.ID =   Convert.ToInt32(dr["ID"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["ID"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("goodsId") && !(dr["goodsId"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._goodsId =  dr["goodsId"].ToString() ;
 | |
|                                 tmpObj._OgoodsId =  dr["goodsId"].ToString() ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["goodsId"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("goodsType") && !(dr["goodsType"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._goodsType =   Convert.ToInt32(dr["goodsType"].ToString()); ;
 | |
|                                 tmpObj._OgoodsType =   Convert.ToInt32(dr["goodsType"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["goodsType"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("ownerCode") && !(dr["ownerCode"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._ownerCode =  dr["ownerCode"].ToString() ;
 | |
|                                 tmpObj._OownerCode =  dr["ownerCode"].ToString() ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["ownerCode"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("plotId") && !(dr["plotId"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._plotId =   Convert.ToInt32(dr["plotId"].ToString()); ;
 | |
|                                 tmpObj._OplotId =   Convert.ToInt32(dr["plotId"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["plotId"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("pIsDateValid") && !(dr["pIsDateValid"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._pIsDateValid =   Convert.ToBoolean(dr["pIsDateValid"].ToString()); ;
 | |
|                                 tmpObj._OpIsDateValid =   Convert.ToBoolean(dr["pIsDateValid"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "pIsDateValid value :" + dr["pIsDateValid"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("part") && !(dr["part"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._part =   Convert.ToInt32(dr["part"].ToString()); ;
 | |
|                                 tmpObj._Opart =   Convert.ToInt32(dr["part"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["part"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("full_max") && !(dr["full_max"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._full_max =   Convert.ToDecimal(dr["full_max"].ToString()); ;
 | |
|                                 tmpObj._Ofull_max =   Convert.ToDecimal(dr["full_max"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["full_max"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("bulkMax") && !(dr["bulkMax"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._bulkMax =   Convert.ToDecimal(dr["bulkMax"].ToString()); ;
 | |
|                                 tmpObj._ObulkMax =   Convert.ToDecimal(dr["bulkMax"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["bulkMax"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("bulkMax1") && !(dr["bulkMax1"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._bulkMax1 =   Convert.ToDecimal(dr["bulkMax1"].ToString()); ;
 | |
|                                 tmpObj._ObulkMax1 =   Convert.ToDecimal(dr["bulkMax1"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["bulkMax1"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("batchMax1") && !(dr["batchMax1"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._batchMax1 =   Convert.ToDecimal(dr["batchMax1"].ToString()); ;
 | |
|                                 tmpObj._ObatchMax1 =   Convert.ToDecimal(dr["batchMax1"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["batchMax1"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("batchMax2") && !(dr["batchMax2"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._batchMax2 =   Convert.ToDecimal(dr["batchMax2"].ToString()); ;
 | |
|                                 tmpObj._ObatchMax2 =   Convert.ToDecimal(dr["batchMax2"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["batchMax2"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("batchMax3") && !(dr["batchMax3"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._batchMax3 =   Convert.ToDecimal(dr["batchMax3"].ToString()); ;
 | |
|                                 tmpObj._ObatchMax3 =   Convert.ToDecimal(dr["batchMax3"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["batchMax3"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("batchMax4") && !(dr["batchMax4"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._batchMax4 =   Convert.ToDecimal(dr["batchMax4"].ToString()); ;
 | |
|                                 tmpObj._ObatchMax4 =   Convert.ToDecimal(dr["batchMax4"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["batchMax4"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("length") && !(dr["length"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._length =   Convert.ToDecimal(dr["length"].ToString()); ;
 | |
|                                 tmpObj._Olength =   Convert.ToDecimal(dr["length"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["length"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("width") && !(dr["width"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._width =   Convert.ToDecimal(dr["width"].ToString()); ;
 | |
|                                 tmpObj._Owidth =   Convert.ToDecimal(dr["width"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["width"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("height") && !(dr["height"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._height =   Convert.ToDecimal(dr["height"].ToString()); ;
 | |
|                                 tmpObj._Oheight =   Convert.ToDecimal(dr["height"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["height"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("weight") && !(dr["weight"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._weight =   Convert.ToDecimal(dr["weight"].ToString()); ;
 | |
|                                 tmpObj._Oweight =   Convert.ToDecimal(dr["weight"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["weight"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("validTermDays") && !(dr["validTermDays"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._validTermDays =   Convert.ToInt32(dr["validTermDays"].ToString()); ;
 | |
|                                 tmpObj._OvalidTermDays =   Convert.ToInt32(dr["validTermDays"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["validTermDays"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("bigCount") && !(dr["bigCount"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._bigCount =   Convert.ToDecimal(dr["bigCount"].ToString()); ;
 | |
|                                 tmpObj._ObigCount =   Convert.ToDecimal(dr["bigCount"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["bigCount"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("repType") && !(dr["repType"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._repType =   Convert.ToInt32(dr["repType"].ToString()); ;
 | |
|                                 tmpObj._OrepType =   Convert.ToInt32(dr["repType"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["repType"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("ABC") && !(dr["ABC"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._ABC =   Convert.ToInt32(dr["ABC"].ToString()); ;
 | |
|                                 tmpObj._OABC =   Convert.ToInt32(dr["ABC"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["ABC"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("lowStore") && !(dr["lowStore"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._lowStore =   Convert.ToDecimal(dr["lowStore"].ToString()); ;
 | |
|                                 tmpObj._OlowStore =   Convert.ToDecimal(dr["lowStore"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["lowStore"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("highStore") && !(dr["highStore"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._highStore =   Convert.ToDecimal(dr["highStore"].ToString()); ;
 | |
|                                 tmpObj._OhighStore =   Convert.ToDecimal(dr["highStore"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["highStore"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("tempRequired") && !(dr["tempRequired"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._tempRequired =   Convert.ToBoolean(dr["tempRequired"].ToString()); ;
 | |
|                                 tmpObj._OtempRequired =   Convert.ToBoolean(dr["tempRequired"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), " tempRequired value :" + dr["tempRequired"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("temperature") && !(dr["temperature"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._temperature =   Convert.ToDecimal(dr["temperature"].ToString()); ;
 | |
|                                 tmpObj._Otemperature =   Convert.ToDecimal(dr["temperature"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["temperature"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("canSeedOut") && !(dr["canSeedOut"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._canSeedOut =   Convert.ToBoolean(dr["canSeedOut"].ToString()); ;
 | |
|                                 tmpObj._OcanSeedOut =   Convert.ToBoolean(dr["canSeedOut"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "canSeedOut value :" + dr["canSeedOut"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("canZhitong") && !(dr["canZhitong"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._canZhitong =   Convert.ToBoolean(dr["canZhitong"].ToString()); ;
 | |
|                                 tmpObj._OcanZhitong =   Convert.ToBoolean(dr["canZhitong"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "canZhitong value :" + dr["canZhitong"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("operater") && !(dr["operater"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._operater =   Convert.ToInt32(dr["operater"].ToString()); ;
 | |
|                                 tmpObj._Ooperater =   Convert.ToInt32(dr["operater"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["operater"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("minOperateUnit") && !(dr["minOperateUnit"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._minOperateUnit =  dr["minOperateUnit"].ToString() ;
 | |
|                                 tmpObj._OminOperateUnit =  dr["minOperateUnit"].ToString() ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["minOperateUnit"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("minOperateCount") && !(dr["minOperateCount"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._minOperateCount =   Convert.ToDecimal(dr["minOperateCount"].ToString()); ;
 | |
|                                 tmpObj._OminOperateCount =   Convert.ToDecimal(dr["minOperateCount"].ToString()); ;
 | |
|                                 }
 | |
|                                 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);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("expiryDays") && !(dr["expiryDays"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._expiryDays =   Convert.ToInt32(dr["expiryDays"].ToString()); ;
 | |
|                                 tmpObj._OexpiryDays =   Convert.ToInt32(dr["expiryDays"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["expiryDays"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("lastmodified") && !(dr["lastmodified"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._lastmodified =  dr["lastmodified"].ToString() ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["lastmodified"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("createtime") && !(dr["createtime"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._createtime =  dr["createtime"].ToString() ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "value :"+ dr["createtime"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|                         if (dr.Table.Columns.Contains("dr") && !(dr["dr"] is DBNull))
 | |
|                             {
 | |
|                               try
 | |
|                                 { 
 | |
|                                 tmpObj._dr =   Convert.ToBoolean(dr["dr"].ToString()); ;
 | |
|                                 }
 | |
|                                 catch (Exception er)
 | |
|                                 {
 | |
|                                     LogHelper.debug(this.GetType(), "dr value :"+ dr["dr"].ToString());
 | |
|                                
 | |
|                                     LogHelper.debug(this.GetType(), er.Message);
 | |
|                                     
 | |
|                                     
 | |
|                                 }
 | |
|                     
 | |
|                                
 | |
|                             }
 | |
|              }
 | |
|           }
 | |
| 
 | |
|         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:
 | |
|                    // _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";
 | |
|                     _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"  + ",";
 | |
|              colums+= tmpObj._canSeedOut == null ? "" : "CANSEEDOUT"  + ",";
 | |
|              colums+= tmpObj._canZhitong == null ? "" : "CANZHITONG"  + ",";
 | |
|              colums+= tmpObj._operater == null ? "" : "OPERATER"  + ",";
 | |
|              colums+= tmpObj._minOperateUnit == null ? "" : "MINOPERATEUNIT"  + ",";
 | |
|              colums+= tmpObj._minOperateCount == null ? "" : "MINOPERATECOUNT"  + ",";
 | |
|              colums+= tmpObj._barcode == null ? "" : "BARCODE"  + ",";
 | |
|              colums+= tmpObj._expiryDays == null ? "" : "EXPIRYDAYS"  + ",";
 | |
|     	 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"  + ",";
 | |
|              values+= tmpObj._canSeedOut == null ? "" : "@CANSEEDOUT"  + ",";
 | |
|              values+= tmpObj._canZhitong == null ? "" : "@CANZHITONG"  + ",";
 | |
|              values+= tmpObj._operater == null ? "" : "@OPERATER"  + ",";
 | |
|              values+= tmpObj._minOperateUnit == null ? "" : "@MINOPERATEUNIT"  + ",";
 | |
|              values+= tmpObj._minOperateCount == null ? "" : "@MINOPERATECOUNT"  + ",";
 | |
|              values+= tmpObj._barcode == null ? "" : "@BARCODE"  + ",";
 | |
|              values+= tmpObj._expiryDays == null ? "" : "@EXPIRYDAYS"  + ",";
 | |
|     	 return values.Substring(0,values.Length -1) ;
 | |
|  
 | |
|         }
 | |
|         
 | |
|         private string getChangedFields(WmsGoods_base tmpObj)
 | |
|         {
 | |
|             string updateFields = " set ";
 | |
|             if (tmpObj._goodsId !=null && tmpObj._goodsId != tmpObj._OgoodsId)
 | |
|             {
 | |
|                 updateFields +="GOODSID  = @GOODSID," ; 
 | |
|             }
 | |
|             if (tmpObj._goodsType !=null && tmpObj._goodsType != tmpObj._OgoodsType)
 | |
|             {
 | |
|                 updateFields +="GOODSTYPE  = @GOODSTYPE," ; 
 | |
|             }
 | |
|             if (tmpObj._ownerCode !=null && tmpObj._ownerCode != tmpObj._OownerCode)
 | |
|             {
 | |
|                 updateFields +="OWNERCODE  = @OWNERCODE," ; 
 | |
|             }
 | |
|             if (tmpObj._plotId !=null && tmpObj._plotId != tmpObj._OplotId)
 | |
|             {
 | |
|                 updateFields +="PLOTID  = @PLOTID," ; 
 | |
|             }
 | |
|             if (tmpObj._pIsDateValid !=null && tmpObj._pIsDateValid != tmpObj._OpIsDateValid)
 | |
|             {
 | |
|                 updateFields +="PISDATEVALID  = @PISDATEVALID," ; 
 | |
|             }
 | |
|             if (tmpObj._part !=null && tmpObj._part != tmpObj._Opart)
 | |
|             {
 | |
|                 updateFields +="PART  = @PART," ; 
 | |
|             }
 | |
|             if (tmpObj._full_max !=null && tmpObj._full_max != tmpObj._Ofull_max)
 | |
|             {
 | |
|                 updateFields +="FULL_MAX  = @FULL_MAX," ; 
 | |
|             }
 | |
|             if (tmpObj._bulkMax !=null && tmpObj._bulkMax != tmpObj._ObulkMax)
 | |
|             {
 | |
|                 updateFields +="BULKMAX  = @BULKMAX," ; 
 | |
|             }
 | |
|             if (tmpObj._bulkMax1 !=null && tmpObj._bulkMax1 != tmpObj._ObulkMax1)
 | |
|             {
 | |
|                 updateFields +="BULKMAX1  = @BULKMAX1," ; 
 | |
|             }
 | |
|             if (tmpObj._batchMax1 !=null && tmpObj._batchMax1 != tmpObj._ObatchMax1)
 | |
|             {
 | |
|                 updateFields +="BATCHMAX1  = @BATCHMAX1," ; 
 | |
|             }
 | |
|             if (tmpObj._batchMax2 !=null && tmpObj._batchMax2 != tmpObj._ObatchMax2)
 | |
|             {
 | |
|                 updateFields +="BATCHMAX2  = @BATCHMAX2," ; 
 | |
|             }
 | |
|             if (tmpObj._batchMax3 !=null && tmpObj._batchMax3 != tmpObj._ObatchMax3)
 | |
|             {
 | |
|                 updateFields +="BATCHMAX3  = @BATCHMAX3," ; 
 | |
|             }
 | |
|             if (tmpObj._batchMax4 !=null && tmpObj._batchMax4 != tmpObj._ObatchMax4)
 | |
|             {
 | |
|                 updateFields +="BATCHMAX4  = @BATCHMAX4," ; 
 | |
|             }
 | |
|             if (tmpObj._length !=null && tmpObj._length != tmpObj._Olength)
 | |
|             {
 | |
|                 updateFields +="LENGTH  = @LENGTH," ; 
 | |
|             }
 | |
|             if (tmpObj._width !=null && tmpObj._width != tmpObj._Owidth)
 | |
|             {
 | |
|                 updateFields +="WIDTH  = @WIDTH," ; 
 | |
|             }
 | |
|             if (tmpObj._height !=null && tmpObj._height != tmpObj._Oheight)
 | |
|             {
 | |
|                 updateFields +="HEIGHT  = @HEIGHT," ; 
 | |
|             }
 | |
|             if (tmpObj._weight !=null && tmpObj._weight != tmpObj._Oweight)
 | |
|             {
 | |
|                 updateFields +="WEIGHT  = @WEIGHT," ; 
 | |
|             }
 | |
|             if (tmpObj._validTermDays !=null && tmpObj._validTermDays != tmpObj._OvalidTermDays)
 | |
|             {
 | |
|                 updateFields +="VALIDTERMDAYS  = @VALIDTERMDAYS," ; 
 | |
|             }
 | |
|             if (tmpObj._bigCount !=null && tmpObj._bigCount != tmpObj._ObigCount)
 | |
|             {
 | |
|                 updateFields +="BIGCOUNT  = @BIGCOUNT," ; 
 | |
|             }
 | |
|             if (tmpObj._repType !=null && tmpObj._repType != tmpObj._OrepType)
 | |
|             {
 | |
|                 updateFields +="REPTYPE  = @REPTYPE," ; 
 | |
|             }
 | |
|             if (tmpObj._ABC !=null && tmpObj._ABC != tmpObj._OABC)
 | |
|             {
 | |
|                 updateFields +="ABC  = @ABC," ; 
 | |
|             }
 | |
|             if (tmpObj._lowStore !=null && tmpObj._lowStore != tmpObj._OlowStore)
 | |
|             {
 | |
|                 updateFields +="LOWSTORE  = @LOWSTORE," ; 
 | |
|             }
 | |
|             if (tmpObj._highStore !=null && tmpObj._highStore != tmpObj._OhighStore)
 | |
|             {
 | |
|                 updateFields +="HIGHSTORE  = @HIGHSTORE," ; 
 | |
|             }
 | |
|             if (tmpObj._tempRequired !=null && tmpObj._tempRequired != tmpObj._OtempRequired)
 | |
|             {
 | |
|                 updateFields +="TEMPREQUIRED  = @TEMPREQUIRED," ; 
 | |
|             }
 | |
|             if (tmpObj._temperature !=null && tmpObj._temperature != tmpObj._Otemperature)
 | |
|             {
 | |
|                 updateFields +="TEMPERATURE  = @TEMPERATURE," ; 
 | |
|             }
 | |
|             if (tmpObj._canSeedOut !=null && tmpObj._canSeedOut != tmpObj._OcanSeedOut)
 | |
|             {
 | |
|                 updateFields +="CANSEEDOUT  = @CANSEEDOUT," ; 
 | |
|             }
 | |
|             if (tmpObj._canZhitong !=null && tmpObj._canZhitong != tmpObj._OcanZhitong)
 | |
|             {
 | |
|                 updateFields +="CANZHITONG  = @CANZHITONG," ; 
 | |
|             }
 | |
|             if (tmpObj._operater !=null && tmpObj._operater != tmpObj._Ooperater)
 | |
|             {
 | |
|                 updateFields +="OPERATER  = @OPERATER," ; 
 | |
|             }
 | |
|             if (tmpObj._minOperateUnit !=null && tmpObj._minOperateUnit != tmpObj._OminOperateUnit)
 | |
|             {
 | |
|                 updateFields +="MINOPERATEUNIT  = @MINOPERATEUNIT," ; 
 | |
|             }
 | |
|             if (tmpObj._minOperateCount !=null && tmpObj._minOperateCount != tmpObj._OminOperateCount)
 | |
|             {
 | |
|                 updateFields +="MINOPERATECOUNT  = @MINOPERATECOUNT," ; 
 | |
|             }
 | |
|             if (tmpObj._barcode !=null && tmpObj._barcode != tmpObj._Obarcode)
 | |
|             {
 | |
|                 updateFields +="BARCODE  = @BARCODE," ; 
 | |
|             }
 | |
|             if (tmpObj._expiryDays !=null && tmpObj._expiryDays != tmpObj._OexpiryDays)
 | |
|             {
 | |
|                 updateFields +="EXPIRYDAYS  = @EXPIRYDAYS," ; 
 | |
|             }
 | |
|              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))  ;
 | |
|                           oraCmd.Parameters.AddWithValue("@CANSEEDOUT",  VerifyDbnull(tmpObj._canSeedOut))  ;
 | |
|                           oraCmd.Parameters.AddWithValue("@CANZHITONG",  VerifyDbnull(tmpObj._canZhitong))  ;
 | |
|                           oraCmd.Parameters.AddWithValue("@OPERATER",  VerifyDbnull(tmpObj._operater))  ;
 | |
|                           oraCmd.Parameters.AddWithValue("@MINOPERATEUNIT",  VerifyDbnull(tmpObj._minOperateUnit))  ;
 | |
|                           oraCmd.Parameters.AddWithValue("@MINOPERATECOUNT",  VerifyDbnull(tmpObj._minOperateCount))  ;
 | |
|                           oraCmd.Parameters.AddWithValue("@BARCODE",  VerifyDbnull(tmpObj._barcode))  ;
 | |
|                           oraCmd.Parameters.AddWithValue("@EXPIRYDAYS",  VerifyDbnull(tmpObj._expiryDays))  ;
 | |
|                          // 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))  ;
 | |
|                        if(tmpObj._canSeedOut!=null)
 | |
|                        oraCmd.Parameters.AddWithValue("@CANSEEDOUT",  VerifyDbnull(tmpObj._canSeedOut))  ;
 | |
|                        if(tmpObj._canZhitong!=null)
 | |
|                        oraCmd.Parameters.AddWithValue("@CANZHITONG",  VerifyDbnull(tmpObj._canZhitong))  ;
 | |
|                        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))  ;
 | |
|                        if(tmpObj._barcode!=null)
 | |
|                        oraCmd.Parameters.AddWithValue("@BARCODE",  VerifyDbnull(tmpObj._barcode))  ;
 | |
|                        if(tmpObj._expiryDays!=null)
 | |
|                        oraCmd.Parameters.AddWithValue("@EXPIRYDAYS",  VerifyDbnull(tmpObj._expiryDays))  ;
 | |
|                 return;
 | |
| 
 | |
| 			}
 | |
| 	             
 | |
| 			} 
 | |
|             
 | |
|         protected override enumDbInstance instance
 | |
|         {
 | |
|             get
 | |
|             {
 | |
|              
 | |
|                 return enumDbInstance.wms;
 | |
|             }
 | |
|         }    
 | |
|             
 | |
| 	}
 | |
| 	#endregion
 | |
| }
 | |
|    |