Esempio n. 1
0
 public static IList<Message> GetMessagebyToUserId(string ToUserId)
 {
     IList<Message> objMessages = new MessageFacade().SelAllToUserId(new Guid(HttpContext.Current.Session["UserId"].ToString()), new Guid(ToUserId));
     if (objMessages != null)
         return objMessages;
     else
         return null;
 }
Esempio n. 2
0
 public static IList<Message> GetAllRecentMessages()
 {
     IList<Message> objMessages = new MessageFacade().SelAllFromUserId(new Guid(HttpContext.Current.Session["UserId"].ToString()));
     if (objMessages != null)
         return objMessages;
     else
         return null;
 }
Esempio n. 3
0
 public static MessageDetails GetAllMessagesofSent(string Ticks, int StartIndex, int MaxIndex)
 {
     if (StartIndex > 0)
         StartIndex = ((StartIndex) * MaxIndex);
     MessageDetails objMessageDetails = new MessageFacade().GetAllMessagesForSent(StartIndex, MaxIndex, "1=1", "CreatedOn Desc", new Guid(HttpContext.Current.Session["UserId"].ToString()));
     if (objMessageDetails != null)
         return objMessageDetails;
     else
         return null;
 }
Esempio n. 4
0
 void BindAllRecentMessages()
 {
     IList<Message> objMessages = new MessageFacade().SelAllFromUserId(new Guid(HttpContext.Current.Session["UserId"].ToString()));
     if (objMessages != null && objMessages.Count > 0)
     {
         divMessages.Style["display"] = "block";
         divNoMessages.Style["display"] = "none";
         rptMessages.DataSource = objMessages;
     }
     else
     {
         divMessages.Style["display"] = "none";
         divNoMessages.Style["display"] = "";
         rptMessages.DataSource = null;
     }
     rptMessages.DataBind();
 }
Esempio n. 5
0
 void BindMessagesByUser()
 {
     IList<Message> objMessages = new MessageFacade().SelMessagesForDefaultUser(new Guid(HttpContext.Current.Session["UserId"].ToString()));
     if (objMessages != null && objMessages.Count > 0)
     {
         divUserMessages.Style["display"] = "block";
         divNoUserMessages.Style["display"] = "none";
         rptUserMessages.DataSource = objMessages;
     }
     else
     {
         divUserMessages.Style["display"] = "none";
         divNoUserMessages.Style["display"] = "block";
         rptUserMessages.DataSource = null;
     }
     rptUserMessages.DataBind();
 }
Esempio n. 6
0
 /// <summary>
 /// Function : GetAllMessageByToUserId
 /// Inputs : N/A
 /// Output : N/A
 /// Description : Get All Messages for inbox
 /// </summary>
 void GetAllMessagesForInbox()
 {
     MessageDetails objMessageDetails = new MessageFacade().GetAllMessagesForInbox(0, 1000, "1=1", "CreatedOn Desc", new Guid(HttpContext.Current.Session["UserId"].ToString()));
     if (objMessageDetails != null && objMessageDetails.MessageList.Count > 0)
     {
         divMessages.Style["display"] = "block";
         divSettings.Style["display"] = "block";
         divNoMessages.Style["display"] = "none";
         rptMessages.DataSource = objMessageDetails.MessageList;
     }
     else
     {
         divSettings.Style["display"] = "none";
         divMessages.Style["display"] = "none";
         divNoMessages.Style["display"] = "block";
         rptMessages.DataSource = null;
     }
     rptMessages.DataBind();
 }