C# Class MainSaite.Controllers.CarsController

Inheritance: BaseController
Mostrar archivo Open project: CH033dotNET/Taxi

Public Methods

Method Description
AddNewCar ( CarDTO car ) : System.Web.Mvc.JsonResult

Gets an object from ajax call and adds it to database

CarsController ( ICarManager carManager, IUserManager userManager, IWorkerStatusManager wsManager ) : System
DeleteCar ( int Id ) : System.Web.Mvc.JsonResult

Get an id from ajax call and deletes a car object with current id

EditCar ( CarDTO car ) : System.Web.Mvc.JsonResult

Gets an object from ajax call, edits it and saves changes to db

GetCarForEdit ( int Id ) : System.Web.Mvc.JsonResult

Get an id from ajax call and returns a car object with current id.

GiveCar ( int CarId, int DriverId ) : System.Web.Mvc.JsonResult

Gets specific id`s from ajax call and interpret them as values of specific object`s properties.

ReturnCar ( int CarId, int RealOwnerId ) : System.Web.Mvc.JsonResult

Gets specific id`s from ajax call and interpret them as values of specific object`s properties.

SetCarStatus ( int Id ) : System.Web.Mvc.JsonResult

Gets specific id form ajax call and sets Car object status, which id matching received id value.

SortBy ( string parameter ) : System.Web.Mvc.JsonResult

Private Methods

Method Description
CarPark ( ) : System.Web.Mvc.ActionResult

Method Details

AddNewCar() public method

Gets an object from ajax call and adds it to database
public AddNewCar ( CarDTO car ) : System.Web.Mvc.JsonResult
car Model.DTO.CarDTO object from ajax call
return System.Web.Mvc.JsonResult

CarsController() public method

public CarsController ( ICarManager carManager, IUserManager userManager, IWorkerStatusManager wsManager ) : System
carManager ICarManager
userManager IUserManager
wsManager IWorkerStatusManager
return System

DeleteCar() public method

Get an id from ajax call and deletes a car object with current id
public DeleteCar ( int Id ) : System.Web.Mvc.JsonResult
Id int Id from ajax call
return System.Web.Mvc.JsonResult

EditCar() public method

Gets an object from ajax call, edits it and saves changes to db
public EditCar ( CarDTO car ) : System.Web.Mvc.JsonResult
car Model.DTO.CarDTO input car object
return System.Web.Mvc.JsonResult

GetCarForEdit() public method

Get an id from ajax call and returns a car object with current id.
public GetCarForEdit ( int Id ) : System.Web.Mvc.JsonResult
Id int id from ajax call
return System.Web.Mvc.JsonResult

GiveCar() public method

Gets specific id`s from ajax call and interpret them as values of specific object`s properties.
public GiveCar ( int CarId, int DriverId ) : System.Web.Mvc.JsonResult
CarId int id of a car object
DriverId int Id of a driver
return System.Web.Mvc.JsonResult

ReturnCar() public method

Gets specific id`s from ajax call and interpret them as values of specific object`s properties.
public ReturnCar ( int CarId, int RealOwnerId ) : System.Web.Mvc.JsonResult
CarId int olololo
RealOwnerId int ololololo
return System.Web.Mvc.JsonResult

SetCarStatus() public method

Gets specific id form ajax call and sets Car object status, which id matching received id value.
public SetCarStatus ( int Id ) : System.Web.Mvc.JsonResult
Id int
return System.Web.Mvc.JsonResult

SortBy() public method

public SortBy ( string parameter ) : System.Web.Mvc.JsonResult
parameter string
return System.Web.Mvc.JsonResult