Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Configpara.Setdll(ddlParatype);
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CommonClass.isAllow(User.Identity.Name, this, "参数配置");
         Configpara.Setdll(ddlParatype);
         databind();
     }
 }
Пример #3
0
    protected void btnDel_Click(object sender, EventArgs e)
    {
        string result = string.Empty;

        for (int i = 0; i <= grd.Rows.Count - 1; i++)
        {
            CheckBox cbx = (CheckBox)grd.Rows[i].FindControl("cbx");
            if (cbx.Checked == true)
            {
                result = Configpara.Delete(grd.Rows[i].Cells[1].Text, grd.Rows[i].Cells[2].Text);
                if (result != "success")
                {
                    JScript.Alert("删除参数失败!", this);
                }
            }
        }
        if (result == "success")
        {
            JScript.Alert("参数已成功删除!", this);
            databind();
        }
    }
Пример #4
0
    protected void btnConfirm_Click(object sender, EventArgs e)
    {
        DataTable dt = Configpara.Exist(ddlParatype.SelectedValue, txtParaID.Text);

        if (dt.Rows.Count > 0)
        {
            JScript.Alert("参数已存在!", this);
            return;
        }

        string result = Configpara.Add(ddlParatype.SelectedValue, txtParaID.Text, txtParaname.Text
                                       , System.Web.HttpContext.Current.Request.Cookies["userID"].Value.ToString());

        if (result == "success")
        {
            JScript.Alert("添加成功!", this);
            return;
        }
        else
        {
            JScript.Alert("添加失败!", this);
            return;
        }
    }
Пример #5
0
 private void databind()
 {
     grd.DataSource = Configpara.Query(ddlParatype.SelectedValue);
     grd.DataBind();
 }