Class AreaController
The Area Controller is a controller that allows data to be retrieved and updated within the Ayuda Platform.
Namespace: Ayuda.BMS.Splash.Areas.Pi.Controllers
Remarks
This web service can be accessed using an address similar to the following: https://[AYUDA DEPLOYMENT URL]/Juice/Pi/Area
Methods
Create(AreaModel)
Creates a new Area using the specified parameters.
Declaration
public JsonResult Create(AreaModel model)
Parameters
Type | Name | Description |
---|---|---|
AreaModel | model | Model of the Area to be created. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | The ID associated with the new Area if successfully created. |
Delete(Guid)
Deletes the Area as specified by the id.
Declaration
public JsonResult Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the Area to be deleted. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult |
|
GetAll()
Gets all Areas
Declaration
public JsonResult GetAll()
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | All areas. |
GetByCode(String)
Gets the Area by Code.
Declaration
public JsonResult GetByCode(string code)
Parameters
Type | Name | Description |
---|---|---|
System.String | code | Code of the Area |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | The Area if found. |
Update(Guid, String, String, String, Nullable<Guid>, Nullable<Boolean>)
Updates the Area with the specified parameters.
Declaration
public JsonResult Update(Guid id, string culture, string code, string name, Guid? parentAreaID, bool? isLive)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the Area to be updated. |
System.String | culture | Language to update (if updating localizable fields). |
System.String | code | System code of the Area. |
System.String | name | Name of the Area. Localizable. |
System.Nullable<System.Guid> | parentAreaID | ID of the Area under which this Area should be created, forming a hierarchy. |
System.Nullable<System.Boolean> | isLive | True if the Direction Facing is available and usable. False if it is archived. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult |
|