CompEd2009XL

John Paulo "Anubarak" Billones

Friday, December 11, 2009

code of SAVE

If MsgBox("Save current record, are you sure?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "save") = MsgBoxResult.Yes Then

Me.bngprofile.EndEdit()

Me.ProfileTableAdapter.Update(Me.SampleDataSet.profile)
disabledcontrol()

End If

CANCEL

If MsgBox("Cancel current record, are you sure?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "cancel") = MsgBoxResult.Yes Then

Me.bngprofile.CancelEdit()

Me.ProfileTableAdapter.Fill(Me.SampleDataSet.profile)
disabledcontrol()

End If

DELETE

If MsgBox("Delete Current Records, are you sure?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Delete") = MsgBoxResult.Yes Then
Me.bngprofile.RemoveAt(Me.bngprofile.Position)
ProfileTableAdapter.Update(Me.SampleDataSet.profile)
End If