'
Show / Hide Table of Contents

Class LocationController

The Location 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/Location

Methods

Create(LocationModel)

Creates a new location using the specified parameters.

Declaration
public JsonResult Create(LocationModel model)
Parameters
Type Name Description
LocationModel model

Model of the location to be created.

Returns
Type Description
System.Web.Mvc.JsonResult

The ID associated with the new digital pack if successfully created.

Delete(Nullable<Guid>, Nullable<Guid>)

Delete a location.

Declaration
public JsonResult Delete(Guid? id, Guid? locationID)
Parameters
Type Name Description
System.Nullable<System.Guid> id

The Id of the location to be deleted.

System.Nullable<System.Guid> locationID

The Id of the location to be deleted. Can be used as an alternate to the field, if the class is used.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded boolean. true if the delete succeeded, else false.

GetByID(Guid)

Gets all properties of a given location.

Declaration
public JsonResult GetByID(Guid id)
Parameters
Type Name Description
System.Guid id

LocationID of the Location.

Returns
Type Description
System.Web.Mvc.JsonResult

Model of the location corresponding to the LocationID.

ListFrames(Guid)

Gets all frames associated with a location

Declaration
public JsonResult ListFrames(Guid locationID)
Parameters
Type Name Description
System.Guid locationID

ID of the location

Returns
Type Description
System.Web.Mvc.JsonResult

Array containing the frames corresponding to the Frame Number.

Search(String, Int32)

Searches all locations.

Declaration
public JsonResult Search(string term, int limit = 25)
Parameters
Type Name Description
System.String term

Term to search.

System.Int32 limit
Returns
Type Description
System.Web.Mvc.JsonResult

Code, Description and facePackID of all the results that match the search term.

Update(Nullable<Guid>, Nullable<Guid>, String, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, Nullable<Boolean>, Nullable<DateTime>, Nullable<DateTime>, Nullable<Guid>, Nullable<Guid>)

Update the specified Location.

Only the ID of the Location and the fields to be updated need to be specified
Note that if a location has faces associated to it, only the description can be altered Currently changing the site or location associated to the location is not supported

Declaration
public JsonResult Update(Guid? id, Guid? locationID, string description, Guid? locationTypeID, Guid? locationTypeValueID, Guid? subLocationTypeID, Guid? subLocationTypeValueID, bool? isSaleable, DateTime? saleableAsOfDate, DateTime? retiredAsOfDate, Guid? siteID, Guid? vehicleID)
Parameters
Type Name Description
System.Nullable<System.Guid> id

The Id of the location to be updated.

System.Nullable<System.Guid> locationID

The Id of the location to be updated. Can be used as an alternate to the field, if the class is used.

System.String description

The description of the location to be updated

System.Nullable<System.Guid> locationTypeID

The locationTypeID of the location to be updated. Used to calculate the code.

System.Nullable<System.Guid> locationTypeValueID

The locationTypeValueID of the location to be updated. Used to calculate the code

System.Nullable<System.Guid> subLocationTypeID

The subLocationID of the location to be updated. Used to calculate the code

System.Nullable<System.Guid> subLocationTypeValueID

The subLocationTypeValueID of the location to be updated. Used to calculate the code

System.Nullable<System.Boolean> isSaleable

Wether faces on the location is saleable or not. Only editable if the location has no faces

System.Nullable<System.DateTime> saleableAsOfDate

Date from which the faces on the location are saleable. Only editable if the location has no faces

System.Nullable<System.DateTime> retiredAsOfDate

Date beyond which the faces on the location are no longer saleable. Only editable if the location has no faces

System.Nullable<System.Guid> siteID

The ID of the site associated with the location, if there are no vehicle associated with it. Ignored if vehicleID is provided

System.Nullable<System.Guid> vehicleID

The ID of the site associated with the location, if any.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded boolean. true if the update succeeded, else false.

Back to top Generated by DocFX