MixERP.Net.Api.Core.UnitController Class Reference

Provides a direct HTTP access to perform various tasks such as adding, editing, and removing Units. More...

Inheritance diagram for MixERP.Net.Api.Core.UnitController:

Public Member Functions

EntityView GetEntityView ()
 Creates meta information of "unit" entity. More...
 
long Count ()
 Counts the number of units. More...
 
IEnumerable< MixERP.Net.Entities.Core.UnitGet ()
 Returns collection of unit for export. More...
 
MixERP.Net.Entities.Core.Unit Get (int unitId)
 Returns an instance of unit. More...
 
IEnumerable< MixERP.Net.Entities.Core.UnitGet ([FromUri] int[] unitIds)
 
IEnumerable< MixERP.Net.Entities.Core.UnitGetPagedResult ()
 Creates a paginated collection containing 25 units on each page, sorted by the property UnitId. More...
 
IEnumerable< MixERP.Net.Entities.Core.UnitGetPagedResult (long pageNumber)
 Creates a paginated collection containing 25 units on each page, sorted by the property UnitId. More...
 
long CountWhere ([FromBody]dynamic filters)
 Counts the number of units using the supplied filter(s). More...
 
IEnumerable< MixERP.Net.Entities.Core.UnitGetWhere (long pageNumber, [FromBody]dynamic filters)
 Creates a filtered and paginated collection containing 25 units on each page, sorted by the property UnitId. More...
 
long CountFiltered (string filterName)
 Counts the number of units using the supplied filter name. More...
 
IEnumerable< MixERP.Net.Entities.Core.UnitGetFiltered (long pageNumber, string filterName)
 Creates a filtered and paginated collection containing 25 units on each page, sorted by the property UnitId. More...
 
IEnumerable< DisplayFieldGetDisplayFields ()
 Displayfield is a lightweight key/value collection of units. More...
 
IEnumerable< PetaPoco.CustomFieldGetCustomFields ()
 A custom field is a user defined field for units. More...
 
IEnumerable< PetaPoco.CustomFieldGetCustomFields (string resourceId)
 A custom field is a user defined field for units. More...
 
void AddOrEdit ([FromBody]Newtonsoft.Json.Linq.JArray form)
 Adds or edits your instance of Unit class. More...
 
void Add (MixERP.Net.Entities.Core.Unit unit)
 Adds your instance of Unit class. More...
 
void Edit (int unitId, [FromBody] MixERP.Net.Entities.Core.Unit unit)
 Edits existing record with your instance of Unit class. More...
 
List< object > BulkImport ([FromBody]dynamic collection)
 Adds or edits multiple instances of Unit class. More...
 
void Delete (int unitId)
 Deletes an existing instance of Unit class via UnitId. More...
 

Properties

long LoginId [get]
 
int UserId [get]
 
int OfficeId [get]
 
string Catalog [get]
 

Detailed Description

Provides a direct HTTP access to perform various tasks such as adding, editing, and removing Units.

Member Function Documentation

void MixERP.Net.Api.Core.UnitController.Add ( MixERP.Net.Entities.Core.Unit  unit)

Adds your instance of Unit class.

Parameters
unitYour instance of units class to add.
void MixERP.Net.Api.Core.UnitController.AddOrEdit ( [FromBody] Newtonsoft.Json.Linq.JArray  form)

Adds or edits your instance of Unit class.

Parameters
unitYour instance of units class to add or edit.
List<object> MixERP.Net.Api.Core.UnitController.BulkImport ( [FromBody] dynamic  collection)

Adds or edits multiple instances of Unit class.

Parameters
collectionYour collection of Unit class to bulk import.
Returns
Returns list of imported unitIds.
Exceptions
MixERPExceptionThrown when your any Unit class in the collection is invalid or malformed.
long MixERP.Net.Api.Core.UnitController.Count ( )

Counts the number of units.

Returns
Returns the count of the units.
long MixERP.Net.Api.Core.UnitController.CountFiltered ( string  filterName)

Counts the number of units using the supplied filter name.

Parameters
filterNameThe named filter.
Returns
Returns the count of filtered units.
long MixERP.Net.Api.Core.UnitController.CountWhere ( [FromBody] dynamic  filters)

Counts the number of units using the supplied filter(s).

Parameters
filtersThe list of filter conditions.
Returns
Returns the count of filtered units.
void MixERP.Net.Api.Core.UnitController.Delete ( int  unitId)

Deletes an existing instance of Unit class via UnitId.

Parameters
unitIdEnter the value for UnitId in order to find and delete the existing record.
void MixERP.Net.Api.Core.UnitController.Edit ( int  unitId,
[FromBody] MixERP.Net.Entities.Core.Unit  unit 
)

Edits existing record with your instance of Unit class.

Parameters
unitYour instance of Unit class to edit.
unitIdEnter the value for UnitId in order to find and edit the existing record.
IEnumerable<MixERP.Net.Entities.Core.Unit> MixERP.Net.Api.Core.UnitController.Get ( )

Returns collection of unit for export.

Returns
MixERP.Net.Entities.Core.Unit MixERP.Net.Api.Core.UnitController.Get ( int  unitId)

Returns an instance of unit.

Parameters
unitIdEnter UnitId to search for.
Returns
IEnumerable<PetaPoco.CustomField> MixERP.Net.Api.Core.UnitController.GetCustomFields ( )

A custom field is a user defined field for units.

Returns
Returns an enumerable custom field collection of units.
IEnumerable<PetaPoco.CustomField> MixERP.Net.Api.Core.UnitController.GetCustomFields ( string  resourceId)

A custom field is a user defined field for units.

Returns
Returns an enumerable custom field collection of units.
IEnumerable<DisplayField> MixERP.Net.Api.Core.UnitController.GetDisplayFields ( )

Displayfield is a lightweight key/value collection of units.

Returns
Returns an enumerable key/value collection of units.
EntityView MixERP.Net.Api.Core.UnitController.GetEntityView ( )

Creates meta information of "unit" entity.

Returns
Returns the "unit" meta information to perform CRUD operation.
IEnumerable<MixERP.Net.Entities.Core.Unit> MixERP.Net.Api.Core.UnitController.GetFiltered ( long  pageNumber,
string  filterName 
)

Creates a filtered and paginated collection containing 25 units on each page, sorted by the property UnitId.

Parameters
pageNumberEnter the page number to produce the resultset.
filterNameThe named filter.
Returns
Returns the requested page from the collection using the supplied filters.
IEnumerable<MixERP.Net.Entities.Core.Unit> MixERP.Net.Api.Core.UnitController.GetPagedResult ( )

Creates a paginated collection containing 25 units on each page, sorted by the property UnitId.

Returns
Returns the first page from the collection.
IEnumerable<MixERP.Net.Entities.Core.Unit> MixERP.Net.Api.Core.UnitController.GetPagedResult ( long  pageNumber)

Creates a paginated collection containing 25 units on each page, sorted by the property UnitId.

Parameters
pageNumberEnter the page number to produce the resultset.
Returns
Returns the requested page from the collection.
IEnumerable<MixERP.Net.Entities.Core.Unit> MixERP.Net.Api.Core.UnitController.GetWhere ( long  pageNumber,
[FromBody] dynamic  filters 
)

Creates a filtered and paginated collection containing 25 units on each page, sorted by the property UnitId.

Parameters
pageNumberEnter the page number to produce the resultset.
filtersThe list of filter conditions.
Returns
Returns the requested page from the collection using the supplied filters.

The documentation for this class was generated from the following file: