示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ((Label)Master.FindControl("lblTitle")).Text = "View Video";
        Photoid = QueryString.getQueryStringOnIndex(0);
        Userid  = SessionClass.getUserId();
        LoadFollow();
        LoadDataListComments();
        YouLikes();
        string  videotag = "";
        MediaBO objMedia = new MediaBO();

        objMedia = MediaBLL.getMediaByMediaId(Photoid);

        videotag += "  <script  type= 'text/javascript'  >";
        videotag += " jwplayer('container').setup({";
        videotag += " file: src='" + Global.USER_VIDEO + objMedia.Id + ".mp4' ,";
        videotag += " flashplayer: '../../Resources/jwplayer/player.swf',";
        videotag += " width: 520";
        videotag += " }); ";
        videotag += "</script> ";
        this.LiteralVideo.Text  = videotag;
        imgBtnComments.ImageUrl = Global.PROFILE_PICTURE + Userid + ".jpg";
        Session["SpamPhoto"]    = null;
        Session["AbusePhoto"]   = null;
    }
示例#2
0
    public string SaveAlbumPhoto()
    {
        string albumId;
        if (Session["PhotoAlbumId"] == null)
        {
            MediaAlbumBO objAClass = new MediaAlbumBO();
            objAClass.UserId = Userid;
            objAClass.Name = "My Pictures";
            objAClass.Type = Global.PHOTO;
            objAClass.isFollow = true;
            albumId = MediaAlbumBLL.insertDefaultAlbum(objAClass);

        }
        else
        {
            albumId = Session["PhotoAlbumId"].ToString();
        }
        MediaBO objClass = new MediaBO();

        objClass.UserId = Userid;

        objClass.AlbumId = albumId;
        objClass.Caption = "";
        objClass.Name = "";
        objClass.Description = "";
        objClass.AddedDate = DateTime.Now;
        objClass.Location = "";
        objClass.Type = Global.PHOTO;
        objClass.isFollow = true;
        return MediaBLL.insertMedia(objClass);
    }
示例#3
0
    public string SavePhotos()
    {
        string albumId;

        MediaAlbumBO objAClass = new MediaAlbumBO();

        objAClass.UserId   = Userid;
        objAClass.Name     = "Profile Pictures";
        objAClass.Type     = Global.PHOTO;
        objAClass.isFollow = true;
        albumId            = MediaAlbumBLL.insertDefaultAlbum(objAClass);



        MediaBO objClass = new MediaBO();

        objClass.UserId = Userid;


        objClass.AlbumId     = albumId;
        objClass.Caption     = "";
        objClass.Name        = "";
        objClass.Description = "";
        objClass.AddedDate   = DateTime.Now;
        objClass.Location    = "";
        objClass.Type        = Global.PHOTO;
        objClass.isFollow    = true;
        return(MediaBLL.insertMedia(objClass));
    }
示例#4
0
    public string SavePhotos()
    {
        string albumId;

        if (Session["PhotoAlbumId"] == null)
        {
            MediaAlbumBO objAClass = new MediaAlbumBO();
            objAClass.UserId   = userid;
            objAClass.Name     = "My Pictures";
            objAClass.Type     = Global.PHOTO;
            objAClass.isFollow = true;
            albumId            = MediaAlbumBLL.insertDefaultAlbum(objAClass);
        }
        else
        {
            albumId = Session["PhotoAlbumId"].ToString();
        }
        MediaBO objClass = new MediaBO();

        objClass.UserId = userid;


        objClass.AlbumId     = albumId;
        objClass.Caption     = "";
        objClass.Name        = "";
        objClass.Description = "";
        objClass.AddedDate   = DateTime.Now;
        objClass.Location    = "";
        objClass.Type        = Global.PHOTO;
        objClass.isFollow    = true;
        return(MediaBLL.insertMedia(objClass));
    }
示例#5
0
    public void GetPhotoDesc()
    {
        MediaBO mediaobj = new MediaBO();

        mediaobj              = MediaBLL.getMediaByMediaId(Photoid);
        LabelGetCaption.Text  = mediaobj.Caption;
        LabelGetDesc.Text     = mediaobj.Description;
        LabelGetLocation.Text = mediaobj.Location;
        imgBack.PostBackUrl   = "ViewPhotoAlbum.aspx?" + mediaobj.AlbumId;
    }
示例#6
0
        public static void updateFollow(MediaBO objClass)
        {
            MongoCollection <Media> objCollection = db.GetCollection <Media>("c_Media");

            var query  = Query.EQ("_id", ObjectId.Parse(objClass.Id));
            var sortBy = SortBy.Descending("_id");
            var update = Update.Set("isFollow", objClass.isFollow)


            ;
            var result = objCollection.FindAndModify(query, sortBy, update, true);
        }
示例#7
0
        public static void updateEditMedia(MediaBO objClass)
        {
            MongoCollection <Media> objCollection = db.GetCollection <Media>("c_Media");

            var query  = Query.EQ("_id", ObjectId.Parse(objClass.Id));
            var sortBy = SortBy.Descending("_id");
            var update = Update
                         .Set("Caption", objClass.Caption)
                         .Set("Location", objClass.Location)
                         .Set("AddedDate", objClass.AddedDate)


            ;
            var result = objCollection.FindAndModify(query, sortBy, update, true);
        }
示例#8
0
    protected void LoadFollow()
    {
        MediaBO obj = new MediaBO();

        obj      = MediaBLL.getMediaByMediaId(Photoid);
        Isfollow = obj.isFollow;
        if (Isfollow)
        {
            lbtnFollow.Text = "UnFollow";
        }

        else
        {
            lbtnFollow.Text = "Follow";
        }
    }
示例#9
0
 protected void lbtnFollow_Click(object sender, EventArgs e)
 {
     if (lbtnFollow.Text.Equals("Follow"))
     {
         MediaBO obj = new MediaBO();
         obj.Id       = Photoid;
         obj.isFollow = true;
         MediaBLL.updateFollow(obj);
     }
     else if (lbtnFollow.Text.Equals("UnFollow"))
     {
         MediaBO obj = new MediaBO();
         obj.Id       = Photoid;
         obj.isFollow = false;
         MediaBLL.updateFollow(obj);
     }
     LoadFollow();
 }
示例#10
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        TextBox captionText = new TextBox();
        TextBox locationText = new TextBox();
        TextBox despText = new TextBox();
        TextBox titleText = new TextBox();
        GMDatePicker datep = new GMDatePicker();
        string caption = null;
        string location = null;
        string desp = null;
        string title = null;
        string id = null;
        DateTime adddate;

        foreach (DataListItem dataItem in DataList1.Items)
        {

            captionText = (TextBox)dataItem.FindControl("txtCaption");
            locationText = (TextBox)dataItem.FindControl("txtLocation");
            despText = (TextBox)dataItem.FindControl("txtDescription");
            titleText = (TextBox)dataItem.FindControl("txtName");
            datep = (GMDatePicker)dataItem.FindControl("GMDatePicker1");
            caption = captionText.Text.ToString().Trim();
            location = locationText.Text.ToString().Trim();
            desp = despText.Text.ToString().Trim();
            title = titleText.Text.ToString().Trim();
            adddate = datep.Date;
            string Id = ((HiddenField)dataItem.FindControl("HiddenField1")).Value;

            MediaBO objClass = new MediaBO();
           objClass.Id = Id;
           objClass.Location = location;
           objClass.Caption = caption;
           objClass.Name = title;
           objClass.Description = desp;
           objClass.AddedDate = adddate;
           objClass.Type= Global.VIDEO;
           MediaBLL.updateEditVideoMedia(objClass);

        }

        LoadDataListMedia();
    }
示例#11
0
        public static void updateMedia(MediaBO objClass)
        {
            MongoCollection <Media> objCollection = db.GetCollection <Media>("c_Media");

            var query  = Query.EQ("_id", ObjectId.Parse(objClass.Id));
            var sortBy = SortBy.Descending("_id");
            var update = Update.Set("UserId", ObjectId.Parse(objClass.UserId))
                         .Set("AlbumId", ObjectId.Parse(objClass.AlbumId))
                         .Set("Name", objClass.Name)
                         .Set("Caption", objClass.Caption)
                         .Set("Location", objClass.Location)
                         .Set("Description", objClass.Description)
                         .Set("AddedDate", objClass.AddedDate)
                         .Set("Type", objClass.Type)
                         .Set("isFollow", objClass.isFollow)

            ;
            var result = objCollection.FindAndModify(query, sortBy, update, true);
        }
示例#12
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        TextBox      captionText  = new TextBox();
        TextBox      locationText = new TextBox();
        TextBox      despText     = new TextBox();
        TextBox      titleText    = new TextBox();
        GMDatePicker datep        = new GMDatePicker();
        string       caption      = null;
        string       location     = null;
        string       desp         = null;
        string       title        = null;
        string       id           = null;
        DateTime     adddate;


        foreach (DataListItem dataItem in DataList1.Items)
        {
            captionText  = (TextBox)dataItem.FindControl("txtCaption");
            locationText = (TextBox)dataItem.FindControl("txtLocation");
            despText     = (TextBox)dataItem.FindControl("txtDescription");
            titleText    = (TextBox)dataItem.FindControl("txtName");
            datep        = (GMDatePicker)dataItem.FindControl("GMDatePicker1");
            caption      = captionText.Text.ToString().Trim();
            location     = locationText.Text.ToString().Trim();
            desp         = despText.Text.ToString().Trim();
            title        = titleText.Text.ToString().Trim();
            adddate      = datep.Date;
            string Id = ((HiddenField)dataItem.FindControl("HiddenField1")).Value;

            MediaBO objClass = new MediaBO();
            objClass.Id          = Id;
            objClass.Location    = location;
            objClass.Caption     = caption;
            objClass.Name        = title;
            objClass.Description = desp;
            objClass.AddedDate   = adddate;
            objClass.Type        = Global.VIDEO;
            MediaBLL.updateEditVideoMedia(objClass);
        }

        LoadDataListMedia();
    }
示例#13
0
        public static string insertMedia(MediaBO objClass)
        {
            MongoCollection <BsonDocument> objCollection = db.GetCollection <BsonDocument>("c_Media");


            BsonDocument doc = new BsonDocument {
                { "UserId", ObjectId.Parse(objClass.UserId) },
                { "AlbumId", ObjectId.Parse(objClass.AlbumId) },
                { "Name", objClass.Name },
                { "Caption", objClass.Caption },
                { "Description", objClass.Description },
                { "AddedDate", objClass.AddedDate },
                { "Location", objClass.Location },
                { "Type", objClass.Type },
                { "isFollow", objClass.isFollow },
            };

            var rt = objCollection.Insert(doc);

            return(doc["_id"].ToString());
        }
示例#14
0
        public static MediaBO getMediaByMediaId(string Id)
        {
            MongoCollection <Media> objCollection = db.GetCollection <Media>("c_Media");

            MediaBO objClass = new MediaBO();

            foreach (Media item in objCollection.Find(Query.EQ("_id", ObjectId.Parse(Id))))
            {
                objClass.Id          = item._id.ToString();
                objClass.UserId      = item.UserId.ToString();
                objClass.AlbumId     = item.AlbumId.ToString();
                objClass.Name        = item.Name;
                objClass.Caption     = item.Caption;
                objClass.Location    = item.Location;
                objClass.Description = item.Description;
                objClass.AddedDate   = item.AddedDate;
                objClass.Type        = item.Type;
                objClass.isFollow    = item.isFollow;
                break;
            }
            return(objClass);
        }
示例#15
0
 public static string insertMedia(MediaBO objMedia)
 {
     return MediaDAL.insertMedia(objMedia);
 }
示例#16
0
 public static void updateEditVideoMedia(MediaBO objClass)
 {
     MediaDAL.updateEditVideoMedia(objClass);
 }
示例#17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ((Label)Master.FindControl("lblTitle")).Text = "View Video";
        Photoid = QueryString.getQueryStringOnIndex(0);
        Userid = SessionClass.getUserId();
        LoadFollow();
        LoadDataListComments();
        YouLikes();
        string videotag="";
        MediaBO objMedia=new MediaBO();
        objMedia=MediaBLL.getMediaByMediaId(Photoid);

        videotag += "  <script  type= 'text/javascript'  >";
        videotag +=" jwplayer('container').setup({";
        videotag += " file: src='" + Global.USER_VIDEO + objMedia.Id + ".mp4' ,";
        videotag += " flashplayer: '../../Resources/jwplayer/player.swf',";
        videotag +=" width: 520";
        videotag +=" }); ";
        videotag +="</script> ";
        this.LiteralVideo.Text = videotag ;
        imgBtnComments.ImageUrl = Global.PROFILE_PICTURE + Userid + ".jpg";
        Session["SpamPhoto"] = null;
        Session["AbusePhoto"] = null;
    }
示例#18
0
 public static void updateEditVideoMedia(MediaBO objClass)
 {
     MediaDAL.updateEditVideoMedia(objClass);
 }
示例#19
0
    protected void lbtnFollow_Click(object sender, EventArgs e)
    {
        if (lbtnFollow.Text.Equals("Follow"))
        {
            MediaBO obj = new MediaBO();
            obj.Id = Photoid;
            obj.isFollow = true;
            MediaBLL.updateFollow(obj);

        }
        else if (lbtnFollow.Text.Equals("UnFollow"))
        {
            MediaBO obj = new MediaBO();
            obj.Id = Photoid;
            obj.isFollow = false;
            MediaBLL.updateFollow(obj);

        }
        LoadFollow();
    }
示例#20
0
    protected void LoadFollow()
    {
        MediaBO obj = new MediaBO();
        obj = MediaBLL.getMediaByMediaId(Photoid);
        Isfollow = obj.isFollow;
        if (Isfollow)
        {
            lbtnFollow.Text = "UnFollow";
        }

        else
        {
            lbtnFollow.Text = "Follow";
        }
    }
示例#21
0
 public static void updateFollow(MediaBO objClass)
 {
     MediaDAL.updateFollow(objClass);
 }
示例#22
0
 public void GetPhotoDesc()
 {
     MediaBO mediaobj = new MediaBO();
     mediaobj = MediaBLL.getMediaByMediaId(Photoid);
     LabelGetCaption.Text = mediaobj.Caption;
     LabelGetDesc.Text = mediaobj.Description;
     LabelGetLocation.Text = mediaobj.Location;
     imgBack.PostBackUrl="ViewPhotoAlbum.aspx?" + mediaobj.AlbumId;
 }
示例#23
0
    public string SavePhotos()
    {
        string albumId;

            MediaAlbumBO objAClass = new MediaAlbumBO();
            objAClass.UserId = Userid;
            objAClass.Name = "Profile Pictures";
            objAClass.Type = Global.PHOTO;
            objAClass.isFollow = true;
            albumId = MediaAlbumBLL.insertDefaultAlbum(objAClass);

        MediaBO objClass = new MediaBO();

        objClass.UserId = Userid;

        objClass.AlbumId = albumId;
        objClass.Caption = "";
        objClass.Name = "";
        objClass.Description = "";
        objClass.AddedDate = DateTime.Now;
        objClass.Location = "";
        objClass.Type = Global.PHOTO;
        objClass.isFollow = true;
        return MediaBLL.insertMedia(objClass);
    }
示例#24
0
 public static void updateFollow(MediaBO objClass)
 {
     MediaDAL.updateFollow(objClass);
 }
示例#25
0
 public static void updateMedia(MediaBO objMedia)
 {
     MediaDAL.updateMedia(objMedia);
 }
示例#26
0
 public static void updateMedia(MediaBO objMedia)
 {
     MediaDAL.updateMedia(objMedia);
 }
示例#27
0
 public static string insertMedia(MediaBO objMedia)
 {
     return(MediaDAL.insertMedia(objMedia));
 }