ASP.NET小区车辆管理系统(8)

来源:xiaoniu168.com 作者:本站原创 添加时间:2011-11-20 点击数:28921

计算机毕业设计人员列表功能介绍:

4.3 RyList(人员列表页面)
系统管理员登陆系统以后,左侧显示其功能菜单,点击【物业人员管理】,显示人员列表页面,包括帐号、名称、职位、介绍以及新人员、编辑和删除按钮。如图所示:
计算机毕业论文

以下是引用片段:

相关代码如下:
protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //显示人员信息列表
            this.GridView1.DataSource = DataControl.GetData("select * from 人员 where 帐号<>'admin'");
            this.GridView1.DataBind();
        }
    }

    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string idKey = this.GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)]["帐号"].ToString();
        if (e.CommandName == "Mod")
        {
            //传递修改的标志 跳转页面
            Response.Redirect("RyEdit.aspx?ID=" + idKey);
        }
        else if (e.CommandName == "Del")
        {
            //判断是否允许删除
            if (DataControl.GetData("select * from 固定车车位收费 where  帐号='" + idKey + "'").Rows.Count > 0)
            {
                Response.Write("");
                return;
            }
            if (DataControl.GetData("select * from 固定车进出情况 where  帐号='" + idKey + "'").Rows.Count > 0)
            {
                Response.Wr'当前人员的信息正在使用中');");
                return;
            }
            if (DataControl.GetData("select * from 临时车登记 where  帐号='" + idKey + "'").Rows.Count > 0)
            {
                Response.
                return;
            }
            //删除当前的人员信息  刷新列表
            DataControl.Execute("delete from 人员 where 帐号='" + idKey + "'");
            this.GridView1.DataSource = DataControl.GetData("select * from 人员 where 帐号<>'admin'");
            this.GridView1.DataBind();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        //跳转页面
        Response.
    }

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

第9页为计算机毕业论文固定列车模块介绍......

【联系方式】

【本站信誉】

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