예제 #1
0
        public ActionResult CreateBrand_Post()
        {
            Session["ControllerName"] = "Create Brand";
            if (Session["loginDetails"] != null)
            {
                if (ModelState.IsValid)
                {
                    Brand brand = new Brand();
                    TryUpdateModel<Brand>(brand);

                    ProductAdminBLL bll = new ProductAdminBLL();
                    int res = bll.InsertBrand(brand);
                    if (res > 0)
                    {
                       return RedirectToAction("Brand");
                    }

                }

                return View();

                
            }
            else
            {
                return RedirectToAction("Error");
            }
        }