ASP.NET图书租赁管理系统(9)

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

计算机毕业设计介绍:

 书架设置部分代码:     
   public void bindcase()
    {
        string strSql = "select * from tb_bookcase";
        DataSet ds = dataOperate.getDataset(strSql);
        this.GridView1.DataSource = ds;
        this.GridView1.DataKeyNames = new string[] { "bookcaseID" };
        this.GridView1.DataBind();
    }
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        string bookcaseID = this.GridView1.DataKeys[e.RowIndex].Value.ToString();
        string strSql = "select count(*) from tb_bookInfo where bookcase='" + bookcaseID + "'";
        if (dataOperate.seleSQL(strSql) <= 0)
        {
            string strDel = "delete tb_bookcase where bookcaseID='" + bookcaseID + "'";
            if(dataOperate.execSQL(strDel))
            {
                bindcase();
                Response.Write("");
            }
            else
            {
                Response.Write("");
            }
        }
        else
        {
            //Response.Write("");
            RegisterStartupScript("","");
        }
    }

读者类型添加/修改部分代码:
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        string id = this.GridView1.DataKeys[e.RowIndex].Value.ToString();
        string strSql = "select count(*) from tb_readerInfo where readerType='"+id+"'";
        if (dataOperate.seleSQL(strSql)<=0)
        {
            string strDel = "delete tb_readerType where id='" + id + "'";
            if (dataOperate.execSQL(strDel))
            {
                Response.Write("");
            }
            else
            {
                Response.Write("");
            }
        }
        else
        {
            Response.Write("");
        }
    }

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

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

【联系方式】

【本站信誉】

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