private void GetEventPosts() { Event_Post aEvent; ArrayList ArrayEvents; ArrayEvents = bl.GetPost(aPost); int c = ArrayEvents.Count; for (int j = 0; j < c; ++j) { aEvent = (Event_Post)ArrayEvents[j]; concatinater.Append("<table class='eventWrapper' style=' width:100%;'> <tbody> <tr ><td style='font-weight: bold; width:30%;'>"); //Opening table concatinater.Append("Name: "); concatinater.Append("</td><td style=''>"); concatinater.Append(aEvent.EventName); concatinater.Append("</td></tr> <tr><td style='font-weight: bold;'>"); concatinater.Append("Type: "); concatinater.Append("</td><td>"); concatinater.Append(aEvent.EventType); concatinater.Append("</td></tr> <tr><td style='font-weight: bold;'>"); concatinater.Append("Venue: "); concatinater.Append("</td><td>"); concatinater.Append(aEvent.EventVenue); concatinater.Append("</td></tr> <tr><td style='font-weight: bold;'>"); concatinater.Append("Host: "); concatinater.Append("</td><td>"); concatinater.Append(aEvent.Host); concatinater.Append("</td></tr> <tr><td style='font-weight: bold;'>"); concatinater.Append("Start Date: "); concatinater.Append("</td><td>"); concatinater.Append(reusable_Methods.FormatDateTime(aEvent.StartDate)); concatinater.Append("</td></tr> <tr><td style='font-weight: bold;'>"); concatinater.Append("End Date: "); concatinater.Append("</td><td>"); concatinater.Append(reusable_Methods.FormatDateTime(aEvent.EndDate)); concatinater.Append("</td></tr></tbody></table>");//Closing table concatinater.Append("<div class='eventDetailsWrapper'> <div ><a title='click to view details' class='btnViewDetails pointer'>View details</a></div><p class='eventDetails'>"); concatinater.Append(aEvent.EventDetails); concatinater.Append("</p></div>"); } }
private void GetEventPosts() { Event_Post aEvent; ArrayList ArrayEvents; ArrayEvents = bl.GetPost(aPost); int c = ArrayEvents.Count; for (int j = 0; j < c; ++j) { aEvent = (Event_Post)ArrayEvents[j]; concatinater.Append("Name: "); concatinater.Append(aEvent.EventName); concatinater.Append("<br/>"); concatinater.Append("Details: "); concatinater.Append(aEvent.EventDetails); concatinater.Append("<br/>"); concatinater.Append("Type: "); concatinater.Append(aEvent.EventType); concatinater.Append("<br/>"); concatinater.Append("Venue: "); concatinater.Append(aEvent.EventVenue); concatinater.Append("<br/>"); concatinater.Append("Host: "); concatinater.Append(aEvent.Host); concatinater.Append("<br/>"); concatinater.Append("Start Date: "); concatinater.Append(reusable_Methods.FormatDateTime(aEvent.StartDate)); concatinater.Append("<br/>"); concatinater.Append("End Date: "); concatinater.Append(reusable_Methods.FormatDateTime(aEvent.EndDate)); concatinater.Append("<br/>"); } }
protected void Page_Load(object sender, EventArgs e) { Literal title = (Literal)Master.FindControl("pageTitle"); title.Text = "Messages Single View"; if (!IsPostBack) { string date = ""; if (!String.IsNullOrEmpty(Session["selectedMessageID"].ToString())) { int id = int.Parse(Session["selectedMessageID"].ToString()); // message.MessageId = id; StringBuilder concatinater = new StringBuilder(); Message message = new Message(id); DataTable aMessage = test.GetAMessage(message); NotificationDAL notificationDAL = new NotificationDAL(); notificationDAL.UpdateMessageNotificationIsRead(message); foreach (DataRow row in aMessage.Rows) { Reusable_Methods reusable_Methods = new Reusable_Methods(); date = reusable_Methods.FormatDateTime(DateTime.Parse((row["DateTime"]).ToString())); //date = Convert.ToDateTime(row["DateTime"]).ToString("M"); //Building single message view box concatinater.Append("<div class='SingleViewmsgeWrapper' id='"); concatinater.Append(row["messageID"].ToString()); //concatinater.Append("' ><div class='msgeHeading ui-corner-all' ><h2 class='ui-corner-all'> <a class='btnMemberProfile' id='"); concatinater.Append("' ><div class='msgeHeading ui-corner-all' ><h2 class='ui-corner-all'> <a href='#' class='btnMemberProfile replyMsge' style='font-weight:normal; font-size: 1.2em; ' id='"); concatinater.Append(row["FriendID"].ToString()); concatinater.Append("' >"); concatinater.Append(row["Friend"].ToString()); concatinater.Append("</a><span class='DateWithTime ui-corner-all floatright' style='font-size: 1.2em;' > "); concatinater.Append(date); concatinater.Append("</span></h2> </div>"); concatinater.Append("<p class=''>"); concatinater.Append(row["MessageText"].ToString()); concatinater.Append("</p></div>"); } MessageString = concatinater.ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { Literal title = (Literal)Master.FindControl("pageTitle"); title.Text = "Messages Single View"; if (!IsPostBack) { string date = ""; if (!String.IsNullOrEmpty(Session["selectedMessageID"].ToString())) { int id = int.Parse(Session["selectedMessageID"].ToString()); // message.MessageId = id; StringBuilder concatinater = new StringBuilder(); Message message = new Message(id); DataTable aMessage = test.GetAMessage(message); NotificationDAL notificationDAL = new NotificationDAL(); notificationDAL.UpdateMessageNotificationIsRead(message); foreach (DataRow row in aMessage.Rows) { Reusable_Methods reusable_Methods = new Reusable_Methods(); date = reusable_Methods.FormatDateTime(DateTime.Parse((row["DateTime"]).ToString())); //date = Convert.ToDateTime(row["DateTime"]).ToString("M"); //Building single message view box concatinater.Append("<div class='SingleViewmsgeWrapper' id='"); concatinater.Append(row["messageID"].ToString()); //concatinater.Append("' ><div class='msgeHeading ui-corner-all' ><h2 class='ui-corner-all'> <a class='btnMemberProfile' id='"); concatinater.Append("' ><div class='msgeHeading ui-corner-all' ><h2 class='ui-corner-all'> <a href='#' class='btnMemberProfile replyMsge' style='font-weight:normal; font-size: 1.2em; ' id='"); concatinater.Append(row["FriendID"].ToString()); concatinater.Append("' >"); concatinater.Append(row["Friend"].ToString()); concatinater.Append("</a><span class='DateWithTime ui-corner-all floatright' style='font-size: 1.2em;' > "); concatinater.Append(date); concatinater.Append("</span></h2> </div>"); concatinater.Append("<p class=''>"); concatinater.Append(row["MessageText"].ToString()); concatinater.Append("</p></div>"); } MessageString = concatinater.ToString(); } } }
private void GenerateProfile(Member aMember) { #region RIGHT COLUMN GET ALL JOINED GROUPS //JOINED GROUPS============================================================================== Reusable_Methods reusable_Methods = new Reusable_Methods(aMember); allgroups = reusable_Methods.RightColumnGetAllJoinedGroups(); //============================================================================================ #endregion #region RIGHT COLUMN MEMBER INFORMATION //MEMBER INFORMATION ON RIGHT COLUMN========================================================================== //MEMBER INFO AND PROFILE MemberInfoDAL dal = new MemberInfoDAL(); // Member member = new Member(); aMember = dal.GetAllMemberInfo(aMember); profilesMemnerID.Value = aMember.MemberId; //Set the ImageUrl to the path of the handler with the querystring value ProfileImage.ImageUrl = "ProfilePicHandler.ashx?id=" + SSTCryptographer.Decrypt(aMember.MemberId); //call the method to get the image information and display it in Label Control //======================================================================================================= #endregion #region MAIN COLUMN MEMBER INFORMATION //MEMBER INFORMATION ON MAIN DISPLAY========================================================================== StringBuilder memberData = new StringBuilder(); memberData.Append("<tr><td style='font-weight: bold;' > "); memberData.Append("First Name:</td><td>"); memberData.Append(aMember.FirstName); memberData.Append("</td></tr> <tr><td style='font-weight: bold;'>"); memberData.Append("Last Name:</td><td>"); memberData.Append(aMember.LastName); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Display Name:</td><td>"); memberData.Append(aMember.DisplayName); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Email:</td><td>"); memberData.Append(aMember.Email); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Description:</td><td>"); memberData.Append(aMember.Description); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Campus:</td><td>"); memberData.Append(aMember.Campus); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Account Type:</td><td>"); memberData.Append(aMember.MemberType); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); if (aMember.IsOnline == false) { memberData.Append("Online Status:</td><td style='color:red;'>"); memberData.Append("Offline"); memberData.Append("</td></tr>"); } else { memberData.Append("Online Status:</td><td style='color:green;'>"); memberData.Append("Online"); memberData.Append("</td></tr>"); } memberDataMain = memberData.ToString(); #endregion #region MAIN COLUMN MOST RECENT POST DATE //MOST RECENT POST DATE ON MAIN DISPLAY========================================================================== NotificationDAL notificationDAL = new NotificationDAL(); StringBuilder recentPostDate = new StringBuilder(); Post aPost = new Post(); aPost = notificationDAL.GetMostRecentPostDate(aMember); if (aPost.CreateDate == DateTime.Parse("1/1/0001 12:00:00 AM")) { reusable_Methods = new Reusable_Methods(); string date = reusable_Methods.FormatDateTime(aPost.CreateDate); recentPostDate.Append("<p style='font-size: 1.2em; color: #A3ADB5;'>Most recent post date<span style='color: #0e93be;'> - "); recentPostDate.Append("No posts"); recentPostDate.Append("</span></p>"); mostRecentPostDate = recentPostDate.ToString(); } else { reusable_Methods = new Reusable_Methods(); string date = reusable_Methods.FormatDateTime(aPost.CreateDate); recentPostDate.Append("<p style='font-size: 1.2em; color: #A3ADB5;'>Most recent post date<span style='color: #0e93be;'> - "); recentPostDate.Append(date); recentPostDate.Append("</span></p>"); mostRecentPostDate = recentPostDate.ToString(); } #endregion #region MAIN ACTUAL DISPLAY NAME MemberInfoDAL memberInfoDAL = new MemberInfoDAL(); Member actualMember = new Member(Context.Session["memberID"].ToString()); aMember = memberInfoDAL.GetActualDisplayName(actualMember); actualMemberDisplayName = aMember.DisplayName; #endregion }
public void AddComment(string sessionMemberID, string postID, string commentTxt) { Comments comment = new Comments(); comment.MemberId = sessionMemberID; comment.CommentText = commentTxt; Post post = new Post(); post.PostId = int.Parse(postID); comment.PostId = post.PostId; messageDAL.InsertComment(comment); StringBuilder commentBuilder = new StringBuilder(); //################################### //refreshing Comments //################################### DataTable comments = messageDAL.GetAllComments(post); foreach (DataRow row in comments.Rows) { date = Convert.ToDateTime(row["CreateDate"]).ToString("M"); //Building single message view box commentBuilder.Append("<div id='"); commentBuilder.Append((row["CommentID"]).ToString()); commentBuilder.Append("' class='aComment'><div class='deleteComment floatright'>"); if ((row["MemberID"]).ToString() == sessionMemberID) { commentBuilder.Append("<a class='btnDleteComment ui-icon ui-icon-close tip' title='Delete this comment'></a>"); } else { commentBuilder.Append("<a class='btnOpenMenuComment ui-icon ui-icon-circle-triangle-s tip' title='More options..'></a>"); } commentBuilder.Append("</div><h5><a style='font-weight:normal;' "); commentBuilder.Append("id='" + (row["MemberID"]).ToString() + "'> "); commentBuilder.Append(row["Friend"].ToString()); commentBuilder.Append("</a><span class='DateWithTime ui-corner-all floatright'>"); Reusable_Methods reusable_Methods = new Reusable_Methods(); date = reusable_Methods.FormatDateTime(Convert.ToDateTime(row["CreateDate"])); commentBuilder.Append(date); commentBuilder.Append("</span></h5><p>"); commentBuilder.Append((row["CommentText"]).ToString()); commentBuilder.Append("</p></div>"); //End Building } string commentCount = messageDAL.CountComments(post).ToString(); string commentText = commentBuilder.ToString(); //Updating all Clients Clients.updatingComments(Context.ConnectionId, commentCount, commentText, postID); }
protected void Page_Load(object sender, EventArgs e) { Literal title = (Literal)Master.FindControl("pageTitle"); title.Text = "Inbox"; Page.RouteData.Values["Id"] = "Inbox"; if (!IsPostBack) { if (Session["memberID"] == null) { Response.Redirect("~/Login.aspx"); } else { #region ## if (IsPostBack) { if (Request["__EVENTARGUMENT"] != "") { try { string s = Request["__EVENTARGUMENT"]; Session["Data"] = s.TrimEnd(','); Response.Redirect("~/ViewMessages.aspx"); } catch (Exception ex) { ex.ToString(); } } } #endregion } } MessagesDAL DAL = new MessagesDAL(); string date = ""; string shrtMessage = ""; DataTable inboxList = DAL.getInboxList(new Member(Session["memberID"].ToString())); StringBuilder concatinater = new StringBuilder(); foreach (DataRow row in inboxList.Rows) { Message message = new Message(int.Parse(row["messageID"].ToString())); //date = Convert.ToDateTime(row["DateTime"]).ToString("D"); reusable_Methods = new Reusable_Methods(); date = reusable_Methods.FormatDateTime(DateTime.Parse(row["DateTime"].ToString())); if (row["MessageText"].ToString().Length > 45) { shrtMessage = row["MessageText"].ToString().Substring(0, 45) + "..."; } else { shrtMessage = row["MessageText"].ToString(); } //Building single message view box concatinater.Append("<div class='msgeWrapper "); if (!DAL.IsMessageRead(message)) { //isRead concatinater.Append("isNotRead"); } concatinater.Append("' id='"); concatinater.Append(row["messageID"].ToString()); concatinater.Append("'> <div class='checkBox'><input type='checkbox' /> </div><div class='msge' ><div><span class='sendingFriend blueFontTextColor' id='"); concatinater.Append(row["FriendID"].ToString()); concatinater.Append("' >"); concatinater.Append(row["FriendDisplayName"].ToString()); concatinater.Append("</a><span class='DateWithTime floatright'>"); concatinater.Append(date); concatinater.Append("</span></div><div class='slideInMenu floatright' style='visibility:hidden;' ><span class='floatright BorberRad3' id='deleteMsge' >Delete</span>"); concatinater.Append(" <span class='floatright BorberRad3' BorberRad3'>Reply</span></div><div class='msgeText floatright'>"); concatinater.Append(shrtMessage); concatinater.Append("</div></div> <div style='clear:both;'></div></div>"); } items = concatinater.ToString(); }
public void AddComment(string sessionMemberID, string postID, string commentTxt) { Comments comment = new Comments(); comment.MemberId = sessionMemberID; comment.CommentText = commentTxt; Post post = new Post(); post.PostId = int.Parse(postID); comment.PostId = post.PostId; messageDAL.InsertComment(comment); StringBuilder commentBuilder = new StringBuilder(); //################################### //refreshing Comments //################################### DataTable comments = messageDAL.GetAllComments(post); foreach (DataRow row in comments.Rows) { date = Convert.ToDateTime(row["CreateDate"]).ToString("M"); //Building single message view box commentBuilder.Append("<div id='"); commentBuilder.Append((row["CommentID"]).ToString()); commentBuilder.Append("' class='aComment'><div class='deleteComment floatright'>"); if ((row["MemberID"]).ToString() == sessionMemberID) { commentBuilder.Append("<a class='btnDleteComment ui-icon ui-icon-close tip' title='Delete this comment'></a>"); } else { commentBuilder.Append("<a class='btnOpenMenuComment ui-icon ui-icon-circle-triangle-s tip' title='More options..'></a>"); } commentBuilder.Append("</div><h5><a style='font-weight:normal;' "); commentBuilder.Append("id='" + (row["MemberID"]).ToString() + "'> "); commentBuilder.Append(row["Friend"].ToString()); commentBuilder.Append("</a><span class='DateWithTime ui-corner-all floatright'>"); Reusable_Methods reusable_Methods = new Reusable_Methods(); date = reusable_Methods.FormatDateTime(Convert.ToDateTime(row["CreateDate"])); commentBuilder.Append(date); commentBuilder.Append("</span></h5><p>"); commentBuilder.Append((row["CommentText"]).ToString()); commentBuilder.Append("</p></div>"); //End Building } string commentCount = messageDAL.CountComments(post).ToString(); string commentText = commentBuilder.ToString(); //Updating all Clients Clients.updatingComments(Context.ConnectionId, commentCount, commentText, postID); }
private void GenerateProfile(Member aMember) { #region RIGHT COLUMN GET ALL JOINED GROUPS //JOINED GROUPS============================================================================== Reusable_Methods reusable_Methods = new Reusable_Methods(aMember); allgroups = reusable_Methods.RightColumnGetAllJoinedGroups(); //============================================================================================ #endregion #region RIGHT COLUMN MEMBER INFORMATION //MEMBER INFORMATION ON RIGHT COLUMN========================================================================== //MEMBER INFO AND PROFILE MemberInfoDAL dal = new MemberInfoDAL(); // Member member = new Member(); aMember = dal.GetAllMemberInfo(aMember); profilesMemnerID.Value = aMember.MemberId; //Set the ImageUrl to the path of the handler with the querystring value ProfileImage.ImageUrl = "ProfilePicHandler.ashx?id=" + SSTCryptographer.Decrypt(aMember.MemberId); //call the method to get the image information and display it in Label Control //======================================================================================================= #endregion #region MAIN COLUMN MEMBER INFORMATION //MEMBER INFORMATION ON MAIN DISPLAY========================================================================== StringBuilder memberData = new StringBuilder(); memberData.Append("<tr><td style='font-weight: bold;' > "); memberData.Append("First Name:</td><td>"); memberData.Append(aMember.FirstName); memberData.Append("</td></tr> <tr><td style='font-weight: bold;'>"); memberData.Append("Last Name:</td><td>"); memberData.Append(aMember.LastName); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Display Name:</td><td>"); memberData.Append(aMember.DisplayName); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Email:</td><td>"); memberData.Append(aMember.Email); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Description:</td><td>"); memberData.Append(aMember.Description); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Campus:</td><td>"); memberData.Append(aMember.Campus); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); memberData.Append("Account Type:</td><td>"); memberData.Append(aMember.MemberType); memberData.Append("</td></tr> <tr><td style='font-weight: bold;' > "); if (aMember.IsOnline == false) { memberData.Append("Online Status:</td><td style='color:red;'>"); memberData.Append("Offline"); memberData.Append("</td></tr>"); } else { memberData.Append("Online Status:</td><td style='color:green;'>"); memberData.Append("Online"); memberData.Append("</td></tr>"); } memberDataMain = memberData.ToString(); #endregion #region MAIN COLUMN MOST RECENT POST DATE //MOST RECENT POST DATE ON MAIN DISPLAY========================================================================== NotificationDAL notificationDAL = new NotificationDAL(); StringBuilder recentPostDate = new StringBuilder(); Post aPost = new Post(); aPost = notificationDAL.GetMostRecentPostDate(aMember); if (aPost.CreateDate == DateTime.Parse("1/1/0001 12:00:00 AM")) { reusable_Methods = new Reusable_Methods(); string date = reusable_Methods.FormatDateTime(aPost.CreateDate); recentPostDate.Append("<p style='font-size: 1.2em; color: #A3ADB5;'>Most recent post date<span style='color: #0e93be;'> - "); recentPostDate.Append("No posts"); recentPostDate.Append("</span></p>"); mostRecentPostDate = recentPostDate.ToString(); } else { reusable_Methods = new Reusable_Methods(); string date = reusable_Methods.FormatDateTime(aPost.CreateDate); recentPostDate.Append("<p style='font-size: 1.2em; color: #A3ADB5;'>Most recent post date<span style='color: #0e93be;'> - "); recentPostDate.Append(date); recentPostDate.Append("</span></p>"); mostRecentPostDate = recentPostDate.ToString(); } #endregion #region MAIN ACTUAL DISPLAY NAME MemberInfoDAL memberInfoDAL = new MemberInfoDAL(); Member actualMember = new Member(Context.Session["memberID"].ToString()); aMember = memberInfoDAL.GetActualDisplayName(actualMember); actualMemberDisplayName = aMember.DisplayName; #endregion }
protected void Page_Load(object sender, EventArgs e) { Literal title = (Literal)Master.FindControl("pageTitle"); title.Text = "Inbox"; Page.RouteData.Values["Id"] = "Inbox"; if (!IsPostBack) { if (Session["memberID"] == null) { Response.Redirect("~/Login.aspx"); } else { #region ## if (IsPostBack) { if (Request["__EVENTARGUMENT"] != "") { try { string s = Request["__EVENTARGUMENT"]; Session["Data"] = s.TrimEnd(','); Response.Redirect("~/ViewMessages.aspx"); } catch (Exception ex) { ex.ToString(); } } } #endregion } } MessagesDAL DAL = new MessagesDAL(); string date = ""; string shrtMessage = ""; DataTable inboxList = DAL.getInboxList(new Member(Session["memberID"].ToString())); StringBuilder concatinater = new StringBuilder(); foreach (DataRow row in inboxList.Rows) { Message message = new Message(int.Parse(row["messageID"].ToString())); //date = Convert.ToDateTime(row["DateTime"]).ToString("D"); reusable_Methods = new Reusable_Methods(); date = reusable_Methods.FormatDateTime(DateTime.Parse(row["DateTime"].ToString())); if (row["MessageText"].ToString().Length > 45) { shrtMessage = row["MessageText"].ToString().Substring(0, 45) + "..."; } else { shrtMessage = row["MessageText"].ToString(); } //Building single message view box concatinater.Append("<div class='msgeWrapper "); if(!DAL.IsMessageRead(message)) { //isRead concatinater.Append("isNotRead"); } concatinater.Append("' id='"); concatinater.Append(row["messageID"].ToString()); concatinater.Append("'> <div class='checkBox'><input type='checkbox' /> </div><div class='msge' ><div><span class='sendingFriend blueFontTextColor' id='"); concatinater.Append(row["FriendID"].ToString()); concatinater.Append("' >"); concatinater.Append(row["FriendDisplayName"].ToString()); concatinater.Append("</a><span class='DateWithTime floatright'>"); concatinater.Append(date); concatinater.Append("</span></div><div class='slideInMenu floatright' style='visibility:hidden;' ><span class='floatright BorberRad3' id='deleteMsge' >Delete</span>"); concatinater.Append(" <span class='floatright BorberRad3' BorberRad3'>Reply</span></div><div class='msgeText floatright'>"); concatinater.Append(shrtMessage); concatinater.Append("</div></div> <div style='clear:both;'></div></div>"); } items = concatinater.ToString(); }