C# Class MainSaite.Controllers.CarsController

Inheritance: BaseController
Afficher le fichier Open project: CH033dotNET/Taxi

Méthodes publiques

Méthode 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

Méthode Description
CarPark ( ) : System.Web.Mvc.ActionResult

Method Details

AddNewCar() public méthode

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
Résultat System.Web.Mvc.JsonResult

CarsController() public méthode

public CarsController ( ICarManager carManager, IUserManager userManager, IWorkerStatusManager wsManager ) : System
carManager ICarManager
userManager IUserManager
wsManager IWorkerStatusManager
Résultat System

DeleteCar() public méthode

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
Résultat System.Web.Mvc.JsonResult

EditCar() public méthode

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
Résultat System.Web.Mvc.JsonResult

GetCarForEdit() public méthode

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
Résultat System.Web.Mvc.JsonResult

GiveCar() public méthode

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
Résultat System.Web.Mvc.JsonResult

ReturnCar() public méthode

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
Résultat System.Web.Mvc.JsonResult

SetCarStatus() public méthode

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
Résultat System.Web.Mvc.JsonResult

SortBy() public méthode

public SortBy ( string parameter ) : System.Web.Mvc.JsonResult
parameter string
Résultat System.Web.Mvc.JsonResult