Пример #1
0
 public void SaveImage(ImageUnload image)
 {
     Racoonogram.Models.Image imEdit = GetImage(image.Id);
     imEdit.Category = image.Category.ToLower();
     imEdit.KeyWords = image.KeyWords.ToLower();
     if (!String.IsNullOrEmpty(image.Description))
     {
         imEdit.Description = image.Description.Substring(0, 1).ToUpper() + image.Description.Substring(1);
     }
     if (!String.IsNullOrEmpty(image.Colors))
     {
         imEdit.Colors = image.Colors.ToLower();
     }
     imEdit.Price = image.Price;
     db.SaveChanges();
 }
Пример #2
0
 public ActionResult SaveImageChanges(ImageUnload image)
 {
     new ImageService().SaveImage(image);
     return(RedirectToAction("Index"));
 }