Ejemplo n.º 1
0
        public IHttpActionResult GetOtherCompanies(string id)
        {
            ResultEntity         result    = new ResultEntity();
            List <CompanyEntity> companies = new List <CompanyEntity>();

            try
            {
                companies = dal.FindOtherComapnies(new Guid(id)).ToList <COMPANY>().ConvertAll <CompanyEntity>(c => c.ToCompanyEntity());
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                NtripProxyLogger.LogExceptionIntoFile("调用接口api/Company/GetOtherCompanies异常,异常信息为:" + e.Message);
            }
            result.IsSuccess = result.Message == null;
            result.Data      = companies;
            return(Json <ResultEntity>(result));
        }