public EntityObject_MCE_D_TYPE_DEPT Load(IDbTransaction transaction, string id, out EntityObject_COM_DEPART dept_id, out EntityObject_MCE_D_MCE_TYPE mce_type_id) { if (LocalMode) { EntityObject_MCE_D_TYPE_DEPT obj = new EntityObject_MCE_D_TYPE_DEPT(); //平台自动生成代码 dept_id = new EntityObject_COM_DEPART(); mce_type_id = new EntityObject_MCE_D_MCE_TYPE(); obj.ID = id; obj = HelperObject_MCE_D_TYPE_DEPT.Get(obj, transaction); if (!string.IsNullOrEmpty(obj.DEPT_ID)) { dept_id.ID = obj.DEPT_ID; dept_id = HelperObject_COM_DEPART.Get(dept_id, transaction); } if (!string.IsNullOrEmpty(obj.MCE_TYPE_ID)) { mce_type_id.ID = obj.MCE_TYPE_ID; mce_type_id = HelperObject_MCE_D_MCE_TYPE.Get(mce_type_id, transaction); } return(obj); } else { throw new InvalidConstraintException(); } }
public DisplayObject_MCE_D_TYPE_DEPT Get(DisplayObject_MCE_D_TYPE_DEPT obj) { if (LocalMode) { //平台自动生成代码 return(HelperObject_MCE_D_TYPE_DEPT.Get(obj)); } else { using (ServiceManager <ServiceContract_MCE_D_TYPE_DEPT> smgr = new ServiceManager <ServiceContract_MCE_D_TYPE_DEPT>(ServiceUri)) { return(smgr.Service.Get(obj)); } } }