MapperCommand Class |
Namespace: NetQuarry.Data
The MapperCommand type exposes the following members.
Name | Description | |
---|---|---|
MapperCommand |
Default constructor.
| |
MapperCommand(String, String) |
Constructs a new instance of the object.
| |
MapperCommand(String, String, MapperCommandLocation) |
Constructs a new instance of the object.
| |
MapperCommand(String, String, MapperCommandLocation, UICommandAttrs) |
Constructs a new instance of the object.
| |
MapperCommand(String, String, MapperCommandLocation, UICommandAttrs, String) |
Constructs a new instance of the object.
| |
MapperCommand(String, String, MapperCommandLocation, UICommandAttrs, String, String) |
Constructs a new instance of the object.
| |
MapperCommand(String, String, MapperCommandLocation, UICommandAttrs, String, String, String) |
Constructs a new instance of the object.
| |
MapperCommand(String, String, MapperCommandLocation, UICommandAttrs, String, String, String, String) |
Constructs a new instance of the object.
| |
MapperCommand(String, String, MapperCommandLocation, UICommandAttrs, String, String, String, String, String) |
Constructs a new instance of the object.
|
Name | Description | |
---|---|---|
Action |
Gets or sets the command's action.
| |
Attributes |
Command presentation attributes.
| |
Caption |
Gets or sets the command's caption. The caption is the text displayed to the user on the More menu and
shown under the image if the command is located on the toolbar and toolbar captions are displayed.
| |
Command |
The command name used programmatically to invoke specific behaviour. By default, and in most cases, Command
is the same as ID. However, Command can be set programmatically to be different from ID
In the case where a MapperCommands collection needs to contain multiple MapperCommand objects with
the same command, for example where the same command is required with two different MapperCommandLocation values.
| |
ConfirmMessage |
Specifies the confirmation message to display before posting the command back to the extension
| |
CssClass |
Gest/sets the CSS class to be applied to the command toolbar button.
| |
ExtraHtml |
Gets/sets additional HTML to be appended to the command item. This HTML will not be escaped and should be set with care.
| |
ID |
Gets or sets the command's ID.
| |
Image32URL |
Gets or sets the command's 32x32 image path.
| |
ImageURL |
Gets or sets the commands 16x16 image path.
| |
Location |
Gets or sets the command's location. (Toolbar or MoreMenu)
| |
NavTarget |
Gets or Sets the NavTarget this command is based on.
| |
ParentCommand |
Gets/sets the ID (name) of the parent command for this item. A parent command
constitutes a submenu item and all items having the same parent will be grouped
under that parent. If no other command is found having the specified ID, then a
parent command will be added automatically.
| |
RowKeys |
The set of RowKeys for which this command applies.
Applies only to RowMenu commands.
When the MapperCommand event is fired, the selected key
will be provided in RowKey.
| |
Script |
Gets or sets the command's javascript.
| |
SourceName |
Gets/set the name of the source for this command.
| |
StatusText |
Gets/sets the text used for the client-side progress indicator. If no text is set
then no progress indicator will be presented.
| |
Tooltip |
Gets or sets the commands tooltip.
| |
ToolTip |
Gets or sets the command's tooltip.
| |
URL |
Gets or sets the command's URL. You may set the URL if your command is a simple navigation command to another page or URL.
| |
WindowOptions |
Gets or sets the command's window options. Window options are passed to window.open for commands that are
javascript based. This parameter is a list of items separated by commas and corresponds to the "Features" parameter
in the DHTML window.open() method.
Each item consists of an option and a value, separated by an equals sign (for example,
"fullscreen=yes, toolbar=yes"). The following features are supported.
|
Name | Description | |
---|---|---|
Clone |
Clone the command.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | (Inherited from Object.) |
Name | Description | |
---|---|---|
EqualValue |
Determines if the object value is equal to another object. If the two objects are null, then this returns true.
There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways).
If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.) |
public override void MapperBeforeLayout(IMapper sender, EAPEventArgs e) { MapperCommand cmd = new MapperCommand(); MapperCommandLocation location = MapperCommandLocation.MoreMenu; cmd.Caption = "Export to Excel"; int nLocation = this.Properties.GetIntValue("CommandLocation", (int)MapperCommandLocation.MoreMenu); if (((MapperCommandLocation)nLocation) == MapperCommandLocation.Toolbar) { location = MapperCommandLocation.Toolbar; } cmd.Location = location; cmd.ToolTip = "Export the current data to Microsoft Excel"; cmd.WindowOptions = EAPUtil.WindowOpenFeatures(WindowOpenOptions.Standard, 0, 0); if ((location == MapperCommandLocation.Toolbar) && sender.Application.Properties.GetBoolValue("ToolbarLargeIcons")) { cmd.ImageURL = "images/excel32.bmp"; } else { cmd.ImageURL = "images/excel.bmp"; } cmd.Atributes |= UICommandAttrs.ExistingOnly; sender.Commands.Add("excelexport", cmd); }
public override void FieldButtonClick(IField sender, EAPEventArgs e) { if (sender.Key == "btn_enable") { IField fldID = sender.Fields["dealer_id"]; IField fldDealershipID = sender.Fields["dealership_id"]; string dealerID = EAPUtil.ToString(fldID.Value); string sql = string.Format("UPDATE dealer SET status_id = 1 WHERE dealer_id = '{0}'", dealerID); if (0 == EAPUtil.ToString(fldDealershipID.Value).Length) { e.Error("You must select a dealership for this dealer before they can be enabled."); return; } sender.Database.Execute(sql); } }