📄 frmphclerk.frm
字号:
Set TreeView1.ImageList = ImageList1
Set TreeSub1 = TreeView1.Nodes.Add(Tree, tvwChild, "ffff" & Str(i), HeTongNumber(i))
TreeSub1.Image = 1
TreeSub1.EnsureVisible
Next i
End If
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
mX = X
mY = Y
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
frmPHclerk.Move frmPHclerk.Left - mX + X, frmPHclerk.Top - mY + Y
End If
Picture1.Cls
Picture2.Cls
Picture3.Cls
Picture4.Cls
Picture5.Cls
Picture6.Cls
Picture7.Cls
End Sub
Private Sub Form_Paint()
'''''商品编号'''
jframe.danum = 3
jframe.rtop = 50
jframe.rleft = 35
jframe.rright = 539
jframe.rbottom = 97
jframe.ddraw frmPHclerk
''''''''
jframe.danum = 3
jframe.rtop = 102
jframe.rleft = 35
jframe.rright = 539
jframe.rbottom = 390
jframe.ddraw frmPHclerk
End Sub
Private Sub Image1_Click()
Unload Me
End Sub
Private Sub Image2_Click()
frmPHclerk.WindowState = 1
End Sub
Private Sub ListView1_DblClick()
Flagh = 2
'''''''
listviewtext(0) = ListView1.SelectedItem.Text
listviewtext(1) = ListView1.SelectedItem.ListSubItems(1).Text
listviewtext(2) = ListView1.SelectedItem.ListSubItems(2).Text
frmPHclerkIn.Show
End Sub
Private Sub Picture1_Click()
Flagh = 1
frmPHclerkIn.Show
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Cls
Picture3.Cls
Picture4.Cls
Picture5.Cls
Picture6.Cls
Picture7.Cls
jframe.danum = 5
jframe.rtop = 1
jframe.rleft = 1
jframe.rright = 43
jframe.rbottom = 39
jframe.ddrawc Picture1
End Sub
Private Sub Picture2_Click()
Flagh = 2
'''''''
listviewtext(0) = ListView1.SelectedItem.Text
listviewtext(1) = ListView1.SelectedItem.ListSubItems(1).Text
listviewtext(2) = ListView1.SelectedItem.ListSubItems(2).Text
frmPHclerkIn.Show
End Sub
Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Cls
Picture3.Cls
Picture4.Cls
Picture5.Cls
Picture6.Cls
Picture7.Cls
jframe.danum = 5
jframe.rtop = 1
jframe.rleft = 1
jframe.rright = 43
jframe.rbottom = 39
jframe.ddrawc Picture2
End Sub
Private Sub Picture3_Click()
On Error GoTo errmsg
Dim WorkText As String
Dim hrecord As Integer
If ListView1.ListItems.Count <> 0 Then
WorkText = ListView1.SelectedItem.SubItems(2)
sql = "select * from YWtable where 业务员='" & Trim(ListView1.SelectedItem.Text) & "'"
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
If result.RowCount <> 0 Then
MsgBox "该资料已经在往来业务中使用,不能删除!!"
Else
If MsgBox("确定是否删除?", 36, "删除!") = 6 Then
sql = "delete from worktable where 类别='" & Trim(ListView1.SelectedItem.SubItems(2)) & "' and 姓名='" & Trim(ListView1.SelectedItem.Text) & "'"
'MsgBox sql
'Set recordh = databa.OpenRecordset(sql)
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
End If
End If
'''''''''
sql = "select * from worktable where 类别='" & Trim(WorkText) & "'"
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
If result.RowCount <> 0 Then
result.MoveLast
hrecord = result.RowCount + 1
result.MoveFirst
End If
frmPHclerk.ListView1.ListItems.Clear
If result.RowCount <> 0 Then
Do While Not result.EOF()
Set itm = frmPHclerk.ListView1.ListItems.Add(, , result("姓名"))
itm.SubItems(1) = Trim(result("编号"))
itm.SubItems(2) = Trim(result("类别"))
result.MoveNext
Loop
End If
End If
errmsg:
If Err.Number <> 0 Then
MsgBox "该资料已经在往来业务中使用,不能删除!!"
End If
End Sub
Private Sub Picture3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Cls
Picture1.Cls
Picture4.Cls
Picture5.Cls
Picture6.Cls
Picture7.Cls
jframe.danum = 5
jframe.rtop = 1
jframe.rleft = 1
jframe.rright = 43
jframe.rbottom = 39
jframe.ddrawc Picture3
End Sub
Private Sub Picture4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Cls
Picture3.Cls
Picture1.Cls
Picture5.Cls
Picture6.Cls
Picture7.Cls
jframe.danum = 5
jframe.rtop = 1
jframe.rleft = 1
jframe.rright = 43
jframe.rbottom = 39
jframe.ddrawc Picture4
End Sub
Private Sub Picture5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Cls
Picture3.Cls
Picture4.Cls
Picture1.Cls
Picture6.Cls
Picture7.Cls
jframe.danum = 5
jframe.rtop = 1
jframe.rleft = 1
jframe.rright = 43
jframe.rbottom = 39
jframe.ddrawc Picture5
End Sub
Private Sub Picture6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Cls
Picture3.Cls
Picture4.Cls
Picture5.Cls
Picture1.Cls
Picture7.Cls
jframe.danum = 5
jframe.rtop = 1
jframe.rleft = 1
jframe.rright = 43
jframe.rbottom = 39
jframe.ddrawc Picture6
End Sub
Private Sub Picture7_Click()
Unload Me
End Sub
Private Sub Picture7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Cls
Picture3.Cls
Picture4.Cls
Picture5.Cls
Picture6.Cls
Picture1.Cls
jframe.danum = 5
jframe.rtop = 1
jframe.rleft = 1
jframe.rright = 43
jframe.rbottom = 39
jframe.ddrawc Picture7
End Sub
Private Sub TreeView1_DblClick()
On Error GoTo errmsg
sql = "select * from worktable where 类别='" & Trim(GoodsTree) & "'"
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
ListView1.ListItems.Clear
If result.RowCount <> 0 Then
Do While Not result.EOF()
Set itm = frmPHclerk.ListView1.ListItems.Add(, , result("姓名"))
itm.SubItems(1) = Trim(result("编号"))
itm.SubItems(2) = Trim(result("类别"))
result.MoveNext
Loop
End If
errmsg:
If Err.Number <> 0 Then
ListView1.ListItems.Clear
If GoodsTree = "业务员" Then
Set itm = frmPHclerk.ListView1.ListItems.Add(, , "张民")
itm.SubItems(1) = "1"
itm.SubItems(2) = "业务员"
End If
If GoodsTree = "设计员" Then
Set itm = frmPHclerk.ListView1.ListItems.Add(, , "张小勤")
itm.SubItems(1) = "1"
itm.SubItems(2) = "设计员"
End If
End If
End Sub
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
GoodsTree = Node.Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -