Unit dm_rdbaction

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

rDBAction provides set of universal DB actions and menus.

Full functional demo

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TrDBAction Enabling and showing of Actions depends on TAG value of Active Grid, on UserRights value and on TAG value of each action

TAG value of Actions: format: xyzz x - user rights for non edit actions y - user rights for edit actions zz - bitmask for disable according Dataset state

UserRights value (00 - 99): format: xy x - user rights for non edit actions y - user rights for edit actions disable action if user rights < part of Tag value of Action typical vaules: 1: TOOL actions 2: TOOL and ADD record actions 3: enable TOOL, ADD and EDIT record actions 4: enable TOOL, ADD, EDIT and DELETE Actions

Bitmask for disable each action according Dataset state: 1: Inactive 2: ReadOnly 4: IsEmpty 8: Browse 16: Edit 32: Insert

typical values of Action and states for disabling: ADD record: 0251 (Insert+Edit+ReadOnly+Inactive) EDIT record: 0355 (Insert+Edit+ReadOnly+IsEmpty+Inactive) DELETE record: 0455 (Insert+Edit+ReadOnly+IsEmpty+Inactive) TOOL Button: 1049 (Insert+Edit+Inactive) SAVE or CANCEL record: 0315 (Browse+IsEmpty+ReadOnly+Inactive) EXIT Button: 0048 (Insert+Edit)

TAG value of Grid: (bitmask for hiding Actions according TAG value of Grid) -1: disable all Actions 1: hide whole Edit menu 2: hide whole Sort menu 4: hide whole Filter menu 8: hide whole Columns menu 16: hide whole Props menu 32: dummy 64: dummy 128: hide action acoClose 256: hide action aceDuplic 512: hide action aceSaveAdd 1024: hide action aceAdd 2048: hide action aceEdit 4096: hide action aceDelete 8192: hide action aceAutoEdit

typical values of TAG value of Grid: all actions: 0 not editing: 1 or 3841 only Edit: 3840

Types

TGetOtherActionState = procedure(Sender: TObject; rDBGrid: TrDBGrid; var Enabled: boolean) of object;
TRunOtherAction = procedure(Sender: TObject; rDBGrid: TrDBGrid) of object;

Variables

rDBAction: TrDBAction;

Description

Types

TGetOtherActionState = procedure(Sender: TObject; rDBGrid: TrDBGrid; var Enabled: boolean) of object;
 
TRunOtherAction = procedure(Sender: TObject; rDBGrid: TrDBGrid) of object;
 

Variables

rDBAction: TrDBAction;
 

Author

Created

Jan 2008

Last Modified

Sep 2015


Generated by PasDoc 0.13.0 on 2017-06-17 14:57:21