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)); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
public bool Update(int SiteId, string Title, string TemplateContent, int Original_EmailTemplateId) { EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC(); return(emailtemplateComponent.UpdateEmailTemplate(SiteId, Title, TemplateContent, Original_EmailTemplateId)); }
public bool Update(EmailTemplate emailtemplate, int old_emailTemplateId) { EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC(); return(emailtemplateComponent.UpdateEmailTemplate(emailtemplate.SiteId, emailtemplate.Title, emailtemplate.TemplateContent, old_emailTemplateId)); }
public bool Insert(ref int EmailTemplateId, int SiteId, string Title, string TemplateContent) { EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC(); return(emailtemplateComponent.InsertNewEmailTemplate(ref EmailTemplateId, SiteId, Title, TemplateContent)); }
public int UpdateDataset(System.Data.DataSet dataset) { EmailTemplateDAC emailtemplatecomponent = new EmailTemplateDAC(); return(emailtemplatecomponent.UpdateDataset(dataset)); }
public void Delete(int Original_EmailTemplateId) { EmailTemplateDAC emailtemplateComponent = new EmailTemplateDAC(); emailtemplateComponent.DeleteEmailTemplate(Original_EmailTemplateId); }
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)); }
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)); }