Click or drag to resize

ControllerStandardDataItemClass Class

Standard controller for SOWI Win application
Inheritance Hierarchy
SystemObject
  SOWIWin.HelperControllerStandardDataItemClass

Namespace:  SOWIWin.Helper
Assembly:  SOWIWin.Helper (in SOWIWin.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
public abstract class ControllerStandard<DataItemClass>

Type Parameters

DataItemClass
Data item class e.g. SOWIData.App.Ticket

The ControllerStandardDataItemClass type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyActionName
From controller context
Protected propertyCode exampleAppModule
Requirement for data handling
Protected propertyCanCreate
Requirement: View Create
Protected propertyCanDelete
Requirement: View Delete
Protected propertyCanDetails
Requirement: View Details
Protected propertyCanEdit
Requirement: View Edit
Protected propertyCanImport
View Index: button Import
Protected propertyCanIndex
Requirement: View Index
Public propertyControllerName
From controller context
Public propertyDictionaryUI
Get this session DictionaryUI
Protected propertyCode exampleGetNewDataItem
Requirement for data handling
Public propertyModelState
SOWI App ModelState object
Public propertySession
Win session object
Top
Methods
  NameDescription
Public methodCreate
Standard Create (Get). Check CanCreate and Permission by Create. Called CreateOnActionResultGet when entitled
Public methodCreate(String, DataItemClass)
Standard Create (Post). Check CanCreate. Next step by push Button (switch submit): save and cancel. If no case is true (switch default) then called CreateOnActionResultPostCase with parameter submit.
Protected methodCreateGetToolbar
Standard toolbar for Create with button: save (default), cancel
Protected methodCreateOnActionResultGet
Called CreateSetViewBag and gives a View object with a new data item (GetNewDataItem)
Protected methodCreateOnActionResultPostCase
Not implemented is for spezification Post.
Protected methodCreateOnActionResultPostSave
Standard save data item from Create. Check Permission by Create. Validating data if true then insert data item if false then set ModelState and give View back.
Protected methodCreateSetViewBag
Set ViewBag values: if the following values null then set DataGridView (AppModule.GetDataGridView), Toolbar (CreateGetToolbar), and ContentName (_CreateContentPartial). More values set by methods FormSetViewBag and SetViewBagList.
Public methodDelete(Int32)
Standard Delete (Get). Check CanDelete and Permission by Delete and DeleteOwner. Called DeleteOnActionResultGet when entitled
Public methodDelete(String, Int32)
Standard Delete (Post). Check CanDelete. Next step by push Button (switch submit): delete and cancel. If no case is true (switch default) then called DeleteOnActionResultPostCase with parameter submit.
Protected methodDeleteGetToolbar
Standard toolbar for Edit with button: delete (default), cancel
Protected methodDeleteOnActionResultGet
Called DeleteSetViewBag and gives a View object with data item by ID
Protected methodDeleteOnActionResultPostCase
Not implemented is for spezification Post.
Protected methodDeleteOnActionResultPostDelete
Standard delete data item. Check Permission by Delete and DeleteOwner. Validating data if true then delete data item if false then set ModelState and give View back.
Protected methodDeleteSetViewBag
Set ViewBag values: if the following values null then set DataGridView (AppModule.DataGridView), Toolbar (DeleteGetToolbar), HasListHeader (false) and ContentName (_DeleteContentPartial). More values set by method FormSetViewBag.
Public methodDetails(Int32)
Standard Details (Get). Check CanDetails and Permission by Read and ReadOwner. Called DetailsOnActionResultGet when entitled
Public methodDetails(String, Int32)
Standard Details (Post). Check CanDetails. Next step by push Button (switch submit): back, edit and delete. If no case is true (switch default) then called DetailsOnActionResultPostCase with parameter submit.
Protected methodDetailsGetToolbar
Standard toolbar for Details with button: back (default), edit (disabled at not CanEdit), delete (disabled at not CanDelete)
Protected methodDetailsOnActionResultGet
Called DetailsSetViewBag and gives a View object with data item by ID
Protected methodDetailsOnActionResultPostCase
Not implemented is for spezification Post.
Protected methodDetailsSetViewBag
Set ViewBag values: if the following values null then set DataGridView from AppModule, Toolbar (DetailsGetToolbar), and ContentName (_DetailsContentPartial). More values set by method FormSetViewBag.
Public methodEdit(Int32)
Standard Edit (Get). Check CanEdit and Permission by Update and UpdateOwner. Called EditOnActionResultGet when entitled
Public methodEdit(String, DataItemClass)
Standard Edit (Post). Check CanEdit. Next step by push Button (switch submit): save and cancel. If no case is true (switch default) then called EditOnActionResultPostCase with parameter submit.
Protected methodEditGetToolbar
Standard toolbar for Edit with button: save (default), cancel
Protected methodEditOnActionResultGet
Called EditSetViewBag and gives a View object with data item by ID
Protected methodEditOnActionResultPostCase
Not implemented is for spezification Post.
Protected methodEditOnActionResultPostSave
Standard save data item from Edit. Check Permission by Update and UpdateOwner. Validating data if true then update data item if false then set ModelState and give View back.
Protected methodEditSetViewBag
Set ViewBag values: if the following values null then set DataGridView (AppModule.GetDataGridView), Toolbar (EditGetToolbar), HasListHeader (false) and ContentName (_EditContentPartial). More values set by methods FormSetViewBag and SetViewBagList.
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.)
Protected methodFormSetViewBag
Set Form ViewBag values: ControllerName, ActionName and if null then DictionaryUI, Title (ControllerName and ActionName), ReturnUrl (this URL) and if not null Message value then add Session Message
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.)
Public methodIndex
Standard Index (Get). Check CanIndex and Permission by Read and ReadOwner. Called IndexOnActionResultGet when entitled
Public methodIndex(String, ListViewConfig)
Standard Index (Post). Check CanIndex. Next step by push Button (switch submit): create, refresh and EditDataGridView. If no case is true (switch default) then called IndexOnActionResultPostCase with parameter submit.
Protected methodCode exampleIndexGetToolbar
Standard toolbar for Index with button: create (default and disabled not CanCreate), refresh, ListHeader (toogle for LiestHeader) and EditDataGridView
Protected methodIndexGetToolbarItem
Standard toolbar for data item (Edit, Details, Delete)
Protected methodIndexOnActionResultGet
Called IndexSetViewBag and gives a View object with data list configuration by ListViewConfig
Protected methodIndexOnActionResultPostCase
Not implemented is for spezification Post.
Protected methodIndexOnActionResultPostCreate
Standard Index Post Create
Protected methodIndexOnActionResultPostImport
Import file
Protected methodIndexOnActionResultPostRefresh
Standard Index (Post Refresh). Check Permission by Read and ReadOwner. Called IndexSetViewBag and gives a View object with data list configuration by ListViewConfig
Protected methodIndexSetViewBag
Set ViewBag values: Session Return Window (this Window) and if the following values null then set DataGridView (AppModule.DataGridView), Toolbar (IndexGetToolbar), HasListHeader (true) and ContentName. More values set by method FormSetViewBag.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodPermissionCheck
Check Permission with array of CRUD (enumeration)
Protected methodPermissionDenied
Go to LogIn with Message (No authorization or not logged in.) and set Session ReturnUrl
Private methodRedirectToAction
Protected methodRedirectToLocal
Redirection to local url
Protected methodCode exampleSetViewBagList
Set view bag list is empty
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Private methodView
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
See Also