public ActionResult IncarcaComment() { var service = new AlbumFotoService(); var poza = Request["Picture"].ToString(); var commNou = Request["ComentariuPozaNou"].ToString(); service.IncarcaComentariu("adminUser", poza, commNou); return(View("Index", service.GetPoze())); }
public ActionResult PostComment() { var service = new AlbumFotoService(); var by = Request["By"].ToString(); var poza = Request["Picture"].ToString(); if (Request["Comentariu"].ToString().Length > 0 && Request["Comentariu"].ToString() != null) { var txtComm = Request["Comentariu"].ToString(); txtComm = poza + "#%#" + txtComm; MemoryStream stream = new MemoryStream(); StreamWriter writer = new StreamWriter(stream); writer.Write(by + ": " + txtComm); writer.Flush(); stream.Position = 0; service.IncarcaComentariu("guest", txtComm, by, stream); } return(View("Index", service.GetPoze())); }