Exemplo n.º 1
0
        public ActionResult ConnectionDetails(int ID)
        {
            Connection conn = screenShareManager.GetConnection(ID);

            if ((Session["Student"] as Student).User.ID == conn.SharerID || (Session["Student"] as Student).User.ID == conn.ViewerID)
            {
                TempData["Unauthorized"] = true;
            }
            ConnectionDetailsFormData cdfd = new ConnectionDetailsFormData();

            cdfd.Connection = conn;

            foreach (var review in cdfd.Connection.Reviews)
            {
                ProfilePhotoFormData ppfd = new ProfilePhotoFormData();

                ppfd.ID          = review.Sender.ID;
                ppfd.Base64Image = "data:image/png;base64," + review.Sender.ProfilePhoto;

                cdfd.ProfilePhotoFormDatas.Add(ppfd);
            }
            return(View(cdfd));
        }