计算机代码清单目录,(程序源代码清单.doc

(程序源代码清单

编号:

自学考试计算机信息处理

综合作业源程序清单

题 目: 图书管理信息系统

院 (系): 应科院

专 业: 信息管理

学生姓名: 颜诗琳

准考证号: 030100300233

指导教师: 梁海

职 称: 教师

系统部分源代码

1.登陆界面代码:

stem.Data.SqlClient

Public Class Form1

Inherits System.Windows.Forms.Form

Dim conn As New SqlConnection("Server=.;Database=Library Management System;Integrated Security=SSPI")

Dim comm As New SqlCommand

Dim ds As New DataSet

Dim da As New SqlDataAdapter

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

Dim user As String

Dim password As String

user = TextBox1.Text

password = TextBox2.Text

Dim str As String

str = "select * from 管理员信息 where user_id='" & user & "' and passwd='" & password & "'"

comm.Connection = conn

comm.CommandType = CommandType.Text

comm.CommandText = str

da.SelectCommand = comm

Try

conn.Open()

da.Fill(ds)

If ds.Tables(0).Rows.Count <> 0 Then

Dim frm1 As New frmMain

frm1.Show()

Me.Hide()

Else

MessageBox.Show("密码或用户名错误,请重新输入", "提示信息")

TextBox1.Text = ""

TextBox2.Text = ""

TextBox1.Focus()

End If

Catch ex As Exception

MessageBox.Show("登陆失败", "提示信息")

End Try

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Application.Exit()

End Sub

End Class

2.注销模块代码:

ystem.Data.SqlClient

Public Class frmRegistration

Inherits System.Windows.Forms.Form

Dim conn As New SqlConnection("Server=.;Database=Library Management System;Integrated Security=SSPI")

Dim comm As New SqlCommand

Dim ds As New DataSet

Dim ds1 As New DataSet

Dim da As New Sql

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值