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

VB图书管理系统 第5页

更新时间:2008-3-1:  来源:毕业论文

VB图书管理系统 第5页
 
Dim select_row As String

  
Dim showgrid2 As Boolean

  
Dim rs_custom As New ADODB.Recordset

  Dim jinchu As String ' 进出库标志


  Dim modify As Boolean ' 修改状态标志

  Private Sub cmdexit_Click()

  
Unload Me

  
End Sub

  
Private Sub Form_Load()

  
On Error GoTo loaderror

  
Dim sql As String

  sql = "select * from 图书资料
"

  
rs_custom.CursorLocation = adUseClient

  
rs_custom.Open sql, conn, adOpenKeyset, adLockPessimistic

  
While Not rs_custom.EOF

  
Combo1.AddItem rs_custom.Fields(0)

  
rs_custom.MoveNext

  
Wend

  
findok = True

  modify = False ' 非修改状态


  showgrid2 = False

  displaygrid1 ' 调用显示Datagrid1子程序


  loaderror:

  
If Err.Number <> 0 Then

  
MsgBox Err.Description

  
End If

  
End Sub

  '显示msflexgrid1子程序


  Public Sub displaygrid1()

  
Dim i As Integer

  
On Error GoTo displayerror

  
setgrid

  
setgridhead

  
MSFlexGrid1.Row = 0

  
If Not rs_data1.EOF Then

  
rs_data1.MoveFirst

  
Do While Not rs_data1.EOF

  
MSFlexGrid1.Row = MSFlexGrid1.Row + 1

  
MSFlexGrid1.Col = 0

  
If Not IsNull(rs_data1.Fields(0)) Then MSFlexGrid1.Text = rs_data1.Fields(0) Else

  
MSFlexGrid1.Text = ""

  
MSFlexGrid1.Col = 1

  
If Not IsNull(rs_data1.Fields(1)) Then MSFlexGrid1.Text = rs_data1.Fields(1) Else

  
MSFlexGrid1.Text = ""

  
MSFlexGrid1.Col = 2

  
If Not IsNull(rs_data1.Fields(2)) Then MSFlexGrid1.Text = rs_data1.Fields(2) Else

  
MSFlexGrid1.Text = ""

  
MSFlexGrid1.Col = 3

  
If Not IsNull(rs_data1.Fields(3)) Then MSFlexGrid1.Text = rs_data1.Fields(3) Else

  
MSFlexGrid1.Text = ""

  
MSFlexGrid1.Col = 4

  
If Not IsNull(rs_data1.Fields(4)) Then MSFlexGrid1.Text = rs_data1.Fields(4) Else

  
MSFlexGrid1.Text = ""

  
MSFlexGrid1.Col = 5

  
If Not IsNull(rs_data1.Fields(5)) Then MSFlexGrid1.Text = rs_data1.Fields(5) Else

  
MSFlexGrid1.Text = ""

  
rs_data1.MoveNext

  
Loop

  
End If

  
displayerror:

  
If Err.Number <> 0 Then

  
MsgBox Err.Description

  
End If

  
End Sub

  
Public Sub setgrid()

  
Dim i As Integer

  
On Error GoTo seterror

  
With MSFlexGrid1

  
.ScrollBars = flexScrollBarBoth

  
.FixedCols = 0

  
.Rows = rs_data1.RecordCount + 1

  
.Cols = 6

  
.SelectionMode = flexSelectionByRow

  
For i = 0 To .Rows - 1

  
.RowHeight(i) = 315

  
Next

  
For i = 0 To .Cols - 1

  
.ColWidth(i) = 1300

  
Next i

  
End With

  
Exit Sub

  
seterror:

  
MsgBox Err.Description

  
End Sub

  
Public Sub setgridhead()

  
On Error GoTo setheaderror

  
MSFlexGrid1.Row = 0

  MSFlexGrid1.Col = 0

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页

VB图书管理系统 第5页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

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