public IDeptMasterDA GetDeptMasterDA() { IDeptMasterDA iDeptMasterDA = null; if (this._dataBaseType == DataBaseType.Access) { iDeptMasterDA = new MD.DAL.AccessDAL.Master.DeptMasterDA(); } if (this._dataBaseType == DataBaseType.SqlServer) { iDeptMasterDA = new DAL.SqlDAL.Master.DeptMasterDA(); } return(iDeptMasterDA); }
/// <summary> /// 获得部门数据数组 /// </summary> /// <returns></returns> public DeptMasterInfo[] GetDeptMasterDatas() { DeptMasterInfo[] deptMasterInfos = null; List <DeptMasterInfo> deptMasterInfoList = null; IDeptMasterDA iDeptMasterDA = MasterDAFactory.Instance.GetDeptMasterDA(); try { deptMasterInfoList = iDeptMasterDA.GetAllRecord(); } catch (Exception Ex) { throw Ex; } if (deptMasterInfoList != null) { deptMasterInfos = deptMasterInfoList.ToArray(); } return(deptMasterInfos); }
public DeptMaster() { this._deptMasterDA = MasterDAFactory.Instance.GetDeptMasterDA(); }