public List <Ld_Institution_Department> GetDepartmentByNodePathPro(int systemId, string companyId, string departmentId, string state) { try { int errCode = -1; string errMsg = "fail"; var result = LdCmsDbEntitiesContext.SP_Get_Institution_DepartmentByNodePath(systemId, companyId, departmentId, 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); } }