public static string insertNotification(NotificationBO objNotification) { if (!objNotification.MyNotification.Equals("")) return NotificationDAL.insertNotification(objNotification); else return null; }
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.VIDEO; 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.VIDEO, Photoid); 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=\"ViewVideo.aspx?VideoId=" + Photoid + "\">video</a>"; objNotify.AtId = Photoid; 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 photo "; // ThreadPool.QueueUserWorkItem(new WaitCallback(sendEmail), (object)objUserNotify.Email); //sendEmail(objUserNotify.Email); NotificationBLL.insertNotification(objNotify); } } }
protected void InsertComments() { UserBO objUser = new UserBO(); objUser = UserBLL.getUserByUserId(Userid); CommentsBO objClass = new CommentsBO(); objClass.MyComments = txtComments.Text; objClass.AtId = Photoid; objClass.Type = Global.VIDEO; objClass.UserId = Userid; objClass.FirstName = objUser.FirstName; objClass.LastName = objUser.LastName; if (objClass.MyComments.Equals("")) { CommentsDAL.insertComments(objClass); } ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "myScript", "document.getElementById('" + txtComments.ClientID + "').value = '';", true); List<string> lst = new List<string>(); lst = CommentsDAL.getCommentsUserIdbyAtId(Global.VIDEO, Photoid); if (Isfollow == true) { foreach (string item in lst) { UserBO objUserNotify = new UserBO(); objUserNotify = UserBLL.getUserByUserId(item); msgtext = "Dear Pyramid Plus user, Comments on your video. "; NotificationBO objNotify = new NotificationBO(); objNotify.MyNotification = "<a href=\"ViewProfile.aspx?UserId=" + Userid + "\">" + objUser.FirstName + " " + objUser.LastName + "</a> comments on <a href=\"ViewVideo.aspx?VideoId=" + Photoid + "\">video</a>"; objNotify.AtId = Photoid; 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; objNotify.Status = false; // ThreadPool.QueueUserWorkItem(new WaitCallback(sendEmail), (object)objUserNotify.Email); NotificationBLL.insertNotification(objNotify); } } txtComments.Text = ""; LoadDataListComments(); }
public void insertNotification_user(NotificationBO notifyobj) { NotificationBLL.insertNotification(notifyobj); }
void notify_Tag(string uid, string atid) { UserBO objUser = new UserBO(); objUser = UserBLL.getUserByUserId(userid); UserBO objUserNotify = new UserBO(); objUserNotify = getUserForNotification(uid); NotificationBO objNotify = new NotificationBO(); objNotify.MyNotification = "<a href=\"ViewProfile.aspx?UserId=" + userid + "\">" + objUser.FirstName + " " + objUser.LastName + "</a> Tag a <a href='UserData.aspx'>post</a>"; objNotify.AtId = atid; objNotify.Type = Global.TAG_POST; objNotify.UserId = uid; objNotify.FirstName = objUserNotify.FirstName; objNotify.LastName = objUserNotify.LastName; objNotify.FriendId = userid; objNotify.FriendFName = objUser.FirstName; objNotify.FriendLName = objUser.LastName; insertNotification_user(objNotify); }
public static void updateNotification(NotificationBO objNotification) { NotificationDAL.updateNotification(objNotification); }
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); } } }