コード例 #1
0
ファイル: EmailSendQueue.cs プロジェクト: wqshabib/mojoportal
        private static List <EmailSendQueue> LoadListFromReader(IDataReader reader)
        {
            List <EmailSendQueue> emailSendQueueList = new List <EmailSendQueue>();

            try
            {
                while (reader.Read())
                {
                    EmailSendQueue emailSendQueue = new EmailSendQueue();
                    emailSendQueue.guid         = new Guid(reader["Guid"].ToString());
                    emailSendQueue.siteGuid     = new Guid(reader["SiteGuid"].ToString());
                    emailSendQueue.moduleGuid   = new Guid(reader["ModuleGuid"].ToString());
                    emailSendQueue.userGuid     = new Guid(reader["UserGuid"].ToString());
                    emailSendQueue.specialGuid1 = new Guid(reader["SpecialGuid1"].ToString());
                    emailSendQueue.specialGuid2 = new Guid(reader["SpecialGuid2"].ToString());
                    emailSendQueue.fromAddress  = reader["FromAddress"].ToString();
                    emailSendQueue.replyTo      = reader["ReplyTo"].ToString();
                    emailSendQueue.toAddress    = reader["ToAddress"].ToString();
                    emailSendQueue.ccAddress    = reader["CcAddress"].ToString();
                    emailSendQueue.bccAddress   = reader["BccAddress"].ToString();
                    emailSendQueue.subject      = reader["Subject"].ToString();
                    emailSendQueue.textBody     = reader["TextBody"].ToString();
                    emailSendQueue.htmlBody     = reader["HtmlBody"].ToString();
                    emailSendQueue.type         = reader["Type"].ToString();
                    emailSendQueue.dateToSend   = Convert.ToDateTime(reader["DateToSend"]);
                    emailSendQueue.createdUtc   = Convert.ToDateTime(reader["CreatedUtc"]);
                    emailSendQueueList.Add(emailSendQueue);
                }
            }
            finally
            {
                reader.Close();
            }

            return(emailSendQueueList);
        }
コード例 #2
0
ファイル: EmailSendQueue.cs プロジェクト: saiesh86/TravelBlog
        private static List<EmailSendQueue> LoadListFromReader(IDataReader reader)
        {
            List<EmailSendQueue> emailSendQueueList = new List<EmailSendQueue>();
            try
            {
                while (reader.Read())
                {
                    EmailSendQueue emailSendQueue = new EmailSendQueue();
                    emailSendQueue.guid = new Guid(reader["Guid"].ToString());
                    emailSendQueue.siteGuid = new Guid(reader["SiteGuid"].ToString());
                    emailSendQueue.moduleGuid = new Guid(reader["ModuleGuid"].ToString());
                    emailSendQueue.userGuid = new Guid(reader["UserGuid"].ToString());
                    emailSendQueue.specialGuid1 = new Guid(reader["SpecialGuid1"].ToString());
                    emailSendQueue.specialGuid2 = new Guid(reader["SpecialGuid2"].ToString());
                    emailSendQueue.fromAddress = reader["FromAddress"].ToString();
                    emailSendQueue.replyTo = reader["ReplyTo"].ToString();
                    emailSendQueue.toAddress = reader["ToAddress"].ToString();
                    emailSendQueue.ccAddress = reader["CcAddress"].ToString();
                    emailSendQueue.bccAddress = reader["BccAddress"].ToString();
                    emailSendQueue.subject = reader["Subject"].ToString();
                    emailSendQueue.textBody = reader["TextBody"].ToString();
                    emailSendQueue.htmlBody = reader["HtmlBody"].ToString();
                    emailSendQueue.type = reader["Type"].ToString();
                    emailSendQueue.dateToSend = Convert.ToDateTime(reader["DateToSend"]);
                    emailSendQueue.createdUtc = Convert.ToDateTime(reader["CreatedUtc"]);
                    emailSendQueueList.Add(emailSendQueue);

                }
            }
            finally
            {
                reader.Close();
            }

            return emailSendQueueList;
        }