예제 #1
0
 private void ShowInfo(int _id)
 {
     Rain.Model.mail_template model = new Rain.BLL.mail_template().GetModel(_id);
     this.txtTitle.Text     = model.title;
     this.txtCallIndex.Text = model.call_index;
     this.txtMailTitle.Text = model.maill_title;
     this.txtContent.Value  = model.content;
 }
예제 #2
0
 private bool DoAdd()
 {
     Rain.Model.mail_template model        = new Rain.Model.mail_template();
     Rain.BLL.mail_template   mailTemplate = new Rain.BLL.mail_template();
     model.title       = this.txtTitle.Text.Trim();
     model.call_index  = this.txtCallIndex.Text.Trim();
     model.maill_title = this.txtMailTitle.Text.Trim();
     model.content     = this.txtContent.Value;
     if (mailTemplate.Add(model) <= 0)
     {
         return(false);
     }
     this.AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加邮件模板:" + model.title);
     return(true);
 }
예제 #3
0
        private bool DoEdit(int _id)
        {
            bool flag = false;

            Rain.BLL.mail_template   mailTemplate = new Rain.BLL.mail_template();
            Rain.Model.mail_template model        = mailTemplate.GetModel(_id);
            model.title       = this.txtTitle.Text.Trim();
            model.call_index  = this.txtCallIndex.Text.Trim();
            model.maill_title = this.txtMailTitle.Text.Trim();
            model.content     = this.txtContent.Value;
            if (mailTemplate.Update(model))
            {
                this.AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改邮件模板:" + model.title);
                flag = true;
            }
            return(flag);
        }