Beispiel #1
0
        //public string CreateTemplate(string subject, int typeEmail, string content)
        //{
        //    var res = string.Empty;
        //    EmailRepository.Create(subject,typeEmail,content);
        //    return res;
        //}
        public string CreateTemplate(FormDataCollection form)
        {
            var res = string.Empty;
            var subject = form.Get("Subject");
            int typeEmail = Int32.Parse(form.Get("TypeEmail"));
            var content = form.Get("Content");

            var entity = new EmailInfo
            {
                Content = content,
                Subject = subject,
                EmailType = typeEmail,
            };

            EmailRepository.Create(entity);
            return res;
        }
Beispiel #2
0
        public string EditEmailTemplate(FormDataCollection form)
        {
            var rel = string.Empty;
            var id = Int32.Parse(form.Get("Id"));
            var subject = form.Get("Subject");
            var typeEmail = Int32.Parse(form.Get("TypeEmail"));
            var content = form.Get("Content");

            var entity = new EmailInfo
            {
                Id = id,
                Content = content,
                Subject = subject,
                EmailType = typeEmail,
            };
            EmailRepository.Edit(entity);

            return rel;
        }
Beispiel #3
0
 public static void Edit(EmailInfo info)
 {
     DataProvider.Instance().EmailTemplate_Update(info.Id,info.Subject, info.EmailType, info.Content);
 }
Beispiel #4
0
 public static void Create(EmailInfo info)
 {
     DataProvider.Instance().EmailTemplate_Insert( info.Subject, info.EmailType, info.Content);
 }