Class SalesMarketController
The SalesMarket 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/SalesMarket
Methods
AreLocalizableFieldsBeingUpdated(NameValueCollection)
Declaration
protected override bool AreLocalizableFieldsBeingUpdated(NameValueCollection requestData)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Specialized.NameValueCollection | requestData |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Create(SalesMarketModel)
Creates a new Sales Market using the specified parameters.
Declaration
public JsonResult Create(SalesMarketModel model)
Parameters
| Type | Name | Description |
|---|---|---|
| SalesMarketModel | model | Model of the Sales Market to be created. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult | The ID associated with the new Sales Market if successfully created. |
Delete(Guid)
Deletes the Sales Market as specified by the id.
Declaration
public JsonResult Delete(Guid id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | id | ID of the SalesMarket to be deleted. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult |
|
GetByCode(String)
Gets the SalesMarket by Code.
Declaration
public JsonResult GetByCode(string code)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | code | Code of the SalesMarket |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult | The SalesMarket if found. |
LinkAreaGroup(Guid, Guid)
Links an Area Group to a Sales Market
Declaration
public JsonResult LinkAreaGroup(Guid salesMarketID, Guid areaGroupID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | salesMarketID | ID of the Sales Market that will contain the Area Group. |
| System.Guid | areaGroupID | ID of the Area Group to link. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult |
|
OnActionExecuting(ActionExecutingContext)
Declaration
protected override void OnActionExecuting(ActionExecutingContext filterContext)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Web.Mvc.ActionExecutingContext | filterContext |
Overrides
UnlinkAreaGroup(Guid, Guid)
Unlinks an Area Group from a Sales Market
Declaration
public JsonResult UnlinkAreaGroup(Guid salesMarketID, Guid areaGroupID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | salesMarketID | ID of the Sales market from which to unlink the Area Group. |
| System.Guid | areaGroupID | ID of the Area Group to unlink. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult |
|
Update(Guid, String, String, String, Nullable<Guid>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>)
Updates the Sales Market with the specified parameters.
Declaration
public JsonResult Update(Guid id, string culture, string code, string name, Guid? officeID, int? population, int? totalCirculation, int? dailyGRP, bool? isLive)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | id | ID of the Sales Market to be updated. |
| System.String | culture | Language to update (if updating localizable fields). |
| System.String | code | Code of the Sales Market. |
| System.String | name | Name of the Sales Market. Localizable. |
| System.Nullable<System.Guid> | officeID | ID of the Office to which the Sales Market belongs. |
| System.Nullable<System.Int32> | population | Population of the Sales Market. |
| System.Nullable<System.Int32> | totalCirculation | Total Circulation of the Sales Market. |
| System.Nullable<System.Int32> | dailyGRP | Daily GRP (Gross Rating Point) of the Sales Market. |
| System.Nullable<System.Boolean> | isLive | True if the Sales Market is available and usable. False if it is archived. |
Returns
| Type | Description |
|---|---|
| System.Web.Mvc.JsonResult |
|