Пример #1
0
        public bool Insert(int SystemEmailTypeID, int ConferenceID, int LanguageID, string Name, string Description, string EmailContent)
        {
            EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC();
            int EmailTemplateID = 0;

            return(emailtemplateComponent.InsertNewEmailTemplate(ref EmailTemplateID, SystemEmailTypeID, ConferenceID, LanguageID, Name, Description, EmailContent));
        }
Пример #2
0
        public List <EmailTemplate> GetAll()
        {
            EmailTemplateDAC     _emailTemplateComponent = new EmailTemplateDAC();
            IDataReader          reader             = _emailTemplateComponent.GetAllEmailTemplate().CreateDataReader();
            List <EmailTemplate> _emailTemplateList = new List <EmailTemplate>();

            while (reader.Read())
            {
                if (_emailTemplateList == null)
                {
                    _emailTemplateList = new List <EmailTemplate>();
                }
                EmailTemplate _emailTemplate = new EmailTemplate();
                if (reader["EmailTemplateId"] != DBNull.Value)
                {
                    _emailTemplate.EmailTemplateId = Convert.ToInt32(reader["EmailTemplateId"]);
                }
                if (reader["SiteId"] != DBNull.Value)
                {
                    _emailTemplate.SiteId = Convert.ToInt32(reader["SiteId"]);
                }
                if (reader["Title"] != DBNull.Value)
                {
                    _emailTemplate.Title = Convert.ToString(reader["Title"]);
                }
                if (reader["TemplateContent"] != DBNull.Value)
                {
                    _emailTemplate.TemplateContent = Convert.ToString(reader["TemplateContent"]);
                }
                _emailTemplate.NewRecord = false;
                _emailTemplateList.Add(_emailTemplate);
            }
            reader.Close();
            return(_emailTemplateList);
        }
Пример #3
0
        public EmailTemplate GetByID(int _emailTemplateId)
        {
            EmailTemplateDAC _emailTemplateComponent = new EmailTemplateDAC();
            IDataReader      reader         = _emailTemplateComponent.GetByIDEmailTemplate(_emailTemplateId);
            EmailTemplate    _emailTemplate = null;

            while (reader.Read())
            {
                _emailTemplate = new EmailTemplate();
                if (reader["EmailTemplateId"] != DBNull.Value)
                {
                    _emailTemplate.EmailTemplateId = Convert.ToInt32(reader["EmailTemplateId"]);
                }
                if (reader["SiteId"] != DBNull.Value)
                {
                    _emailTemplate.SiteId = Convert.ToInt32(reader["SiteId"]);
                }
                if (reader["Title"] != DBNull.Value)
                {
                    _emailTemplate.Title = Convert.ToString(reader["Title"]);
                }
                if (reader["TemplateContent"] != DBNull.Value)
                {
                    _emailTemplate.TemplateContent = Convert.ToString(reader["TemplateContent"]);
                }
                _emailTemplate.NewRecord = false;
            }
            reader.Close();
            return(_emailTemplate);
        }
Пример #4
0
        public bool Insert(EmailTemplate emailtemplate)
        {
            int autonumber = 0;
            EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC();
            bool             endedSuccessfuly       = emailtemplateComponent.InsertNewEmailTemplate(ref autonumber, emailtemplate.SiteId, emailtemplate.Title, emailtemplate.TemplateContent);

            if (endedSuccessfuly)
            {
                emailtemplate.EmailTemplateId = autonumber;
            }
            return(endedSuccessfuly);
        }
Пример #5
0
        public bool Insert(EmailTemplate emailtemplate)
        {
            int autonumber = 0;
            EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC();
            bool             endedSuccessfuly       = emailtemplateComponent.InsertNewEmailTemplate(ref autonumber, emailtemplate.SystemEmailTypeID, emailtemplate.ConferenceID, emailtemplate.LanguageID, emailtemplate.Name, emailtemplate.Description, emailtemplate.EmailContent);

            if (endedSuccessfuly)
            {
                emailtemplate.EmailTemplateID = autonumber;
            }
            return(endedSuccessfuly);
        }
Пример #6
0
        public EmailTemplate GetTemplate(int TemplateTypeID, int ConferenceID, int LanguageID)
        {
            EmailTemplateDAC _emailTemplateComponent = new EmailTemplateDAC();
            IDataReader      reader = _emailTemplateComponent.GetAllEmailTemplate(string.Format("SystemEmailTypeID = {0} and ConferenceID = {1} and LanguageID = {2}", TemplateTypeID, ConferenceID, LanguageID)).CreateDataReader();

            EmailTemplate _emailTemplate = null;

            while (reader.Read())
            {
                _emailTemplate = new EmailTemplate();
                if (reader["EmailTemplateID"] != DBNull.Value)
                {
                    _emailTemplate.EmailTemplateID = Convert.ToInt32(reader["EmailTemplateID"]);
                }
                if (reader["SystemEmailTypeID"] != DBNull.Value)
                {
                    _emailTemplate.SystemEmailTypeID = Convert.ToInt32(reader["SystemEmailTypeID"]);
                }
                if (reader["ConferenceID"] != DBNull.Value)
                {
                    _emailTemplate.ConferenceID = Convert.ToInt32(reader["ConferenceID"]);
                }
                if (reader["LanguageID"] != DBNull.Value)
                {
                    _emailTemplate.LanguageID = Convert.ToInt32(reader["LanguageID"]);
                }
                if (reader["Name"] != DBNull.Value)
                {
                    _emailTemplate.Name = Convert.ToString(reader["Name"]);
                }
                if (reader["Description"] != DBNull.Value)
                {
                    _emailTemplate.Description = Convert.ToString(reader["Description"]);
                }
                if (reader["EmailContent"] != DBNull.Value)
                {
                    _emailTemplate.EmailContent = Convert.ToString(reader["EmailContent"]);
                }
                _emailTemplate.NewRecord = false;
            }
            reader.Close();
            if (_emailTemplate == null && LanguageID != Convert.ToInt32(Common.DefaultLanguageId))
            {
                return(GetTemplate(TemplateTypeID, ConferenceID, Convert.ToInt32(Common.DefaultLanguageId)));
            }
            return(_emailTemplate);
        }
Пример #7
0
        public List <EmailTemplate> GetAll()
        {
            EmailTemplateDAC     _emailTemplateComponent = new EmailTemplateDAC();
            IDataReader          reader             = _emailTemplateComponent.GetAllEmailTemplate().CreateDataReader();
            List <EmailTemplate> _emailTemplateList = new List <EmailTemplate>();

            while (reader.Read())
            {
                if (_emailTemplateList == null)
                {
                    _emailTemplateList = new List <EmailTemplate>();
                }
                EmailTemplate _emailTemplate = new EmailTemplate();
                if (reader["EmailTemplateID"] != DBNull.Value)
                {
                    _emailTemplate.EmailTemplateID = Convert.ToInt32(reader["EmailTemplateID"]);
                }
                if (reader["SystemEmailTypeID"] != DBNull.Value)
                {
                    _emailTemplate.SystemEmailTypeID = Convert.ToInt32(reader["SystemEmailTypeID"]);
                }
                if (reader["ConferenceID"] != DBNull.Value)
                {
                    _emailTemplate.ConferenceID = Convert.ToInt32(reader["ConferenceID"]);
                }
                if (reader["LanguageID"] != DBNull.Value)
                {
                    _emailTemplate.LanguageID = Convert.ToInt32(reader["LanguageID"]);
                }
                if (reader["Name"] != DBNull.Value)
                {
                    _emailTemplate.Name = Convert.ToString(reader["Name"]);
                }
                if (reader["Description"] != DBNull.Value)
                {
                    _emailTemplate.Description = Convert.ToString(reader["Description"]);
                }
                if (reader["EmailContent"] != DBNull.Value)
                {
                    _emailTemplate.EmailContent = Convert.ToString(reader["EmailContent"]);
                }
                _emailTemplate.NewRecord = false;
                _emailTemplateList.Add(_emailTemplate);
            }
            reader.Close();
            return(_emailTemplateList);
        }
Пример #8
0
        public EmailTemplate GetByID(int _emailTemplateID)
        {
            EmailTemplateDAC _emailTemplateComponent = new EmailTemplateDAC();
            IDataReader      reader         = _emailTemplateComponent.GetByIDEmailTemplate(_emailTemplateID);
            EmailTemplate    _emailTemplate = null;

            while (reader.Read())
            {
                _emailTemplate = new EmailTemplate();
                if (reader["EmailTemplateID"] != DBNull.Value)
                {
                    _emailTemplate.EmailTemplateID = Convert.ToInt32(reader["EmailTemplateID"]);
                }
                if (reader["SystemEmailTypeID"] != DBNull.Value)
                {
                    _emailTemplate.SystemEmailTypeID = Convert.ToInt32(reader["SystemEmailTypeID"]);
                }
                if (reader["ConferenceID"] != DBNull.Value)
                {
                    _emailTemplate.ConferenceID = Convert.ToInt32(reader["ConferenceID"]);
                }
                if (reader["LanguageID"] != DBNull.Value)
                {
                    _emailTemplate.LanguageID = Convert.ToInt32(reader["LanguageID"]);
                }
                if (reader["Name"] != DBNull.Value)
                {
                    _emailTemplate.Name = Convert.ToString(reader["Name"]);
                }
                if (reader["Description"] != DBNull.Value)
                {
                    _emailTemplate.Description = Convert.ToString(reader["Description"]);
                }
                if (reader["EmailContent"] != DBNull.Value)
                {
                    _emailTemplate.EmailContent = Convert.ToString(reader["EmailContent"]);
                }
                _emailTemplate.NewRecord = false;
            }
            reader.Close();
            return(_emailTemplate);
        }
Пример #9
0
        public bool Update(int SiteId, string Title, string TemplateContent, int Original_EmailTemplateId)
        {
            EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC();

            return(emailtemplateComponent.UpdateEmailTemplate(SiteId, Title, TemplateContent, Original_EmailTemplateId));
        }
Пример #10
0
        public bool Update(EmailTemplate emailtemplate, int old_emailTemplateId)
        {
            EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC();

            return(emailtemplateComponent.UpdateEmailTemplate(emailtemplate.SiteId, emailtemplate.Title, emailtemplate.TemplateContent, old_emailTemplateId));
        }
Пример #11
0
        public bool Insert(ref int EmailTemplateId, int SiteId, string Title, string TemplateContent)
        {
            EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC();

            return(emailtemplateComponent.InsertNewEmailTemplate(ref EmailTemplateId, SiteId, Title, TemplateContent));
        }
Пример #12
0
        public int UpdateDataset(System.Data.DataSet dataset)
        {
            EmailTemplateDAC emailtemplatecomponent = new EmailTemplateDAC();

            return(emailtemplatecomponent.UpdateDataset(dataset));
        }
Пример #13
0
        public void Delete(int Original_EmailTemplateId)
        {
            EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC();

            emailtemplateComponent.DeleteEmailTemplate(Original_EmailTemplateId);
        }
Пример #14
0
        public bool Update(int SystemEmailTypeID, int ConferenceID, int LanguageID, string Name, string Description, string EmailContent, int Original_EmailTemplateID)
        {
            EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC();

            return(emailtemplateComponent.UpdateEmailTemplate(SystemEmailTypeID, ConferenceID, LanguageID, Name, Description, EmailContent, Original_EmailTemplateID));
        }
Пример #15
0
        public bool Update(EmailTemplate emailtemplate, int old_emailTemplateID)
        {
            EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC();

            return(emailtemplateComponent.UpdateEmailTemplate(emailtemplate.SystemEmailTypeID, emailtemplate.ConferenceID, emailtemplate.LanguageID, emailtemplate.Name, emailtemplate.Description, emailtemplate.EmailContent, old_emailTemplateID));
        }