IRoleCancelChanges Method |
Namespace: SuperOffice.COM.SuperOfficeDB
Cancel changes
Dim db As New Database If db.Login("<userID>", "<password>") Then Dim role As SORole = db.Admin.CreateRole(EnAssocRoleType.enRoleTypeEmployee, Nothing) role.Name = "the new role" role.Description = "this is the new role" role.Save() Dim allrights As IListTextItems = db.Admin.GetAllFunctionRights(EnAssocRoleType.enRoleTypeEmployee) Dim fr As IListTextItem = allrights(3) role.AddFunctionRight(fr) For Each item As IListTextItem In role.FunctionRights MsgBox(item.Text) Next 'cancel the change to the object role.CancelChanges() role.Save() Else MsgBox("failed to log in") End If