Example #1
0
    protected void txtFriendSearch_TextChanged(object sender, EventArgs e)
    {
        string fid = HiddenField1.Value;

        if (fid.Length > 20)
        {
            UserBO objFriend = new UserBO();
            objFriend = UserBLL.getUserByUserId(fid);
            UserBO objUser = new UserBO();
            objUser = UserBLL.getUserByUserId(Userid);


            //Response.Write(fid);

            TagsBO objTags = new TagsBO();
            objTags.AtId        = Photoid;
            objTags.Type        = Global.PHOTO;
            objTags.UserId      = Userid;
            objTags.FirstName   = objUser.FirstName;
            objTags.LastName    = objUser.LastName;
            objTags.FriendId    = fid;
            objTags.FriendFName = objFriend.FirstName;
            objTags.FriendLName = objFriend.LastName;

            TagsBLL.insertTags(objTags);
            LoadDataListTags();


            List <string> lst = new List <string>();
            lst = TagsBLL.getTagsFriendId(Global.PHOTO, Photoid);

            LoadDataListComments();
            if (Isfollow == true)
            {
                foreach (string item in lst)
                {
                    UserBO objUserNotify = new UserBO();
                    objUserNotify = UserBLL.getUserByUserId(item);
                    NotificationBO objNotify = new NotificationBO();
                    objNotify.MyNotification = "<a  href=\"ViewProfile.aspx?UserId=" + Userid + "\">" + objUser.FirstName + " " + objUser.LastName + "</a> tags on <a  href=\"ViewPhoto.aspx?PhotoId=" + Photoid + "\">photo</a>";
                    objNotify.AtId           = Photoid;
                    objNotify.Type           = Global.PHOTO;
                    objNotify.UserId         = item;
                    objNotify.FirstName      = objUserNotify.FirstName;
                    objNotify.LastName       = objUserNotify.LastName;
                    objNotify.FriendId       = Userid;
                    objNotify.FriendFName    = objUser.FirstName;
                    objNotify.FriendLName    = objUser.LastName;
                    msgtext = "Dear Pyramid Plus user," + objUser.FirstName + " " + objUser.LastName + " tags you photo ";

                    // ThreadPool.QueueUserWorkItem(new WaitCallback(sendEmail), (object)objUserNotify.Email);


                    NotificationBLL.insertNotification(objNotify);
                }
            }
        }
    }
Example #2
0
    protected void txtFriendSearch_TextChanged(object sender, EventArgs e)
    {
        string fid = HiddenField1.Value;

        if (fid.Length > 20)
        {
            UserBO objFriend = new UserBO();
            objFriend = UserBLL.getUserByUserId(fid);
            UserBO objUser = new UserBO();
            objUser = UserBLL.getUserByUserId(Userid);


            //Response.Write(fid);

            TagsBO objTags = new TagsBO();
            objTags.AtId        = Albumid;
            objTags.Type        = Global.PHOTO_ALBUM;
            objTags.UserId      = Userid;
            objTags.FirstName   = objUser.FirstName;
            objTags.LastName    = objUser.LastName;
            objTags.FriendId    = fid;
            objTags.FriendFName = objFriend.FirstName;
            objTags.FriendLName = objFriend.LastName;

            TagsBLL.insertTags(objTags);
            LoadDataListTags();


            List <string> lst = new List <string>();
            lst = TagsBLL.getTagsFriendId(Global.PHOTO_ALBUM, Albumid);

            LoadDataListComments();

            foreach (string item in lst)
            {
                UserBO objUserNotify = new UserBO();
                objUserNotify = UserBLL.getUserByUserId(item);
                NotificationBO objNotify = new NotificationBO();
                objNotify.MyNotification = "<a  href=\"ViewProfile.aspx?UserId=" + Userid + "\">" + objUser.FirstName + " " + objUser.LastName + "</a> tags on  <a  href=\"ViewPhotoAlbum.aspx?AlbumId=" + Albumid + "\">photo album</a>";
                objNotify.AtId           = Albumid;
                objNotify.Type           = Global.VIDEO;
                objNotify.UserId         = item;
                objNotify.FirstName      = objUserNotify.FirstName;
                objNotify.LastName       = objUserNotify.LastName;
                objNotify.FriendId       = Userid;
                objNotify.FriendFName    = objUser.FirstName;
                objNotify.FriendLName    = objUser.LastName;
                msgtext = "Dear Pyramid Plus user," + objUser.FirstName + " " + objUser.LastName + " tags you video ";

                NotificationBLL.insertNotification(objNotify);
            }
        }
    }