Ejemplo n.º 1
0
 /// <summary>
 /// Get
 /// Calls [usp_select_MailMessage]
 /// </summary>
 public static MailMessage Get(System.Int32?mailMessageId, System.Int32?loginId)
 {
     Rebound.GlobalTrader.DAL.MailMessageDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.MailMessage.Get(mailMessageId, loginId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         MailMessage obj = new 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;
         objDetails        = null;
         return(obj);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a new MailMessageDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual MailMessageDetails GetMailMessageFromReader(DbDataReader reader)
        {
            MailMessageDetails mailMessage = new MailMessageDetails();

            if (reader.HasRows)
            {
                mailMessage.MailMessageId       = GetReaderValue_Int32(reader, "MailMessageId", 0);                       //From: [Table]
                mailMessage.MailMessageFolderNo = GetReaderValue_NullableInt32(reader, "MailMessageFolderNo", null);      //From: [Table]
                mailMessage.FromLoginNo         = GetReaderValue_NullableInt32(reader, "FromLoginNo", null);              //From: [Table]
                mailMessage.ToLoginNo           = GetReaderValue_NullableInt32(reader, "ToLoginNo", null);                //From: [Table]
                mailMessage.Subject             = GetReaderValue_String(reader, "Subject", "");                           //From: [Table]
                mailMessage.Body      = GetReaderValue_String(reader, "Body", "");                                        //From: [Table]
                mailMessage.DateSent  = GetReaderValue_NullableDateTime(reader, "DateSent", null);                        //From: [Table]
                mailMessage.CompanyNo = GetReaderValue_NullableInt32(reader, "CompanyNo", null);                          //From: [usp_list_Activity_by_Client_with_filter]
                mailMessage.UpdatedBy = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);                          //From: [Table]
                mailMessage.DLUP      = GetReaderValue_NullableDateTime(reader, "DLUP", null);                            //From: [Table]
                mailMessage.RecipientHasBeenNotified = GetReaderValue_Boolean(reader, "RecipientHasBeenNotified", false); //From: [Table]
                mailMessage.HasBeenRead   = GetReaderValue_Boolean(reader, "HasBeenRead", false);                         //From: [Table]
                mailMessage.FromLoginName = GetReaderValue_String(reader, "FromLoginName", "");                           //From: [usp_select_MailMessage]
                mailMessage.ToLoginName   = GetReaderValue_String(reader, "ToLoginName", "");                             //From: [usp_select_MailMessage]
                mailMessage.CompanyName   = GetReaderValue_String(reader, "CompanyName", "");                             //From: [usp_list_Activity_by_Client_with_filter]
            }
            return(mailMessage);
        }