ASP.NET快件信息管理系统(10)

来源:xiaoniu168.com 作者:本站原创 添加时间:2011-12-01 点击数:25406

计算机毕业设计员工信息介绍:

3. 员工信息管理
此模块可以添加、修改、删除员工信息,业务部门的员工可以使用分配的权限登录系统进行快递维护操作。

以下是引用片段:

删除文件时的相关代码如下:
protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //显示当前的员工信息列表           
            this.DropDownList1.DataTextField = "部门名称";
            this.DropDownList1.DataValueField = "部门编号";
            this.DropDownList1.DataSource = DataControl.GetData("select * from 部门信息");
            this.DropDownList1.DataBind();

            this.GridView1.DataSource = DataControl.GetData("select * from 员工信息,部门信息 where 员工信息.部门编号=部门信息.部门编号");
            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.R?ID=" + idKey);
        }
        else if (e.CommandName == "Del")
        {
            //删除当前员工信息
            DataControl.Execute("delete from 员工信息 where 员工号='" + idKey + "'");
            this.GridView1.DataSource = DataControl.GetData("select * from 员工信息,部门信息 where 员工信息.部门编号=部门信息.部门编号");
            this.GridView1.DataBind();
        }
    }

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

第11页为计算机毕业论文快递单功能查询......

【联系方式】

【本站信誉】

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