64 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			64 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
|  | using System; | ||
|  | using System.Collections; | ||
|  | using DeiNiu.wms.Data.Model; | ||
|  | using System.Data; | ||
|  | namespace DeiNiu.wms.Logical | ||
|  | { | ||
|  |     [Serializable] | ||
|  |     public class LRole | ||
|  |     { | ||
|  | 		Role _obj; | ||
|  | 
 | ||
|  | 
 | ||
|  |         public LRole() | ||
|  |         { | ||
|  |             | ||
|  |             Initialize(); | ||
|  |         } | ||
|  | 
 | ||
|  |         public Role GetRole | ||
|  |         { | ||
|  |             get | ||
|  |             { | ||
|  |                 return _obj; | ||
|  |             } | ||
|  |         } | ||
|  | 		 | ||
|  | 		/// <summary> | ||
|  | 		/// get all data | ||
|  | 		/// </summary> | ||
|  |         public DataSet GetAllData() | ||
|  |         { | ||
|  |            return _obj.Query(); | ||
|  |         } | ||
|  | 
 | ||
|  |         /// <summary> | ||
|  |         /// get all data | ||
|  |         /// </summary> | ||
|  |         public DataSet GetAllActiveData() | ||
|  |         { | ||
|  |             return _obj.QueryActived(); | ||
|  |         } | ||
|  | 
 | ||
|  | 
 | ||
|  | 		/// <summary> | ||
|  | 		/// get a record by id | ||
|  | 		/// </summary> | ||
|  |         public void Initialize(int id) | ||
|  | 		{ | ||
|  |             _obj = id != 0 ? new Role(id) : new Role(); | ||
|  | 		} | ||
|  | 
 | ||
|  |         /// <summary> | ||
|  | 		/// get a record by id 0 | ||
|  | 		/// </summary> | ||
|  |         public void Initialize() | ||
|  |         { | ||
|  |             Initialize(0); | ||
|  |         } | ||
|  | 
 | ||
|  |     } | ||
|  | 
 | ||
|  |     | ||
|  | } |