103 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			103 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C#
		
	
	
	
|  |  | |||
|  | /// <summary> | |||
|  | ///INTERFACE CLASS FOR TABLE t_wmsStockRecord | |||
|  | ///By wm with codesmith.  | |||
|  | ///on 05/14/2017 | |||
|  | /// </summary> | |||
|  | 
 | |||
|  | using System; | |||
|  | using System.Collections.Generic; | |||
|  | using System.Linq; | |||
|  | using System.Text; | |||
|  | using System.Data; | |||
|  | using DeiNiu.Utils; | |||
|  | 
 | |||
|  | namespace DeiNiu.wms.Data.Model | |||
|  | { | |||
|  |     [Serializable] | |||
|  |     public class WmsStockRecord : WmsStockRecord_base | |||
|  |     { | |||
|  |         public WmsStockRecord() | |||
|  |         { | |||
|  | 
 | |||
|  |         } | |||
|  | 
 | |||
|  |         public WmsStockRecord(int id): base(id) | |||
|  |         { | |||
|  | 
 | |||
|  |         } | |||
|  |          public WmsStockRecord(DataRow dr): base(dr) | |||
|  |         { | |||
|  | 
 | |||
|  |         } | |||
|  |          protected override void getImp() | |||
|  |          { | |||
|  |              model_imp = new WmsStockRecord_Imp(); | |||
|  | 
 | |||
|  |          } | |||
|  |         | |||
|  |         //begin cust db operation, query, excute sql etc. | |||
|  |         public DataSet QueryByName(string name) | |||
|  |         { | |||
|  |             cmdParameters[0] = name; | |||
|  |             return  CustQuery(100); | |||
|  |         } | |||
|  | 
 | |||
|  |         public new  int Add() | |||
|  |         { | |||
|  |             base.Add(); | |||
|  |             this.id128 =   Util.getCode128(ID+""); | |||
|  |             Update(); | |||
|  |             return ID; | |||
|  |         } | |||
|  | 
 | |||
|  |       /// <summary> | |||
|  |         /// 查询拣货单出库明细 | |||
|  |         /// isShowAllVolType = false 时取volType | |||
|  |       /// </summary> | |||
|  |       /// <param name="pickOrderNo">拣货单</param> | |||
|  |       /// <param name="isShowAllVolType">默认查询整零</param> | |||
|  |       /// <param name="volType">需要查询的类型</param> | |||
|  |       /// <returns></returns> | |||
|  |         public DataSet getPickStockRecods(string pickOrderNo, bool isShowAllVolType = true, enumWhLocVol volType = enumWhLocVol.零库) | |||
|  |         { | |||
|  |             cmdParameters[0] = pickOrderNo; | |||
|  |             cmdParameters[1] = isShowAllVolType; | |||
|  |             cmdParameters[2] =(int)volType; | |||
|  |             return CustQuery(200); | |||
|  |         } | |||
|  | 
 | |||
|  |         List<WmsStockRecord> getStockRecodObjects(string orderNo,bool isShowAllVolType = true,enumWhLocVol volType = enumWhLocVol.零库) | |||
|  |         { | |||
|  |             List<WmsStockRecord> lst = new List<WmsStockRecord>(); | |||
|  |             DataTable dt = getPickStockRecods(orderNo, isShowAllVolType, volType).Tables[0]; | |||
|  |             foreach (DataRow dr in dt.Rows) | |||
|  |             { | |||
|  |                 lst.Add(new WmsStockRecord(dr)); | |||
|  |             } | |||
|  | 
 | |||
|  |             return lst; | |||
|  |         } | |||
|  |           | |||
|  |         private Wmslocation _location; | |||
|  | 
 | |||
|  |         public Wmslocation location | |||
|  |         { | |||
|  |             get | |||
|  |             { | |||
|  | 
 | |||
|  |                 if (_location == null || _location.locationId != _locationId) | |||
|  |                 { | |||
|  |                     _location = new Wmslocation(locationId); | |||
|  |                 } | |||
|  |                 return _location; | |||
|  | 
 | |||
|  |             } | |||
|  | 
 | |||
|  |         } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  |     } | |||
|  | } | |||
|  |   |