Basf_TCC11/HJGL/FineUIPro.Web/Email_Send/Email_Params_Edit.aspx.cs

71 lines
2.8 KiB
C#
Raw Normal View History

2024-07-02 16:33:32 +08:00
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Email_Send
{
public partial class Email_Params_Edit : PageBase
{
#region
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//按钮权限
Model.Email_Params pops = new Model.Email_Params();
string emailId = Request.Params["id"];
pops = BLL.Email_Send.Email_ParamsService.GetEmail_ParamsPop(emailId);
if (pops != null)
{
//this.lblID.Text = pops.ID;
this.txtMailClassName.Text = pops.MailClassName;
this.txtMailClassID.Text = pops.MailClassID;
}
}
}
#endregion
protected void btnSubmit_Click(object sender, EventArgs e)
{
Model.Email_Params pops = new Model.Email_Params();
string emailId = Request.Params["id"];
pops = BLL.Email_Send.Email_ParamsService.GetEmail_ParamsPop(emailId);
if (pops == null)
{
Email_Params pop = new Email_Params();
pop.MailClassName = this.txtMailClassName.Text;
pop.MailClassID = this.txtMailClassID.Text;
pop.CreateName = this.CurrUser.UserName;
pop.CreateTime = DateTime.Now;
pop.UpdateName = this.CurrUser.UserName;
pop.UpdateTime = DateTime.Now;
BLL.Email_Send.Email_ParamsService.AddEmail_Params(pop);
//BLL.Sys_LogService.AddLog(Const.System_2, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.SendEmailPopMenuId,, "Add Parameter information",);
ShowNotify("发送成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
pops.MailClassName = this.txtMailClassName.Text;
pops.MailClassID = this.txtMailClassID.Text;
pops.CreateName = this.CurrUser.UserName;
pops.UpdateName = this.CurrUser.UserName;
pops.UpdateTime = DateTime.Now;
BLL.Email_Send.Email_ParamsService.UpdateEmail_Params(pops);
//BLL.Sys_LogService.AddLog(Const.System_2, this.CurrUser.LoginProjectId, this.CurrUser.UserId,Const.menuId, "Update Parameter information");
ShowNotify("发送成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}
}
}