90 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			90 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C#
		
	
	
	
|  |  | |||
|  | /// <summary> | |||
|  | ///INTERFACE CLASS FOR TABLE t_Department | |||
|  | ///By wm with codesmith.  | |||
|  | ///on 04/18/2017 | |||
|  | /// </summary> | |||
|  | 
 | |||
|  | using System; | |||
|  | using System.Collections.Generic; | |||
|  | using System.Linq; | |||
|  | using System.Text; | |||
|  | using System.Data; | |||
|  | using System.Collections; | |||
|  | namespace DeiNiu.wms.Data.Model | |||
|  | { | |||
|  |     [Serializable] | |||
|  |     public class Department : Department_base | |||
|  |     { | |||
|  |         public Department() | |||
|  |         { | |||
|  | 
 | |||
|  |         } | |||
|  | 
 | |||
|  |         public Department(int id): base(id) | |||
|  |         { | |||
|  | 
 | |||
|  |         } | |||
|  |         protected override void getImp() | |||
|  |         { | |||
|  |             model_imp = new Department_Imp(); | |||
|  | 
 | |||
|  |         } | |||
|  |         //begin cust db operation, query, excute sql etc. | |||
|  |         public DataSet QueryByName() | |||
|  |         { | |||
|  |             return  CustQuery(100); | |||
|  |         } | |||
|  |         public int UpdateByDept() | |||
|  |         { | |||
|  |             return CustOper(200); | |||
|  |         } | |||
|  |         public DataTable QueryValidDepartment() | |||
|  |         { | |||
|  |             return CustQuery(300).Tables[0]; | |||
|  |         } | |||
|  |         public DataTable QueryMembers() | |||
|  |         { | |||
|  |             return CustQuery(400).Tables[0]; | |||
|  |         } | |||
|  |         /// <summary> | |||
|  |         /// query departments and manager | |||
|  |         /// </summary> | |||
|  |         /// <returns></returns> | |||
|  | 
 | |||
|  |         public DataTable QuerywithMaster() | |||
|  |         { | |||
|  |             return CustQuery(500).Tables[0]; | |||
|  |         } | |||
|  | 
 | |||
|  |         public ArrayList QueryDepts(int managerId) | |||
|  |         { | |||
|  |             cmdParameters[0] = managerId; | |||
|  |             ArrayList al = new ArrayList(); | |||
|  |             DataTable dt = CustQuery(600).Tables[0]; | |||
|  |             foreach (DataRow dr in dt.Rows) | |||
|  |             { | |||
|  |                 al.Add(dr["ID"].ToString().ToUpper().Trim()); | |||
|  |             } | |||
|  | 
 | |||
|  |             return al; | |||
|  |         } | |||
|  |         public new void Delete() | |||
|  |         { | |||
|  |             base.Delete(); | |||
|  |             DeptEmp  de = new DeptEmp (); | |||
|  |             de.DeleteByDept(Convert.ToInt32(_id)); | |||
|  |         } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  |         public DataTable getDepts(string mgrAddress,Utils.enumDepartmentType enumDepartmentType) | |||
|  |         { | |||
|  |             cmdParameters[0] = mgrAddress; | |||
|  |             cmdParameters[1] =(int)  enumDepartmentType; | |||
|  |             return CustQuery(700).Tables[0]; | |||
|  | 
 | |||
|  |         } | |||
|  |     } | |||
|  | } | |||
|  |   |