brparts.vbs

来自「Dream Scripter v3.5 Full Source Code」· VBS 代码 · 共 46 行

VBS
46
字号
'USEUNIT DBGrids
'USEUNIT StdCtrls
'USEUNIT DBCtrls
'USEUNIT Buttons
'USEUNIT ExtCtrls
'USEUNIT Edparts
'USEUNIT Datamod


function GetPartNo()
  GetPartNo = MastData.PartsSource.Dataset.Fields(0).Value
End Function

sub SetPartNo(NewPartNo)
  MastData.PartsSource.Dataset = MastData.Parts
  call MastData.Parts.Locate("PartNo", NewPartNo, 0)
End Sub

sub ActivateQuery(Sender)
  if  not ActivateBtn.Down then
    MastData.PartsSource.Dataset = MastData.Parts
  else
    MastData.PartsQuery.Close
    MastData.PartsQuery.Open
    MastData.PartsSource.Dataset = MastData.PartsQuery
  End If
End Sub

sub EditBtnClick(Sender)
  if ActivateBtn.Down then
    EdParts.Edit(MastData.PartsQueryPartNo.Value)
    MastData.PartsQuery.Close
    MastData.PartsQuery.Open
  else
    call EdParts.Edit(MastData.PartsPartNo.Value)
  End If
End Sub

sub CloseBtnClick(Sender)
  Close
End Sub

sub FormShow(Sender)
  MastData.Parts.Open
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?