C# Класс MainSaite.Controllers.CarsController

Наследование: BaseController
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
CarPark ( ) : System.Web.Mvc.ActionResult

Описание методов

AddNewCar() публичный Метод

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
Результат System.Web.Mvc.JsonResult

CarsController() публичный Метод

public CarsController ( ICarManager carManager, IUserManager userManager, IWorkerStatusManager wsManager ) : System
carManager ICarManager
userManager IUserManager
wsManager IWorkerStatusManager
Результат System

DeleteCar() публичный Метод

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
Результат System.Web.Mvc.JsonResult

EditCar() публичный Метод

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
Результат System.Web.Mvc.JsonResult

GetCarForEdit() публичный Метод

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
Результат System.Web.Mvc.JsonResult

GiveCar() публичный Метод

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
Результат System.Web.Mvc.JsonResult

ReturnCar() публичный Метод

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
Результат System.Web.Mvc.JsonResult

SetCarStatus() публичный Метод

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
Результат System.Web.Mvc.JsonResult

SortBy() публичный Метод

public SortBy ( string parameter ) : System.Web.Mvc.JsonResult
parameter string
Результат System.Web.Mvc.JsonResult