コード例 #1
0
        public ActionResult InformacionCuenta(Int32 IdCustomer, Int32 IdAccount)
        {
            CustomerAccountData model = new CustomerAccountData();

            if (IdCustomer > 0 && IdAccount > 0)
            {
                model = GetCustomerAccountData(IdCustomer, IdAccount).FirstOrDefault();
            }

            return(View(model));
        }
コード例 #2
0
        public ActionResult InformacionCuenta(CustomerAccountData model)
        {
            if (model != null && ModelState.IsValid)
            {
                IRestResponse WSR = Task.Run(() => apiClient.postObject("Cliente/Cuentas/ActualizarInformacion", model)).Result;
                if (WSR.StatusCode != HttpStatusCode.OK)
                {
                    ModelState.AddModelError("errorGeneral", JObject.Parse(WSR.Content).ToObject <Error>().Message.ToString());
                }

                if (ModelState.IsValid)
                {
                    ViewBag.Success = true;
                }

                return(View(model));
            }
            else
            {
                return(View(model));
            }
        }