Exemple #1
0
        public ActionResult GetComment()
        {
            var service = new AlbumFotoService();
            var poza    = Request["Picture"].ToString();

            return(View("Comments", service.GetComentarii(poza)));
        }
Exemple #2
0
        public ActionResult AddComment(string fileName, string comment)
        {
            var fotoService = new AlbumFotoService();

            fotoService.AddComment(fileName, comment);
            return(View("Index", fotoService.GetPoze()));
        }
Exemple #3
0
        public ActionResult VizualizareComm()
        {
            var service = new AlbumFotoService();
            var poza    = Request["Picture"].ToString();

            return(View("Index", service.GetComm(poza)));
        }
Exemple #4
0
        public ActionResult ViewComments()
        {
            var service = new AlbumFotoService();
            var poza    = Request["picName"].ToString();

            return(View(service.GetComment(poza)));
        }
Exemple #5
0
        public ActionResult GetLink()
        {
            var service = new AlbumFotoService();
            var poza    = Request["Picture"].ToString();

            return(View("Link", service.GetLink(poza)));
        }
Exemple #6
0
        public ActionResult GetLink(string pic_name)
        {
            var    service = new AlbumFotoService();
            string link    = service.GetLink(pic_name);

            ViewData["LINK"] = link;
            return(View());
        }
        public ActionResult GetLink(Poza poza)
        {
            var service = new AlbumFotoService();

            ViewBag.Link = AlbumFotoService.GetBlobSasUri(service.PhotoContainer, poza.Description);

            return(View("Index", service.GetPoze()));
        }
Exemple #8
0
        public ActionResult PrimesteLinkAcces()
        {
            var service = new AlbumFotoService();
            var poza    = Request["Picture"].ToString();

            service.GetLinkTemporar(poza);
            return(View("Index", service.GetPoze()));
        }
Exemple #9
0
        public ActionResult GetLink()
        {
            var    service = new AlbumFotoService();
            var    poza    = Request["picName"].ToString();
            string link    = service.GetLink(poza);

            ViewData["LINK"] = link;
            return(View());
        }
Exemple #10
0
        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()));
        }
Exemple #11
0
        public ActionResult IntroduComm(string comentariu, string poza)
        {
            var service = new AlbumFotoService();

            if (!(string.IsNullOrEmpty(comentariu)) && !(string.IsNullOrEmpty(poza)))
            {
                service.IntroduComm(Guid.NewGuid().ToString(), poza, comentariu);
            }
            return(View("Index", service.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()));
        }
Exemple #13
0
        public ActionResult PostComment(string name, string comment, string user)
        {
            var service = new AlbumFotoService();

            if (comment != null && user != null)
            {
                service.ComentOnPicture(name, Guid.NewGuid().ToString(), comment, user);
            }
            return(RedirectToAction("Index"));
        }
Exemple #14
0
        public ActionResult IncarcaPoza(HttpPostedFileBase file)
        {
            var service = new AlbumFotoService();

            if (file != null && file.ContentLength > 0)
            {
                service.IncarcaPoza("guest", file.FileName, file.InputStream);
            }
            return(View("Index", service.GetPoze()));
        }
        public ActionResult AdaugaComentariu(string text, string poza)
        {
            var service = new AlbumFotoService();

            if (text != null && text.Length > 0)
            {
                service.AdaugaComentariu("guest", poza, text);
            }

            return(View("Index", service.GetPoze()));
        }
        public ActionResult AdaugaComentariu(string Text1, string poza, string madeBy)
        {
            var service = new AlbumFotoService();

            if (Text1 != null && poza != null)
            {
                service.AdaugaComentariu(madeBy != "" ? madeBy : "guest", Text1, poza);
            }

            return(View("Index", service.GetPoze()));
        }
        public ActionResult AdaugaComentariu(string user, string image, string comment)
        {
            var service = new AlbumFotoService();

            if (string.IsNullOrEmpty(user) == false && string.IsNullOrEmpty(image) == false && string.IsNullOrEmpty(comment) == false)
            {
                service.AdaugaComentariu(user, image, comment);
            }

            return(View("Index", service.GetPoze()));
        }
Exemple #18
0
 public ActionResult ViewComments(string pictureName)
 {
     try
     {
         var service = new AlbumFotoService();
         return(View(service.GetComments(pictureName)));
     }
     catch
     {
         return(RedirectToAction("Index"));
     }
 }
Exemple #19
0
        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()));
        }
Exemple #20
0
        public ActionResult AdaugaComentariu()
        {
            var textBox = Request["comment_textBox"].ToString();
            var service = new AlbumFotoService();
            var picture = Request["nume_poza"].ToString();
            var madeBy  = Request["madeBy"].ToString();

            if (textBox.Length != 0)
            {
                service.AdaugaComentariu(textBox, picture, madeBy);
            }
            return(View("Index", service.GetPoze()));
        }
Exemple #21
0
        public ActionResult AddComments()
        {
            var    service    = new AlbumFotoService();
            string User       = Request["User"].ToString();
            string Comentariu = Request["Comment"].ToString();
            string Nume_poza  = Request["picture_name"].ToString();

            if (!string.IsNullOrEmpty(User) && !string.IsNullOrEmpty(Comentariu))
            {
                service.AdaugaComentariu(User, Comentariu, Nume_poza);
            }

            return(View("Index", service.GetPoze()));
        }
Exemple #22
0
        public ActionResult Picture(long key, string fileName)
        {
            var fotoService = new AlbumFotoService();
            var poze        = fotoService.GetPoze();
            var poza        = poze.FirstOrDefault(p => p.Poza.Description == fileName);
            var url         = poza.Poza.Url;
            var secureUrl   = BlobHandler.GetBlobSasUri(url, fileName);
            var encodedUrl  = BlobHandler.Base64Encode(secureUrl);

            return(View("PozaIndiv", new Poza()
            {
                Url = secureUrl
            }));
        }
Exemple #23
0
        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()));
        }
Exemple #24
0
 public ActionResult GetLink(string pictureName)
 {
     try
     {
         var    service = new AlbumFotoService();
         string link    = service.GetLink(pictureName);
         ViewData["LINK"] = link;
         return(View());
     }
     catch
     {
         return(RedirectToAction("Index"));
     }
 }
Exemple #25
0
        public ActionResult AddComment()
        {
            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 comment = Request["Comentariu"].ToString();
                comment = poza + "@@@" + comment;
                MemoryStream stream = new MemoryStream();
                StreamWriter writer = new StreamWriter(stream);
                writer.Write(by + ": " + comment);
                writer.Flush();
                stream.Position = 0;
                service.UploadComment("guest", comment, by, stream);
            }
            return(View("Index", service.GetPoze()));
        }
Exemple #26
0
        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()));
        }
Exemple #27
0
 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"));
     }
 }
Exemple #28
0
        public ActionResult ViewComments(string picture_name)
        {
            var foto_service = new AlbumFotoService();

            return(View(foto_service.GetComments(picture_name)));
        }
Exemple #29
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            var service = new AlbumFotoService();

            return(View(service.GetPoze()));
        }
        public ActionResult ViewComments(string img)
        {
            var service = new AlbumFotoService();

            return(View("ViewComments", service.ViewComments(img)));
        }