Esempio n. 1
0
 public ActionResult Edit(Models.BannerAdd.BannerAddUploadModel model)
 {
     if (model.UploadFile != null)
     {
         string fileName = Guid.NewGuid().ToString() + Path.GetExtension(model.UploadFile.FileName);
         model.FileName = fileName;
         SaveFileToServer(model.UploadFile, fileName);
     }
     bannerModel.Edit(model);
     return(RedirectToAction("Index"));
     //return View(model);
 }
Esempio n. 2
0
 // GET: Admin/BannerAdds/Edit
 public ActionResult Edit(int id)
 {
     Data.BannerAdd add =
         bannerModel.Get(id);
     Models.BannerAdd.BannerAddUploadModel model =
         new Models.BannerAdd.BannerAddUploadModel()
     {
         Name          = add.Name,
         Id            = add.Id,
         FileName      = add.FileName,
         RotationEnd   = add.RotationEnd,
         RotationStart = add.RotationStart
     };
     return(View(model));
 }
 // GET: Admin/BannerAdds/Edit
 public ActionResult Edit(int id)
 {
     Data.BannerAdd add =
         bannerModel.Get(id);
     Models.BannerAdd.BannerAddUploadModel model =
         new Models.BannerAdd.BannerAddUploadModel()
         {
             Name = add.Name,
             Id = add.Id,
             FileName = add.FileName,
             RotationEnd = add.RotationEnd,
             RotationStart = add.RotationStart
         };
     return View(model);
 }
 // GET: Admin/BannerAdds/Create
 /// <summary>
 /// Creates this instance.
 /// </summary>
 /// <returns></returns>
 public ActionResult Create()
 {
     Models.BannerAdd.BannerAddUploadModel model =
         new Models.BannerAdd.BannerAddUploadModel();
     return View(model);
 }
Esempio n. 5
0
 // GET: Admin/BannerAdds/Create
 /// <summary>
 /// Creates this instance.
 /// </summary>
 /// <returns></returns>
 public ActionResult Create()
 {
     Models.BannerAdd.BannerAddUploadModel model =
         new Models.BannerAdd.BannerAddUploadModel();
     return(View(model));
 }