public ActionResult AddComment(string fileName, string comment) { var fotoService = new AlbumFotoService(); fotoService.AddComment(fileName, comment); return(View("Index", fotoService.GetPoze())); }
public ActionResult AddComment(string user, string comment, string img) { var service = new AlbumFotoService(); if (comment != "" && img != "" && user != "") { service.AddComment(user, comment, img); } return(View("Index", service.GetPoze())); }
public ActionResult AddComments() { var service = new AlbumFotoService(); string User = Request["User"].ToString(); string Comment = Request["Comment"].ToString(); string pic_name = Request["picName"].ToString(); if (!string.IsNullOrEmpty(User) && !string.IsNullOrEmpty(Comment)) { service.AddComment(User, Comment, pic_name); } return(View("Index", service.GetPoze())); }
public ActionResult AddComment() { var service = new AlbumFotoService(); var userName = Request["UserName"].ToString(); var text = Request["Comment"].ToString(); var description = Request["picName"].ToString(); if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(text)) { service.AddComment(userName, text, description); } return(View("Index", service.GetPoze())); }
public ActionResult AddComments() { try { var service = new AlbumFotoService(); string userName = Request["txtUserName"].ToString(); string comment = Request["txtComment"].ToString(); string pictureName = Request["picName"].ToString(); if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(comment)) { service.AddComment(userName, comment, pictureName); } return(View("Index", service.GetPoze())); } catch { return(RedirectToAction("Index")); } }