ASP.NET小区物业管理系统(7)

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

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

(2)员工信息
管理员登陆系统以后,左侧显示其功能菜单,点击员工信息,显示物业公司员工列表页面,包括员工代码、员工名称、职位、地址、联系电话,新员工、修改和删除按钮。点击新员工或修改按钮,显示员工信息维护页面;点击删除按钮,删除其对应的员工信息。如图:

以下是引用片段:

 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string Key = this.GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString();
        if (e.CommandName == "Mod")
        {
            //传递修改的标志 跳转页面
            Response.        }
        else if (e.CommandName == "Del")
        {
            //判断员工信息是否已经被使用
            if (SQL.GetTable("select * from 住户 where 员工代码='" + Key + "'").Rows.Count > 0)
            {
                Terr.>";
                return;
            }
            if (SQL.GetTable("select * from 物业费 where 员工代码='" + Key + "'").Rows.Count > 0)
            {
                Terr.>";
                return;
            }
            if (SQL.GetTable("select * from 水电气费 where 员工代码='" + Key + "'").Rows.Count > 0)
            {
                Terr.>";
                return;
            }
            if (SQL.GetTable("select * from 车位管理 where 员工代码='" + Key + "'").Rows.Count > 0)
            {
                Terr.>";
                return;
            }
            if (SQL.GetTable("select * from  住户报修 where 员工代码='" + Key + "'").Rows.Count > 0)
            {
                Terr.>";
                return;
            }
            //删除员工信息  刷新列表
            SQL.ExecData("delete from 员工信息 where 员工代码='" + Key + "'");
            this.GridView1.DataSource = SQL.GetTable("select * from 员工信息");
            this.GridView1.DataBind();
        }
  if (!Page.IsPostBack)
        {
            //显示当前的员工信息
            if (Request.QueryString["ID"] != null)
            {
                DataTable dt = new DataTable();
                dt = SQL.GetTable("select * from 员工信息 where 员工代码='" + Request.QueryString["ID"] + "'");
                if (dt.Rows.Count > 0)
                {
                    TextBox9.Text = dt.Rows[0]["员工代码"].ToString();
                    TextBox10.Text = dt.Rows[0]["员工名称"].ToString();
                    TextBox4.Text = dt.Rows[0]["职位"].ToString();
                    TextBox1.Text = dt.Rows[0]["地址"].ToString();
                    TextBox2.Text = dt.Rows[0]["联系电话"].ToString();
                    TextBox8.Text = dt.Rows[0]["员工介绍"].ToString();
                    TextBox9.Enabled = false;
                }
            }
        }

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

第8页为计算机毕业论文住户信息功能介绍......

【联系方式】

【本站信誉】

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