public List <Ld_Institution_Department> GetDepartmentByParentIdPro(int systemId, string companyId, string parentId, string state) { try { int errCode = -1; string errMsg = "fail"; var result = LdCmsDbEntitiesContext.SP_Get_Institution_DepartmentByParentId(systemId, companyId, parentId, state, out errCode, out errMsg); if (errCode != 0) { throw new Exception(errMsg); } if (result == null) { return(null); } else { return(result.ToObject <List <Ld_Institution_Department> >()); } } catch (Exception ex) { throw new Exception(ex.Message); } }