ASP.NET用户信息管理系统(7)

来源:xiaoniu168.com 作者:本站原创 添加时间:2012-03-05 点击数:17559

计算机毕业设计介绍:

 protected void Button2_Click(object sender, EventArgs e)
    {
        string url=Request.RawUrl;
        Panel1.Visible = false;
        Response.Redirect(url+"&ac=edit");
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string _id = Request.QueryString["id"];
        Info user = new Info();
        Dal work = new Dal();
        user.ID=Convert.ToInt32(_id);
        user.Name = nametext.Text;
        user.Pwd = pwdtext.Text;
        user.IsAdmin = admintext.Text;
       int result= work.Update(user);
       if (result!=0)
       {
           string js = "show.aspx?id=" + Request.QueryString["id"];
           Panel1.Visible = true;
           Panel2.Visible = false;
           Jscript.AlertAndRedirect("修改成功!", js);
       }
       else
       {
           Jscript.AlertAndRedirect("修改失败!", Request.RawUrl);
       }
      
       
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        //Response.Write("单击了");
        string _id = Request.QueryString["id"];
        Info deluser = new Info();
        Dal Del= new Dal();
        deluser.ID = Convert.ToInt32(_id);
        int result = Del.Delete(deluser);
        if (result != 0)
        {
            Jscript.AlertAndRedirect("删除成功!,返回列表页面","View.aspx");
        }
        else
        {
            Jscript.AlertAndRedirect("删除失败!,返回", "View.aspx");
        }
}


5.3.5 用户搜索界面的实现
protected void Page_Load(object sender, EventArgs e)
    {
        UserLogin.LoginNo();
        ListBind(UserList);
        //if(!Page.IsPostBack)
        //{
        //    GridBind(GridView2);
        //}
    }
    protected void ListBind(Repeater  DL)
    {
        Dal dal = new Dal();
        DataSet Ds = dal.GetList();
        DL.DataSource = Ds;
        DL.DataBind();
    }

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第8页为计算机毕业论文部分......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网