Ejemplo n.º 1
0
 public List <Ld_Institution_Company> GetCompanyTop(int systemId, int count)
 {
     try
     {
         if (systemId == 0)
         {
             throw new Exception("系统编号不能为0!");
         }
         if (count == 0)
         {
             count = 1;
         }
         int    errCode = -1;
         string errMsg  = "fail";
         var    result  = LdCmsDbEntitiesContext.SP_Get_Institution_CompanyTop(systemId, count, out errCode, out errMsg);
         if (errCode != 0)
         {
             throw new Exception(errMsg);
         }
         if (result == null)
         {
             return(null);
         }
         else
         {
             return(result.ToObject <List <Ld_Institution_Company> >());
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }