public ActionResult GetCompanyUsersByCompanyId(int companyId)
 {
     using (var client = new UserAccountClient())
     {
         var serviceResult = client.GetCompanyUsersByCompanyId(companyId);
         serviceResult.ThrowIfException(true);
         var companyUsers = serviceResult.Result;
         return(Json(companyUsers, JsonRequestBehavior.AllowGet));
     }
 }
        public static IEnumerable <SYS_CompanyUser> GetCompanyUsersByCompanyId(int companyId)
        {
            IEnumerable <SYS_CompanyUser> result = null;

            using (var client = new UserAccountClient())
            {
                var serviceResult = client.GetCompanyUsersByCompanyId(companyId);
                serviceResult.ThrowIfException(true);
                result = serviceResult.Result;
                return(result);
            }
        }