Exemplo n.º 1
0
    protected void Bt_add_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            Editor ed = new Editor();
            ed.LoadInfo(Request.Cookies["userID"].Value.ToString());
            string column = ed.editorColumn;

            Hashtable ht = new Hashtable();
            ht.Add("expertID", SQLString.GetQuotedString(txtID.Text));
            ht.Add("expertPwd", SQLString.GetQuotedString(txtID.Text));//51(aspx)
            ht.Add("expertName", SQLString.GetQuotedString(txtName.Text));
            ht.Add("expertColumn", SQLString.GetQuotedString(column));
            Expert ep = new Expert();
            if (ep.Add(ht))
            {
                Response.Write("<script>alert('添加成功!');window.location=window.location;</script>");
            }
            else
            {
                Response.Write("<script>alert('添加失败!');window.location=window.location;</script>");
            }
            txtID.Text   = "";
            txtName.Text = "";
        }
    }
    protected void Bt_add_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            Editor ed = new Editor();
            ed.LoadInfo(Request.Cookies["userID"].Value.ToString());
            string column = ed.editorColumn;

            Hashtable ht = new Hashtable();
            ht.Add("expertID", SQLString.GetQuotedString(txtID.Text));
            ht.Add("expertPwd", SQLString.GetQuotedString(txtID.Text));//51(aspx)
            ht.Add("expertName", SQLString.GetQuotedString(txtName.Text));
            ht.Add("expertColumn", SQLString.GetQuotedString(column));
            Expert ep = new Expert();
            if (ep.Add(ht))
            {
                Response.Write("<script>alert('添加成功!');window.location=window.location;</script>");
            }
            else
            {

                Response.Write("<script>alert('添加失败!');window.location=window.location;</script>");
            }
            txtID.Text = "";
            txtName.Text = "";
        }
    }
 protected void Bt_add_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         Hashtable ht = new Hashtable();
         ht.Add("expertID", SQLString.GetQuotedString(txtID.Text));
         ht.Add("expertPwd", SQLString.GetQuotedString(txtID.Text));
         ht.Add("expertName", SQLString.GetQuotedString(txtName.Text));
         ht.Add("expertColumn", SQLString.GetQuotedString(ddlcolumn.SelectedValue));
         Expert ep = new Expert();
         if (ep.Add(ht))
         {
             Response.Write("<script>alert('添加成功!');window.location=window.location;</script>");
         }
         else
         {
             Response.Write("<script>alert('添加失败!');window.location=window.location;</script>");
         }
         txtID.Text   = "";
         txtName.Text = "";
     }
 }
    protected void Bt_add_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            Hashtable ht = new Hashtable();
            ht.Add("expertID", SQLString.GetQuotedString(txtID.Text));
            ht.Add("expertPwd", SQLString.GetQuotedString(txtID.Text));
            ht.Add("expertName", SQLString.GetQuotedString(txtName.Text));
            ht.Add("expertColumn", SQLString.GetQuotedString(ddlcolumn.SelectedValue));
            Expert ep = new Expert();
            if (ep.Add(ht))
            {
                Response.Write("<script>alert('添加成功!');window.location=window.location;</script>");
            }
            else
            {

                Response.Write("<script>alert('添加失败!');window.location=window.location;</script>");
            }
            txtID.Text = "";
            txtName.Text = "";
        }
    }