Click or drag to resize

EventArgsViewEnumViewEnum Class

SOWI Web Helper event argument object for web view extension methods e.g. ToPath with enumeration parameter type
Inheritance Hierarchy
SystemObject
  SystemEventArgs
    SOWIWeb.HelperEventArgsViewEnumViewEnum

Namespace:  SOWIWeb.Helper
Assembly:  SOWIWeb.Helper (in SOWIWeb.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
public class EventArgsViewEnum<ViewEnum> : EventArgs

Type Parameters

ViewEnum
Enumeration of view names example Contents

The EventArgsViewEnumViewEnum type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAction
Name of MVC action e.g. Index
Public propertyController
Name of MVC controller e.g. Home
Public propertyPath
View path e.g. ~/Views/Test/Layout
Public propertyView
Name of view e.g. a view from enumeration of Forms
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodGetObjectToBytes
Convert an object to byte array
(Defined by Extensions.)
Public Extension MethodIsNumber
Check is value a number
(Defined by Convert.)
Public Extension MethodToHTMLDisplay(DataGrid, TempDataDictionary)Overloaded. (Defined by Extensions.)
Public Extension MethodCode exampleToHTMLDisplay(String, DataGridDataTypes, String, String, String, String, TempDataDictionary)Overloaded.
Gives HTML code for display.
(Defined by Extensions.)
Public Extension MethodToHTMLEditor(DataGrid, TempDataDictionary, String)Overloaded. (Defined by Extensions.)
Public Extension MethodToHTMLEditor(String, DataGridDataTypes, String, String, String, TempDataDictionary, Boolean, String, DataPlacements, String, String)Overloaded.
Gives HTML code for Input field
(Defined by Extensions.)
Public Extension MethodCode exampleToHTMLHidden(String)Overloaded.
Gives HTML code for hidden data
(Defined by Extensions.)
Public Extension MethodToHTMLHidden(DataGrid)Overloaded.
Gives HTML code for hidden data
(Defined by Extensions.)
Public Extension MethodXMLWrite
Gives XML string from data item
(Defined by Helper.)
Top
Remarks
Enumeration type example Contents
Examples
This example puts a costum view path

Adds event handler for a custom view path setting

//* add event handler for a custom view path setting *
SOWIWeb.Foundation.FormsExtensions.OnFormsToPath += this.FormsToPath;
Event handler puts custom view path
/// <summary>
/// Custom Form default view path
/// </summary>
/// <param name="sender">null object because it's static declaration</param>
/// <param name="e">Has view name and view path</param>
private void FormsToPath(object sender, SOWIWeb.Foundation.EventArgsViewToPathEnum<SOWIWeb.Foundation.Forms> e)
{
    switch (e.View)
    {
        case Forms.none:
            break;
        case Forms.CreateContent:
            break;
        case Forms.DeleteContent:
            break;
        case Forms.DetailsContent:
            break;
        case Forms.EditContent:
            break;
        case Forms.FileChoice:
            break;
        case Forms.Form:
            break;
        case Forms.IndexContent:
            break;
        case Forms.IndexContentDataTables:
            break;
        case Forms.Layout:
            e.Path = "~/Views/Test/Layout";
            break;
        case Forms.ListHeader:
            break;
        case Forms.Navigation:
            break;
        default:
            break;
    }
}
See Also