ASP.NET物流配送管理系统(9)

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

计算机毕业设计货物类别维护:

5.5 货物类别维护(frmHwlb)
   管理员登陆系统后,点击左侧功能菜单中的货物类别维护,进入货物类别维护页面,包括类别名称,添加和删除按钮。添加时,判断类别名称是否为空、重复。如图所示:
计算机毕业论文

以下是引用片段:

其主要代码实现如下:
private void initList()
    {
        //显示货物类别列表
        this.GridView1.DataSource = DataBase.Get_Table("select * from 货物类别");
        this.GridView1.DataBind();
        this.txtBm.Text = "";
        this.Terr.
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        //添加货物类别信息
        if (this.txtBm.Text == "")
        {
            this.Terr.>";
            return;
        }
        if (DataBase.Get_Table("select * from 货物类别 where 类别名称='" + this.txtBm.Text + "'").Rows.Count > 0)
        {
            this.Terr.>";
            return;
        }
        DataBase.ExecSql("insert into 货物类别(类别名称) values('" + this.txtBm.Text + "')");
        initList();
    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Del")
        {
            //判断记录是否允许删除
            string code = this.GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString();
            //删除记录  刷新列表
            DataBase.ExecSql("delete from 货物类别 where 类别编号=" + code);
            initList();
        }
    }

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

第10页为计算机毕业论文配货车辆维护功能介绍......

【联系方式】

【本站信誉】

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