Web/Admin/Partner/pttype_add.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Maticsoft.Web.Admin.Partner
{
    public partial class pttype_add : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Model.MasterUser adminmod = (Model.MasterUser)Session["User"];
            if (adminmod == null)
            {
                Response.Redirect("/Admin/Login.aspx");
                return;
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {

            Model.PartnerType mdlfl_t = new Model.PartnerType();
            mdlfl_t.Title = Request.Form["tbftname"];
            mdlfl_t.Orderby = int.Parse(Request.Form["tborderby"]);
            mdlfl_t.Atinfo = Request.Form["description"];
            BLL.PartnerType abll = new BLL.PartnerType();
            if (abll.Add(mdlfl_t) > 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "parent.Dialog.alert('添加成功!');this.location.href='Pttype_center.aspx';", true);
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "parent.Dialog.alert('添加失败!');this.location.href='Pttype_center.aspx';", true);
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。