public List <Ld_Institution_Department> GetDepartmentPagingPro(int systemId, string companyId, int pageId, int pageSize, out int rowCount) { try { int errCode = -1; string errMsg = "fail"; var result = LdCmsDbEntitiesContext.SP_Get_Institution_DepartmentPaging(systemId, companyId, pageId, pageSize, out errCode, out errMsg, out rowCount); 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); } }