示例#1
0
        public ActionResult Edit(ListItemLocal itemDetail)
        {
            var relativePath = ConfigurationManager.AppSettings["saveImagesIn"];

            if (itemDetail.Logo != null)
            {
                Functions.SaveFile(itemDetail.Logo, relativePath, Server.MapPath(relativePath), itemDetail.Id + "_Logo");
            }
            if (itemDetail.Background != null)
            {
                Functions.SaveFile(itemDetail.Background, relativePath, Server.MapPath(relativePath), itemDetail.Id + "_Background");
            }
            itemDetail.Id = ListService.Edit(itemDetail);
            var cats = ListService.GetCategories(true);

            ViewBag.Type = new SelectList(cats, "CatId", "Name", itemDetail.Id);
            return(RedirectToAction("view"));
        }