AppStandardDataItemClass Class |
Namespace: SOWIApp.Foundation
public abstract class AppStandard<DataItemClass> : Connector<DataItemClass>, IAppStandard<DataItemClass>, IConnector<DataItemClass>, IAppController<DataItemClass>
[Missing <typeparam name="DataItemClass"/> documentation for "T:SOWIApp.Foundation.AppStandard`1"]
The AppStandardDataItemClass type exposes the following members.
Name | Description | |
---|---|---|
AppStandardDataItemClass |
Constructor for stanndard SOWI App module handling with database connector
|
Name | Description | |
---|---|---|
AppName |
AppName is Module name resp class name
| |
ClientID |
Gives client ID by user of the app used. Set of UserThisApp | |
ConnectionString |
Gives database connection string of the app used
(Inherited from ConnectorDataItemClass.) | |
DataGridView | ||
DB |
Database object. Sets with method SetDB.
(Inherited from ConnectorDataItemClass.) | |
DictionaryUI |
Gives Dictionary for UI.
| |
LanguageOut |
Gives language for UI from User. Can't setting then set default DE
| |
NameUnchanged |
Flag no change value in field Name Default: false
(Inherited from ConnectorDataItemClass.) | |
NameUnique |
Flag whether Name unique Default: false
(Inherited from ConnectorDataItemClass.) | |
Permissions |
Gives permissions by User and Module
| |
Provider |
Gives data provider type back.
(Inherited from ConnectorDataItemClass.) | |
RecordStandard |
Which data items read from database? All, active or archived records.
(Inherited from ConnectorDataItemClass.) | |
SortDirectionStandard |
Standard sort direction by sort field for example method GeAll
(Inherited from ConnectorDataItemClass.) | |
SortFieldStandard |
Standard sort field for example method GeAll
(Inherited from ConnectorDataItemClass.) | |
TableName |
usually TableName equal AppName
| |
Token |
Session token, use for check permission and information for User name
| |
UserName |
Gives user name of the app used
(Inherited from ConnectorDataItemClass.) | |
UserThisApp |
Gives user data item (SOWIData.Management.User) of the app used. The user is managed by UserName or set by constructor
| |
XML |
XML object. Sets with method SetDB
(Inherited from ConnectorDataItemClass.) |
Name | Description | |
---|---|---|
Count(Records) |
Gives the count by all, active or archive data records
(Inherited from ConnectorDataItemClass.) | |
Count(String, Records) |
Gives the count by all, active or archive data records and filtering by Name
(Inherited from ConnectorDataItemClass.) | |
Delete(ListInt32) |
Delete all data items
(Inherited from ConnectorDataItemClass.) | |
Delete(Int32) |
Delete a data item - set Status = Delete (except XML provider)
(Inherited from ConnectorDataItemClass.) | |
Delete(String) |
Delete data item by Name
(Inherited from ConnectorDataItemClass.) | |
Equals | (Inherited from Object.) | |
Exist(Int32) |
Check exist data item by ID (hits can be multiple)
(Inherited from ConnectorDataItemClass.) | |
Exist(String) |
Check exist data item by Name (can be multiple)
(Inherited from ConnectorDataItemClass.) | |
ExistOne |
Check exist one data item by Name
(Inherited from ConnectorDataItemClass.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAll |
Get data list by standards value without parameter.
(Inherited from ConnectorDataItemClass.) | |
GetAll(Records) |
Get data list by Records (all, active, archived)
(Inherited from ConnectorDataItemClass.) | |
GetAll(String, SortDirections) |
Get data list details with sort parameters
(Inherited from ConnectorDataItemClass.) | |
GetAll(String, Operators, Object) |
Get data list by search parameter.
(Inherited from ConnectorDataItemClass.) | |
GetAll(String, SortDirections, String, Operators, Object, Records) |
Get data list with all parameters.
(Inherited from ConnectorDataItemClass.) | |
GetByID |
Gives one data item by ID
(Inherited from ConnectorDataItemClass.) | |
GetByName |
Data item search by field Name
(Inherited from ConnectorDataItemClass.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetList |
Gives raw data list and is basis for all data processing (example for method GetAll)
(Inherited from ConnectorDataItemClass.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetView(ListViewConfig, DictionaryString, String) |
Gives a list of data by settings of ListView Config.
The list is divided into pages (paging).
| |
GetView(ListViewConfig, String, DictionaryString, String) |
Data list configured by List View Config
| |
Import(DataTable) |
Data import from a data table
| |
Import(String) |
Data import from a CSV file. First row is column label.
| |
Import(Stream, String, String) |
Data import from a stream with CSV structure. First row is column label.
| |
ImportItem |
Import a data item
| |
Initialize |
Database setting for use module
| |
Insert(ListDataItemClass) |
Insert list of data items
(Inherited from ConnectorDataItemClass.) | |
Insert(DataItemClass) |
Insert data item
(Inherited from ConnectorDataItemClass.) | |
InsertOrUpdateByName |
If not exists data record by Name then call method Insert.
If exists data record unique then call method Update.
If more data records then trigger an exception DataFoundMoreAsOne
(Inherited from ConnectorDataItemClass.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnDBActionDone |
event for override
| |
OnDBActionPermission |
Permission handling
| |
OnDBActionPrepare |
Data prepare before database handling
| |
OnDBActionPrepareApp |
Set Client ID
| |
OnValidating |
Validating for required fields and can override
| |
PermissionCheck(CRUD) |
Check Permission CRUD and Session Token of this App and User
| |
PermissionCheck(CRUD) |
Check Permission CRUD and Session Token of this App and User
| |
SetDB |
Sets database
(Inherited from ConnectorDataItemClass.) | |
SetUserThisApp |
Setting object property UserThisApp (SOWIData.Management.User) by UserName
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update(ListDataItemClass) |
Data list update
(Inherited from ConnectorDataItemClass.) | |
Upload(String) |
Data content upload - not implemented
| |
Upload(DataItemClass, FileContent) |
Save file data to data item. This method can be overwrite.
| |
Validate |
Validate data item
(Inherited from ConnectorDataItemClass.) | |
ValidateEventArgData | ||
ValidateRequired |
Validate with Data Grid View (Required)
| |
Write |
Write a document. This not implemented.
|
Name | Description | |
---|---|---|
DBActionAfter |
Triggered by methods Get*, Insert, Update and Delete
(Inherited from ConnectorDataItemClass.) | |
DBActionBefore |
Triggered by methods Get*, Insert, Update and Delete
(Inherited from ConnectorDataItemClass.) | |
DBActionDone |
Triggered by methods Get*, Insert, Update and Delete
(Inherited from ConnectorDataItemClass.) | |
DBActionPermission |
Triggered by methods Get*, Insert, Update and Delete
(Inherited from ConnectorDataItemClass.) | |
DBActionPrepare |
Triggered by methods Get*, Insert, Update and Delete
(Inherited from ConnectorDataItemClass.) | |
Validating |
Triggered by method Validate
(Inherited from ConnectorDataItemClass.) |
public class QualiTemplate : SOWIApp.Foundation.AppStandard<SOWIData.App.QualiTemplate> { /// <summary> /// Qualification template /// </summary> /// <param name="pToken">user session token</param> public QualiTemplate(Guid pToken) : base(pToken) { } /// <summary> /// Set database /// </summary> protected override void SetDB() { try { this.DB = new SOWIData.App.Database.Tables(this.ConnectionString); if (!this.DB.Database.Exists()) { throw new Exception("Database not exists!"); } } catch (Exception ex) { SIC.Protocol.Write(ref ex); throw ex; } } /// <summary> /// Gives raw data list and is basis for all data processing /// </summary> /// <returns>a data list with filter by Status ≠ Delete and Client ID</returns> protected override List<SOWIData.App.QualiTemplate> GetList() { try { var lDB = (SOWIData.App.Database.Tables)this.DB; string lStatus = SOWIData.Statuses.Delete.ToString(); var lList = (from p in lDB.QualiTemplate where (p.StatusText != lStatus) && (p.ClientID == this.ClientID) select p).ToList(); return lList; } catch (Exception ex) { SIC.Protocol.Write(ref ex); throw ex; } } }