当前位置:首页 > 仓库管理系统 数据库应用技术课程设计 报告 2
天津理工大学中环信息学院数据应用技术课程设计说明书
2、用户界面设计
图5 用户登录界面
图6 系统管理界面
5
天津理工大学中环信息学院数据应用技术课程设计说明书
图7 入库管理界面
6
天津理工大学中环信息学院数据应用技术课程设计说明书
图8 新建入库信息界面
图9 系统管理界面
3、程序代码设计与分析 1)系统登录
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim 管理员ID As String Dim 密码 As String
管理员ID = TextBox1.Text 密码 = TextBox2.Text Dim str As String
str = \管理员ID,密码 from 管理员 where 管理员ID='\管理员ID & \密码='\密码 & \
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 Form2
7
天津理工大学中环信息学院数据应用技术课程设计说明书
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
2)入库管理
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm1 As New Form7 frm1.Show() Me.Hide() End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If conn.State = ConnectionState.Closed Then conn.Open() End If
Dim a As String
a = \入库\ comm.Connection = conn
comm.CommandType = CommandType.Text comm.CommandText = a da.SelectCommand = comm ds.Tables.Clear()
DataGridView1.Invalidate() da.Fill(ds, \入库\
DataGridView1.DataSource = ds.Tables(\入库\ If conn.State = ConnectionState.Open Then conn.Close() End If End Sub
8
共分享92篇相关文档