using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class SYSadmin_Products_dymagdo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["WtoRightName"] == null)
        {
            Response.Redirect("~/SYSADMIN/main/error.aspx?err=非法登陆!或系统超时，请刷新后重新登录");
        }
        if (!IsPostBack)
        { 
            this.txttitle.Text=Request.QueryString["name"].ToString();
        }
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        if (Doadmin.Exec("update newsSole set title='" + this.txttitle.Text + "' where id=" + Request.QueryString["id"]))
        {
            if (Doadmin.Exec("update DataMasterAdditionalControl set tagname='" + this.txttitle.Text + "' where tagname='" + Request.QueryString["name"] + "'"))
            {
                Response.Write("<script>alert('操作成功');window.location.href='dymagdo.aspx'</script>");
            }
            else
            {
                Response.Write("<script>alert('未更改功能表');window.location.href='dymagdo.aspx'</script>");
            }
        }
        else
        {
            Response.Write("<script>alert('操作失败');window.location.href='dymagdo.aspx'</script>");
        }
    }
}
