📄 frmpo.frm
字号:
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
BeginProperty Column02
EndProperty
BeginProperty Column03
EndProperty
BeginProperty Column04
EndProperty
BeginProperty Column05
EndProperty
BeginProperty Column06
EndProperty
BeginProperty Column07
EndProperty
BeginProperty Column08
EndProperty
BeginProperty Column09
EndProperty
EndProperty
End
Begin VB.Label LblOther
Height = 255
Left = 3360
TabIndex = 19
Top = 7560
Width = 9495
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "其 他:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2040
MouseIcon = "FrmPO.frx":1DE4
TabIndex = 18
Top = 7560
Width = 1455
End
Begin VB.Label LblDeliverDemand
Height = 255
Left = 3360
TabIndex = 17
Top = 7080
Width = 9495
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "送货要求:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2040
MouseIcon = "FrmPO.frx":20EE
TabIndex = 16
Top = 7080
Width = 1455
End
Begin VB.Label LblPaymentCondition
Height = 255
Left = 3360
TabIndex = 15
Top = 6600
Width = 9495
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "付款条件:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2040
MouseIcon = "FrmPO.frx":23F8
TabIndex = 14
Top = 6600
Width = 1455
End
Begin VB.Image Image4
Height = 300
Left = 9480
Picture = "FrmPO.frx":2702
Top = 8280
Width = 300
End
Begin VB.Label LblBack
BackStyle = 0 'Transparent
Caption = "返回"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 10080
MouseIcon = "FrmPO.frx":2B1E
MousePointer = 99 'Custom
TabIndex = 7
Top = 8280
Width = 615
End
Begin VB.Image Image3
Height = 300
Left = 8040
Picture = "FrmPO.frx":2E28
Top = 8280
Width = 300
End
Begin VB.Label LblDelete
BackStyle = 0 'Transparent
Caption = "删除"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8640
MouseIcon = "FrmPO.frx":3244
MousePointer = 99 'Custom
TabIndex = 6
Top = 8280
Width = 615
End
Begin VB.Image Image2
Height = 300
Left = 6600
Picture = "FrmPO.frx":354E
Top = 8280
Width = 300
End
Begin VB.Label LblModify
BackStyle = 0 'Transparent
Caption = "修改"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7200
MouseIcon = "FrmPO.frx":396A
MousePointer = 99 'Custom
TabIndex = 5
Top = 8280
Width = 615
End
Begin VB.Image Image5
Height = 300
Left = 5040
Picture = "FrmPO.frx":3C74
Top = 8280
Width = 300
End
Begin VB.Label LblAdd
BackStyle = 0 'Transparent
Caption = "添加"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5640
MouseIcon = "FrmPO.frx":4090
MousePointer = 99 'Custom
TabIndex = 4
Top = 8280
Width = 615
End
Begin VB.Image Image1
Height = 300
Left = 6600
Picture = "FrmPO.frx":439A
Top = 2040
Width = 300
End
Begin VB.Label LblFind
BackStyle = 0 'Transparent
Caption = "查询订单"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7080
MouseIcon = "FrmPO.frx":47B6
MousePointer = 99 'Custom
TabIndex = 3
Top = 2040
Width = 1095
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "PO"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7080
TabIndex = 1
Top = 480
Width = 615
End
End
Attribute VB_Name = "FrmPO"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
LblModify.Enabled = False
LblDelete.Enabled = False
End Sub
Private Sub ImgPOID_Click()
FrmPOIDQury.OK = 1
FrmPOIDQury.Show 1
End Sub
Private Sub LblAdd_Click()
FrmPOEdit.Modify = False
FrmPOEdit.Show 1
End Sub
Private Sub LblBack_Click()
Unload Me
End Sub
Private Sub LblDelete_Click()
If TxtPOID <> "" Then
If Adodc1.Recordset.RecordCount > 1 Then
FrmPODelete.LblDeletePO.Caption = "删除PO单“" + TxtPOID.Text + "”"
FrmPODelete.OriPOID = TxtPOID.Text
FrmPODelete.LbDeletePOItem.Caption = "删除PO单“" + TxtPOID.Text + "”中的PO项目“" + Adodc1.Recordset.Fields(2) + "”"
FrmPODelete.OriPOItemID = Adodc1.Recordset.Fields(2)
FrmPODelete.Show 1
Refresh_PO
Else
FrmPODelete.LblDeletePO.Caption = "删除PO单“" + TxtPOID.Text + "”"
FrmPODelete.OriPOID = TxtPOID.Text
FrmPODelete.LbDeletePOItem.Visible = False
FrmPODelete.Image1.Visible = False
FrmPODelete.Show 1
Unload Me
Me.Show
End If
Else
MsgBox "请选择PO单后指定要项目"
TxtPOID.Text = ""
Exit Sub
End If
End Sub
Private Sub LblFind_Click()
If LblFind.Caption = "查询订单" Then
If TxtPOID.Text = "" Then
MsgBox "请输入要查询的PO单号"
TxtPOID.SetFocus
Exit Sub
End If
'查询订单信息
Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
Adodc1.RecordSource = "SELECT Businessman.BusinessmanName, PO.PODate, PO.POItemID, Item.Item, Item.Name, Item.Unit, PO.POQty, PO.ConsignmentDate, PurchaseItem.Currency1, PurchaseItem.UnitPrice, PO.IsComplete,Businessman.BusinessmanID,PurchaseItem.PurchaseItemID,Item.MB From PurchaseItem, Item, PO, Businessman WHERE Item.Item=PurchaseItem.Item and PO.PurchaseItemID=PurchaseItem.PurchaseItemID and Businessman.BusinessmanID=PurchaseItem.BusinessmanID and PO.POID ='" + Trim(TxtPOID.Text) + "' order by PO.POItemID"
Adodc1.Refresh
Adodc2.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
Adodc2.RecordSource = "SELECT POInfo.PaymentCondition,POInfo.DeliverDemand,POInfo.Other From PO,POInfo WHERE PO.POID=POInfo.POID and POInfo.POID ='" + Trim(TxtPOID.Text) + "' order by PO.POItemID"
Adodc2.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Set DataGrid1.DataSource = Adodc1
'填充PO基本信息
Set LblBusinessman.DataSource = Adodc1
LblBusinessman.DataField = "BusinessmanName"
Set LblDate.DataSource = Adodc1
LblDate.DataField = "PODate"
LblModify.Enabled = True
LblDelete.Enabled = True
TxtPOID.Enabled = False
ImgPOID.Enabled = False
LblFind.Caption = "重新查询"
Set LblPaymentCondition.DataSource = Adodc2
LblPaymentCondition.DataField = "PaymentCondition"
Set LblDeliverDemand.DataSource = Adodc2
LblDeliverDemand.DataField = "DeliverDemand"
Set LblOther.DataSource = Adodc2
LblOther.DataField = "Other"
Else
MsgBox "没有此PO单号,请重新输入"
TxtPOID.SetFocus
TxtPOID.SelStart = 0
TxtPOID.SelLength = Len(TxtPOID)
End If
Else
Unload Me
Me.Show
End If
End Sub
Private Sub Refresh_PO()
Adodc1.Refresh
Adodc2.Refresh
End Sub
Public Sub LblModify_Click()
FrmPOModifyLogIn.LblModify.Caption = "修改PO订单项目“" + Adodc1.Recordset.Fields(2) + "”"
FrmPOModifyLogIn.LblAdd.Caption = "添加订单项目到PO“" + TxtPOID.Text + "”"
FrmPOModifyLogIn.Show 1
Refresh_PO
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -