示例#1
0
 private void ShowInfo(int _id)
 {
     Rain.Model.sms_template model = new Rain.BLL.sms_template().GetModel(_id);
     this.txtTitle.Text     = model.title;
     this.txtCallIndex.Text = model.call_index;
     this.txtContent.Text   = model.content;
 }
示例#2
0
 private bool DoAdd()
 {
     Rain.Model.sms_template model       = new Rain.Model.sms_template();
     Rain.BLL.sms_template   smsTemplate = new Rain.BLL.sms_template();
     model.title      = this.txtTitle.Text.Trim();
     model.call_index = this.txtCallIndex.Text.Trim();
     model.content    = this.txtContent.Text;
     if (smsTemplate.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.sms_template   smsTemplate = new Rain.BLL.sms_template();
            Rain.Model.sms_template model       = smsTemplate.GetModel(_id);
            model.title      = this.txtTitle.Text.Trim();
            model.call_index = this.txtCallIndex.Text.Trim();
            model.content    = this.txtContent.Text;
            if (smsTemplate.Update(model))
            {
                this.AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改短信模板:" + model.title);
                flag = true;
            }
            return(flag);
        }