毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

.NET+SQL SERVER 2000图书管理系统流程图+功能图+ER+全套设计论文 第24页

更新时间:2007-9-25:  来源:毕业论文

 Dim nowdate As Date = Date.Now

        Dim ReturnDate As Date = nowdate.AddDays(datenum)

        Dim sqlstr As String = "insert into LendInfo(BookID,UserID,LendDate,ReturnDate,IsBack)values( "

        sqlstr += "'" + BookID + "'"

        sqlstr += ",'" + UserID + "'"

        sqlstr += ",'" + nowdate.ToShortDateString + "'"

        sqlstr += ",'" + ReturnDate.ToShortDateString + "'"

        sqlstr += ",0)"

        ExecNonSql(sqlstr)

 

        Return True

    End Function

    Public Function GetMax(ByVal UserID As String) As Integer

        Dim sqlstr As String = "select BookNum from Users where UserID='" + UserID + "'"

 

        Dim myreader As SqlDataReader = ExecReaderSql(sqlstr)

        Dim num As Integer = 0

        If myreader.Read Then

            num = myreader("BookNum")

        End If

        myConn.Close()

        Return num

    End Function

 

 

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim str As String = ""

        Dim BookID As String = GetBookID()

 

        If GetCurNum(txtUserID.Text) >= GetMax(txtUserID.Text.ToString) Then

            Response.Write("<script>javascript:alert('借书数已满!!!');</script>")

            Return

        End If

        Dim state As Integer = GetBookState(BookID)

        If state = 1 Then

            LendBook(txtUserID.Text.ToString.Trim, BookID)

     

        Else

            Select Case state

                Case -2 : Response.Write("<script>javascript:alert('此书不在流通状态或此书不存在!!!');</script>")

                Case -1 : Response.Write("<script>javascript:alert('此书不在书架上!!!

 << 上一页  [21] [22] [23] [24] [25] 下一页

.NET+SQL SERVER 2000图书管理系统流程图+功能图+ER+全套设计论文 第24页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。