Beispiel #1
0
        private static List <ContactFormMessage> LoadListFromReader(IDataReader reader)
        {
            List <ContactFormMessage> contactFormMessageList = new List <ContactFormMessage>();

            try
            {
                while (reader.Read())
                {
                    ContactFormMessage contactFormMessage = new ContactFormMessage();
                    contactFormMessage.rowGuid              = new Guid(reader["RowGuid"].ToString());
                    contactFormMessage.siteGuid             = new Guid(reader["SiteGuid"].ToString());
                    contactFormMessage.moduleGuid           = new Guid(reader["ModuleGuid"].ToString());
                    contactFormMessage.email                = reader["Email"].ToString();
                    contactFormMessage.userName             = reader["Url"].ToString();
                    contactFormMessage.subject              = reader["Subject"].ToString();
                    contactFormMessage.message              = reader["Message"].ToString();
                    contactFormMessage.createdUtc           = Convert.ToDateTime(reader["CreatedUtc"]);
                    contactFormMessage.createdFromIpAddress = reader["CreatedFromIpAddress"].ToString();
                    contactFormMessage.userGuid             = new Guid(reader["UserGuid"].ToString());
                    contactFormMessageList.Add(contactFormMessage);
                }
            }
            finally
            {
                reader.Close();
            }

            return(contactFormMessageList);
        }
Beispiel #2
0
 /// <summary>
 /// Compares 2 instances of ContactFormMessage.
 /// </summary>
 public static int CompareByCreatedFromIpAddress(ContactFormMessage contactFormMessage1, ContactFormMessage contactFormMessage2)
 {
     return(contactFormMessage1.CreatedFromIpAddress.CompareTo(contactFormMessage2.CreatedFromIpAddress));
 }
Beispiel #3
0
 /// <summary>
 /// Compares 2 instances of ContactFormMessage.
 /// </summary>
 public static int CompareByCreatedUtc(ContactFormMessage contactFormMessage1, ContactFormMessage contactFormMessage2)
 {
     return(contactFormMessage1.CreatedUtc.CompareTo(contactFormMessage2.CreatedUtc));
 }
Beispiel #4
0
 /// <summary>
 /// Compares 2 instances of ContactFormMessage.
 /// </summary>
 public static int CompareByMessage(ContactFormMessage contactFormMessage1, ContactFormMessage contactFormMessage2)
 {
     return(contactFormMessage1.Message.CompareTo(contactFormMessage2.Message));
 }
Beispiel #5
0
 /// <summary>
 /// Compares 2 instances of ContactFormMessage.
 /// </summary>
 public static int CompareBySubject(ContactFormMessage contactFormMessage1, ContactFormMessage contactFormMessage2)
 {
     return(contactFormMessage1.Subject.CompareTo(contactFormMessage2.Subject));
 }
Beispiel #6
0
 /// <summary>
 /// Compares 2 instances of ContactFormMessage.
 /// </summary>
 public static int CompareByUserName(ContactFormMessage contactFormMessage1, ContactFormMessage contactFormMessage2)
 {
     return(contactFormMessage1.UserName.CompareTo(contactFormMessage2.UserName));
 }
Beispiel #7
0
 /// <summary>
 /// Compares 2 instances of ContactFormMessage.
 /// </summary>
 public static int CompareByEmail(ContactFormMessage contactFormMessage1, ContactFormMessage contactFormMessage2)
 {
     return(contactFormMessage1.Email.CompareTo(contactFormMessage2.Email));
 }