Ejemplo n.º 1
0
 public ActionResult Edit(int id)
 {
     IProfileDAC dac = new ProfileDAC();
     var profile = dac.GetProfile(id);
     var model = new ProfileEdit { ProfileID = profile.ProfileID, Name = profile.Name, ProfileText = profile.ProfileText, SortOrder = profile.SortOrder };
     return View(model);
 }
Ejemplo n.º 2
0
 public ActionResult AddImage(HttpPostedFileBase file, int profileID)
 {
     if (file != null)
     {
         IProfileDAC dac = new ProfileDAC();
         var profile = dac.GetProfile(profileID);
         string path = System.IO.Path.Combine(Server.MapPath("~/SiteContent/Images/Band/"), profile.ImageName);
         file.SaveAs(path);
     }
     // after successfully uploading redirect the user
     return RedirectToAction("Index");
 }