Class SiteController
The Site 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/Site
Methods
Create(SiteModel)
Creates a new site using the specified parameters.
Declaration
public JsonResult Create(SiteModel model)
Parameters
Type | Name | Description |
---|---|---|
SiteModel | model | Model of the site to be created. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | The ID associated with the new site if successfully created. |
Delete(Guid)
Deletes the site as specified by the site ID.
Declaration
public JsonResult Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the site to be deleted. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult |
|
GetByNumber(String)
Gets the Site by Number.
Declaration
public JsonResult GetByNumber(string number)
Parameters
Type | Name | Description |
---|---|---|
System.String | number | Number of the Site |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | The Site if found. |
GetSite(Guid)
Gets all properties of a given site.
Declaration
public JsonResult GetSite(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the site. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | Model of the site corresponding to the Site ID. |
GetSiteAttributes(Guid)
Gets all attributes associated with a given site.
Declaration
public JsonResult GetSiteAttributes(Guid siteID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | siteID | ID of the site. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | Attributes associated with the site. |
GetSiteAttributesByNumber(String)
Gets all attributes associated with a given site.
Declaration
public JsonResult GetSiteAttributesByNumber(string number)
Parameters
Type | Name | Description |
---|---|---|
System.String | number | number of the site. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | Attributes associated with the site. |
GetSiteByNumber(String)
Gets all properties of a given site.
Declaration
public JsonResult GetSiteByNumber(string number)
Parameters
Type | Name | Description |
---|---|---|
System.String | number | Number of the site. |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult | Model of the site corresponding to the Site Number. |
OnActionExecuting(ActionExecutingContext)
Declaration
protected override void OnActionExecuting(ActionExecutingContext filterContext)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.ActionExecutingContext | filterContext |
Overrides
Search(String, Int32)
Searches all sites.
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 | Number and Site ID of all the results that match the search term. |
Update(Guid, String, String, Nullable<Guid>, Nullable<Guid>, String, Nullable<Double>, Nullable<Double>, String, Nullable<Guid>)
Updates the site with the specified parameters.
Declaration
public JsonResult Update(Guid id, string number, string description, Guid? companyID, Guid? siteTypeID, string siteAt, double? latitude, double? longitude, string generaleNote, Guid? areaID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of the site to be updated. |
System.String | number | Number of the site to be updated. |
System.String | description | Description of the site to be updated. |
System.Nullable<System.Guid> | companyID | |
System.Nullable<System.Guid> | siteTypeID | |
System.String | siteAt | |
System.Nullable<System.Double> | latitude | |
System.Nullable<System.Double> | longitude | |
System.String | generaleNote | |
System.Nullable<System.Guid> | areaID |
Returns
Type | Description |
---|---|
System.Web.Mvc.JsonResult |
|