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; }
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); }
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); }