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; } } /// /// get all data /// public DataSet GetAllData() { return _obj.Query(); } /// /// get all data /// public DataTable GetAllActiveData() { DataTable dt = _obj.QuerywithMaster(); dt.Columns.Add("typeName"); return dt; // return _obj.QueryActived(); } /* private void leavetypeDsConstruct() { return; } */ /// /// get a record by id /// public void Initialize(int id) { _obj = id != 0 ? new Department(id) : new Department(); } /// /// get a record by id 0 /// 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.²Ö¿â); } } }