Пример #1
0
        public ActionResult Edit(string maTH, string type = null)
        {
            if (Session["URL"] == null)
            {
                Session["URL"] = HttpContext.Request.UrlReferrer.AbsoluteUri.ToString();
                ViewBag.URL    = Session["URL"];
            }
            else
            {
                ViewBag.URL = Session["URL"];
            }

            if (type == "success")
            {
                TempData["Alert-Message"] = "Chỉnh sửa sản phẩm thành công";
                TempData["AlertType"]     = "alert-success";
            }
            else
            {
                if (type == "fail")
                {
                    TempData["Alert-Message"] = "Chỉnh sửa sản phẩm thất bại";
                    TempData["AlertType"]     = "alert-danger";
                }
            }
            var brand = new BrandModel();

            ViewBag.Brand = brand.infoBrand(maTH);
            return(View());
        }