Private Sub_Click CatName
Open.database MMF
lblcomname == comname
lbladdress == Address
row==1
Input txtcatname
seek (MMF.databasetable, txtcatname.databasetable)
If NoMatch
{
Print" No such category Name in the Material Master file"
}
Else
{
grd.MNo==Mno
grd.descr==Description
grd.umsr==U_msr
grd_Qty==Qty_hand
grd_Status == MMF Recstat
}
row=row +1
movenext.MFF
IF EOF or txtcatname <> CategoryName
{
Print "End of File"
}
ELSE
{
return seek(MMF, txtcatname
}
End if
End Sub
Private Sub_Click cmdCancel Button
Clear.gridlines
grd.MNo==""
grd.descr==""
grd.umsr==""
grd_Qty==""
grd_Status == ""
End Sub
Private Sub_Click cmdExit Button
Close.SFG
Close.MMF
End Sub
**REPORTS OF MATERIAL BY DESCRIPTION**
Private Sub_Click Description
Open.SGF
Open.MMF
lblcomname ==comname
lbladdress ==Address
row ==1
Input txtdescr
Seek (MMF.databasetable, txtdescr.databasetable)
IF NOMATCH
{
Print" No such description found in the Material Master file"
}
ELSE
{
grd.Mno ==Mno
grd.catName ==Category Name
grd.umsr ==U_msr
grd.Qty==Qty_hand
grd.status==MMFRecStat
}
End if
roww==row+1
movenext.MMF
IF EOF or txtdescr <> Description
{
Print "End of File"
}
Else
{
return.seek (MMF.databasetable, txtdescr.databasetable)
}
End if
setfucos.txtdescr
End Sub
Private Sub_Click cmdCancel button
Clear textbox
clear.grid
grd.Mno ==""
grd.catName ==""
grd.umsr ==""
grd.Qty==""
grd.status==""
End Sub
Private Sub_Click cmdExit button
Close.SGF
Close.MMF
End Sub
Private Sub_Click cmdSave button
SMF.Addnew
SuppNo ==txtSuppNO
Slname==txtfname
Sfname==txtlname
Address==txtaddress
TelNo==txtTelNo
FaxNo==txtfaxNo
Rating==cborating
PriceStructure==txtpricestructure
SMFRecstat =='A'
SMF.UPDATE
SGF.Edit
SuppNo==txtSuppNo
SGF.UPDATE
End Sub
Private Sub_Click cmdCancel
Clear all textboxes, comboboxes
SuppNo ==""
Slname==""
Sfname==""
Address==""
TelNo==""
FaxNo==""
Rating==""
PriceStructure==""
SMFRecstat ==""
End Sub
Private Sub_Click cmdExit
close.SGF
CLOSE.SMF
End Sub
***SUPPLIER CODE INQUIRY***
Private Sub_Click Supp_Code Form
open.database SGF
open.database SMF
lblcomname ==comname
lbladdress==address
Input txtSuppNo
SEEK(SMF.databasetable, txtSuppNo)
IF NOMATCH
{
Print "No such Supplier Number found in the Material Master file"
}
else
{
txtfname =sfname
txtlname==slname
txtaddress==address
txttelno==telno
txtfaxno==faxno
cborating==rating
cbopricestructure==price struture
cbostatus==smfrecstat
}
end if
END SUB
Private Sub_Click cmdcancel
clearall.textboxes
END SUB
Private Sub_Click cmdexit
close.SGF
CLOSE.SMF
End sub
Private Sub_Click cmdSave button
SMF.Addnew
SuppNo ==txtSuppNO
Slname==txtfname
Sfname==txtlname
Address==txtaddress
TelNo==txtTelNo
FaxNo==txtfaxNo
Rating==cborating
PriceStructure==txtpricestructure
SMFRecstat =='A'
SMF.UPDATE
SGF.Edit
SuppNo==txtSuppNo
SGF.UPDATE
End Sub
Private Sub_Click cmdCancel
Clear all textboxes, comboboxes
SuppNo ==""
Slname==""
Sfname==""
Address==""
TelNo==""
FaxNo==""
Rating==""
PriceStructure==""
SMFRecstat ==""
End Sub
Private Sub_Click cmdExit
close.SGF
CLOSE.SMF
End Sub
***SUPPLIER CODE INQUIRY***
Private Sub_Click Supp_Code Form
open.database SGF
open.database SMF
lblcomname ==comname
lbladdress==address
Input txtSuppNo
SEEK(SMF.databasetable, txtSuppNo)
IF NOMATCH
{
Print "No such Supplier Number found in the Material Master file"
}
else
{
txtfname =sfname
txtlname==slname
txtaddress==address
txttelno==telno
txtfaxno==faxno
cborating==rating
cbopricestructure==price struture
cbostatus==smfrecstat
}
end if
END SUB
Private Sub_Click cmdcancel
clearall.textboxes
END SUB
Private Sub_Click cmdexit
close.SGF
CLOSE.SMF
End sub
No comments:
Post a Comment