Exemple #1
0
        public async Task <IActionResult> Details(string id)
        {
            var languageId = HttpContext.Session.GetString(SystemConstants.AppSettings.DefaultLanguageId);
            var result     = await _orderApiClient.GetById(id);

            return(View(result));
        }
Exemple #2
0
        public async Task <IActionResult> Detail(int orderId)
        {
            var result = await _orderApiClient.GetById(orderId, GetLanguageId());

            if (result.IsSuccessed)
            {
                return(View(result.ResultObj));
            }
            return(RedirectToAction("Error", "Home"));
        }
        public async Task <IActionResult> Edit(int id)
        {
            var result = await _orderApiClient.GetById(id);

            var Request = new OrderUpdateRequest()
            {
                Id      = id,
                Address = result.Address,
                mail    = result.mail,
                name    = result.name,
                Phone   = result.Phone,
                Status  = result.Status
            };

            return(View(Request));
        }
Exemple #4
0
        public async Task <IActionResult> Detail(int id)
        {
            var result = await _orderApiClient.GetById(id);

            if (!result.IsSuccess || result.ResultObject == null)
            {
                TempData["error"] = result.Message;
                return(RedirectToAction("Index"));
            }
            if (TempData["result"] != null)
            {
                ViewBag.SuccessMsg = TempData["result"];
            }
            if (TempData["error"] != null)
            {
                ViewBag.ErrorMsg = TempData["error"];
            }
            return(View(result.ResultObject));
        }