**MATERIAL ENTRY**
Public Sub Open.Database
Open.database SGF
Open.database MMF
Seek (SGF.databasetable,SGFYear == "Year")
If NoMatch
{
Print "System Record not Updated"
}
Else
{
lblcom ==comname
lbladdress == Address
}
End If
txtMno== Mno+1
Input txtdescr, txtumsr, txtqtyhand, txtcatname
End Sub
Private Sub_click cmdsave button
MMF.Addnew
MNo == txtMNo
Description == txtdescr
U_msr == txtumsr
Qty_Hand == txtqtyhand
CategoryName == txtcatname
MMFRecStat == "A"
MMF.Update
SCG.Edit
MNo== txtMNo
SGF.Update
End Sub
Private Sub_Click cmdCancel button
Clear all textboxes
MNo == ""
Description == ""
U_msr ==""
Qty_Hand == ""
CategoryName ==""
MMFRecStat == ""
End Sub
Private Sub_Click cmdExit Button
Close.SGF Database
Close. MMF Database
End Sub
**MATERIAL UPDATE**
Public Sub Open.Database
Open.database SGF
Open.database MMF
Seek (SGF.databasetable, SGFYear =="Year")
If Nomatch
{
Print "System Record Not Updated"
}
Else
{
lblcomname == comname
lbladdress == Address
}
End if
Input TxtMno
seek(MMF,txtMNo)
If NoMatch
{
Print " Material Number not found in the Material Master File"
}
Else
{
txtMno== Mno
txtdescr == Desription
txtumsr == U_msr
txtqtyhand == Qty_hand
txtcatname == category Name
cbostatus == MMRecstat
}
End if
Input txtqtyhand
Input cbostatus
if cbostatus <> 'A' or cbostatus <> 'I'
{
Print "Invalid Input of Status"
set.focus cbstatus
}
Else
{
set.focus Material Update
}
End if
End Sub
Private Sub_Click cmdUpdate Button
MMF.edit
Qty_Hand == txtqtyhand
MMFRecSta == cbostatus
MMF.update
End Sub
Private Sub_Click cmdCancel button
Clear all textboxes, combobox
txtMno== ""
txtdescr == ""
txtumsr == ""
txtqtyhand == ""
txtcatname == ""
cbostatus == ""
Qty_Hand == ""
MMFRecSta == ""
End Sub
Private Sub_Click cmdExit
Close.SGF
Close.MMF
End Sub
**SUPPLIER ENTRY**
Private Sub_Click Supplier Form
Open.database SGF
Open.database MMF
seek (SGF.databasetable, SGFYear =="Year")
IF NOMATCH
{
Print "System Record"
not updated"
}
Else
{
lblcom ==comname
lbladdress ==Address
}
End if
txtSuppNo ==SuppNo+1
Input txtfname
Input txtlname
Input txtaddress
Input txtTelno
Input txtfaxNo
Input Cborating
Input cbopricestructure
End Sub
***Supplier UPDATE***
Private Sub_Click Supp_Update Form
Open.database SGF
Open.database SMF
SEEK(SGF.databasetable, SGFYear =="Year""
IF NOMATCH
{
Print "System Record not updated"
}
else
{
lblcomname ==comname
lbladdress==Address
}
End if
Input txtSuppNo
SEEK(SMF.databasetable, txtsuppNO)
IF NOMATCH
{
Print "Supplier Number not found in the Material Master file"
}
else
{
txtfname ==sfname
txtlname ==slname
txtaddress==Address
txttelNo==TelNo
txtFaxNo==FaxNo
cborating==Rating
cboPriceStructure==PriceStructure
cbostatus==SMFRecstat
}
End if
Input txtname
input txtfname
input txtaddress
input txttelNo
input faxNo
Input cborating
input cbopricestructure
input cbostatus
END SUB
Private Sub_Click cmdUpdate
SMF.Edit
slname ==txtname
sfname ==txtfname
Address==txtaddress
TelNo==txtTelNo
FaxNo==txtFaxNo
Rating==cborating
PriceStructure==txtpricestructure
SMFRecstat=cbostatus
SMF.UPDATE
END SUB
Private Sub_Click cmbCancel
Clearall.Textboxes, comboboxes
slname ==""
sfname ==""
Address==""
TelNo==""
FaxNo==""
Rating==""
PriceStructure==""
SMFRecstat=""
End Sub
Private Sub_click cmdexit
close.SGF
CLOSE.SMF
END SUB
Home »
» MATERIAL & SUPPLIER ENTRY, UPDATE SYNTAX CODE
No comments:
Post a Comment