Click or drag to resize

IRoleCancelChanges Method

Cancel reverts the changes to the role

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
void CancelChanges()
Examples

Cancel changes

VB
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

See Also