90 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			90 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
|  | using System; | |||
|  | using DeiNiu.wms.Data.Model; | |||
|  | using System.Data; | |||
|  | using DeiNiu.Utils; | |||
|  | namespace DeiNiu.wms.Logical | |||
|  | { | |||
|  |     [Serializable] | |||
|  |     public class LDepartment | |||
|  |     { | |||
|  | 		Department _obj; | |||
|  | 		 | |||
|  |        | |||
|  | 		public LDepartment() | |||
|  |         { | |||
|  |             | |||
|  |             Initialize(); | |||
|  |         } | |||
|  |         public LDepartment(int depId) | |||
|  |         { | |||
|  | 
 | |||
|  |             Initialize(depId); | |||
|  |         } | |||
|  |          | |||
|  |         public Department GetDepartment | |||
|  |         { | |||
|  |             get | |||
|  |             { | |||
|  |                 return _obj; | |||
|  |             } | |||
|  |         } | |||
|  | 		 | |||
|  | 		/// <summary> | |||
|  | 		/// get all data | |||
|  | 		/// </summary> | |||
|  |         public DataSet GetAllData() | |||
|  |         { | |||
|  |            return _obj.Query(); | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// get all data | |||
|  |         /// </summary> | |||
|  |         public DataTable GetAllActiveData() | |||
|  |         { | |||
|  |             DataTable dt = | |||
|  |              _obj.QuerywithMaster(); | |||
|  |             dt.Columns.Add("typeName"); | |||
|  |             return dt; | |||
|  |         //    return _obj.QueryActived(); | |||
|  |         } | |||
|  | 
 | |||
|  | 
 | |||
|  | /* | |||
|  |         private void leavetypeDsConstruct() | |||
|  |         { | |||
|  |             return; | |||
|  |         } | |||
|  | */ | |||
|  | 		 | |||
|  | 		/// <summary> | |||
|  | 		/// get a record by id | |||
|  | 		/// </summary> | |||
|  |         public void Initialize(int id) | |||
|  | 		{ | |||
|  |             _obj = id != 0 ? new Department(id) : new Department(); | |||
|  | 		} | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  | 		/// get a record by id 0 | |||
|  | 		/// </summary> | |||
|  |         public void Initialize() | |||
|  |         { | |||
|  |             Initialize(0); | |||
|  |         } | |||
|  |         public DataTable GetEmployees() | |||
|  |         { | |||
|  |             return _obj.QueryMembers(); | |||
|  |         } | |||
|  | 
 | |||
|  |         public DataTable getWareHouse(string mgrAddress) | |||
|  |         { | |||
|  |             LogHelper.debug(typeof(LDepartment),"get whare houses by address: "+mgrAddress); | |||
|  |          return GetDepartment.getDepts( mgrAddress, enumDepartmentType.<EFBFBD>ֿ<EFBFBD>);  | |||
|  |         } | |||
|  |        | |||
|  |     } | |||
|  | 
 | |||
|  |     | |||
|  | } |