Exemple #1
0
        /// <summary>
        /// GetListNewAndUnnotifiedForRecipient
        /// Calls [usp_selectAll_MailMessage_New_and_Unnotified_for_Recipient]
        /// </summary>
        public static List <MailMessage> GetListNewAndUnnotifiedForRecipient(System.Int32?toLoginNo)
        {
            List <MailMessageDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.MailMessage.GetListNewAndUnnotifiedForRecipient(toLoginNo);

            if (lstDetails == null)
            {
                return(new List <MailMessage>());
            }
            else
            {
                List <MailMessage> lst = new List <MailMessage>();
                foreach (MailMessageDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.MailMessage obj = new Rebound.GlobalTrader.BLL.MailMessage();
                    obj.MailMessageId = objDetails.MailMessageId;
                    obj.FromLoginName = objDetails.FromLoginName;
                    obj.Subject       = objDetails.Subject;
                    obj.DateSent      = objDetails.DateSent;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
Exemple #2
0
        /// <summary>
        /// GetListSentByRecipient
        /// Calls [usp_selectAll_MailMessage_Sent_by_Recipient]
        /// </summary>
        public static List <MailMessage> GetListSentByRecipient(System.Int32?fromLoginNo)
        {
            List <MailMessageDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.MailMessage.GetListSentByRecipient(fromLoginNo);

            if (lstDetails == null)
            {
                return(new List <MailMessage>());
            }
            else
            {
                List <MailMessage> lst = new List <MailMessage>();
                foreach (MailMessageDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.MailMessage obj = new Rebound.GlobalTrader.BLL.MailMessage();
                    obj.MailMessageId       = objDetails.MailMessageId;
                    obj.MailMessageFolderNo = objDetails.MailMessageFolderNo;
                    obj.FromLoginNo         = objDetails.FromLoginNo;
                    obj.ToLoginNo           = objDetails.ToLoginNo;
                    obj.Subject             = objDetails.Subject;
                    obj.Body     = objDetails.Body;
                    obj.DateSent = objDetails.DateSent;
                    obj.RecipientHasBeenNotified = objDetails.RecipientHasBeenNotified;
                    obj.HasBeenRead   = objDetails.HasBeenRead;
                    obj.UpdatedBy     = objDetails.UpdatedBy;
                    obj.DLUP          = objDetails.DLUP;
                    obj.FromLoginName = objDetails.FromLoginName;
                    obj.ToLoginName   = objDetails.ToLoginName;
                    obj.CompanyNo     = objDetails.CompanyNo;
                    obj.CompanyName   = objDetails.CompanyName;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }