public ActionResult GetAllCompany()
        {
            var result = _companyDomain.GetAllCompany();

            if (result.IsError)
            {
                return(Json(new { result.WarningMessage }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { result }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public HttpResponseMessage GetAllCompany()
        {
            var result = _companyDomain.GetAllCompany();

            return(Request.CreateResponse(HttpStatusCode.OK, result));
        }
        public ActionResult GetAllCompany()
        {
            var companys = _companyDomain.GetAllCompany();

            return(Json(new { result = companys }, JsonRequestBehavior.AllowGet));
        }