📄 frmphcangku.frm
字号:
jframe.rtop = 102
jframe.rleft = 35
jframe.rright = 539
jframe.rbottom = 390
jframe.ddraw frmPHCangKu
End Sub
Private Sub Image1_Click()
Unload Me
End Sub
Private Sub Image2_Click()
frmPHCangKu.WindowState = 1
End Sub
Private Sub ListView1_DblClick()
ClothFlagh = 2
Dim CLothtext As String
If ListView1.ListItems.Count <> 0 Then
CLothtext = ListView1.SelectedItem.Text
sql = "select * from clothtable where 日期='" & Trim(CLothtext) & "' and 布料编号='" & Trim(ListView1.SelectedItem.SubItems(1)) & "'"
'MsgBox sql
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
If result.RowCount <> 0 Then
CLOTHtableText(0) = Trim(result("日期"))
CLOTHtableText(1) = Trim(result("布料编号"))
CLOTHtableText(2) = Trim(result("幅宽"))
CLOTHtableText(3) = Trim(result("布料原长度"))
CLOTHtableText(4) = Trim(result("布料名称"))
CLOTHtableText(5) = Trim(result("供应商"))
CLOTHtableText(6) = Trim(result("布料产地"))
End If
frmPHCangKuIn.Show
End If
End Sub
Private Sub Picture1_Click()
ClothFlagh = 1
frmPHCangKuIn.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()
On Error GoTo errmsg
ClothFlagh = 2
Dim CLothtext As String
If ListView1.ListItems.Count <> 0 Then
CLothtext = ListView1.SelectedItem.Text
sql = "select * from clothtable where 日期='" & Trim(CLothtext) & "' and 布料编号='" & Trim(ListView1.SelectedItem.SubItems(1)) & "'"
'MsgBox sql
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
If result.RowCount <> 0 Then
CLOTHtableText(0) = Trim(result("日期"))
CLOTHtableText(1) = Trim(result("布料编号"))
CLOTHtableText(2) = Trim(result("幅宽"))
CLOTHtableText(3) = Trim(result("布料原长度"))
CLOTHtableText(4) = Trim(result("布料名称"))
CLOTHtableText(5) = Trim(result("供应商"))
CLOTHtableText(6) = Trim(result("布料产地"))
End If
frmPHCangKuIn.Show
End If
errmsg:
If Err.Number <> 0 Then
If ListView1.ListItems.Count <> 0 Then
CLOTHtableText(0) = "2002年03月10日" ' Trim(result("日期"))
CLOTHtableText(1) = "wa010001" 'Trim(result("布料编号"))
CLOTHtableText(2) = "2.80" 'Trim(result("幅宽"))
CLOTHtableText(3) = "200" 'Trim(result("布料原长度"))
CLOTHtableText(4) = "sdfvsdfgfg" 'Trim(result("布料名称"))
CLOTHtableText(5) = "天津布料公司" 'Trim(result("供应商"))
CLOTHtableText(6) = "天津" 'Trim(result("布料产地"))
frmPHCangKuIn.Show
End If
End If
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 Customtext As String
If ListView1.ListItems.Count <> 0 Then
Customtext = ListView1.SelectedItem.Text
sql = "select * from JTPRtable where 布料号='" & Trim(ListView1.SelectedItem.SubItems(1)) & "'"
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
If result.RowCount <> 0 Then
MsgBox "该布料已经在往来业务中使用,不能删除!!"
Else
If MsgBox("确定是否删除?", 36, "删除!") = 6 Then
sql = "delete from clothtable where 日期='" & Trim(Customtext) & "' and 布料编号='" & Trim(ListView1.SelectedItem.SubItems(1)) & "'"
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
End If
''''''''
sql = "select * from clothtable where 布料编号='" & Trim(GoodsTree) & "'"
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
frmPHCangKu.ListView1.ListItems.Clear
If result.RowCount <> 0 Then
Do While Not result.EOF()
Set itm = frmPHCangKu.ListView1.ListItems.Add(, , result("日期"))
itm.SubItems(1) = Trim(result("布料编号"))
itm.SubItems(2) = Trim(result("布料原长度"))
itm.SubItems(3) = Trim(result("布料名称"))
itm.SubItems(4) = Trim(result("供应商"))
result.MoveNext
Loop
End If
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_Click()
MsgBox "本软件为试用版,无查询功能..."
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_Click()
MsgBox "本软件为试用版,无打印功能..."
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
Dim hrecord As Integer
sql = "select * from Clothserial where 级别='" & Trim(GoodsTree) & "'"
Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
Dim itm As ListItem
If result.RowCount <> 0 Then
If TreeView1.SelectedItem.Children = 0 Then
Do While Not result.EOF()
Set TreeView1.ImageList = ImageList1
Set TreeSub1 = TreeView1.Nodes.Add(TreeView1.SelectedItem.Index, tvwChild, "fff" & Str(i), result("布料号"))
TreeSub1.Image = 1
TreeSub1.EnsureVisible
result.MoveNext
i = i + 1
Loop
End If
End If
''''''''''显示数据'''''''
sql = "select * from Clothtable 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 = frmPHCangKu.ListView1.ListItems.Add(, , result("日期"))
itm.SubItems(1) = Trim(result("布料编号"))
itm.SubItems(2) = Trim(result("布料原长度"))
itm.SubItems(3) = Trim(result("布料名称"))
itm.SubItems(4) = Trim(result("供应商"))
result.MoveNext
Loop
End If
errmsg:
If Err.Number <> 0 Then
ListView1.ListItems.Clear
Set itm = frmPHCangKu.ListView1.ListItems.Add(, , "2002年03月10日")
itm.SubItems(1) = GoodsTree '""'Trim(result("布料编号"))
itm.SubItems(2) = "200" 'Trim(result("布料原长度"))
itm.SubItems(3) = "sdfsdfdfd" 'Trim(result("布料名称"))
itm.SubItems(4) = "天津布料公司" 'Trim(result("供应商"))
End If
End Sub
Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If TreeView1.SelectedItem.Text = "布料号" Then
If Button = 2 Then
PopupMenu frmPHmain.mnuCloth
End If
Else
If TreeView1.SelectedItem.Children = 0 Then
frmPHmain.mnuAddCloth.Enabled = True
If Button = 2 Then
PopupMenu frmPHmain.mnuCloth
End If
Else
frmPHmain.mnuAddCloth.Enabled = True
If Button = 2 Then
PopupMenu frmPHmain.mnuCloth
End If
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 + -