C# 클래스 BAL.Manager.CarManager

상속: BAL.Manager.BaseManager, ICarManager
파일 보기 프로젝트 열기: CH033dotNET/Taxi 1 사용 예제들

공개 메소드들

메소드 설명
CarManager ( IUnitOfWork uOW ) : System
ChangeCarToMain ( int carId, int userId ) : string

Manager method that is used to change car`s isUsed property.

EditCar ( CarDTO car ) : CarDTO

Finds a car entry in repository which id is equal to input object id

EndAllCurrentUserShifts ( int id, string timeStop ) : string

Finishes current driver`s workshift, plus ends all user`s unfinished shifts

EndWorkShiftEvent ( int id ) : void

Ends workshift entry which driver`s id is matching input parameters value

FindMainCar ( int id ) : bool
GetCarByCarID ( int id ) : CarDTO

Gets a car which id is matching the value of input parameter

GetWorkShiftsByWorkerId ( int WorkerId ) : bool

Searches for uncompleted WorkShifts for driver with specific Id. If they are avialable, returns true, if not - false.

GetWorkingDrivers ( ) : IEnumerable

Gets list of workers from a pero by specific criteria. If criteria is not matching returns null

GiveAwayCar ( int CarId, int NewCarUserId ) : string

Manager method that is used to set specific car objects UserId property, used to determine who is currently using specific car.

StartWorkEvent ( int id, string TimeStart ) : void

Starting workshift for a driver which id is matching input parameter`s value

addCar ( CarDTO car ) : void

Adds new Car to repository

deleteCarByID ( int id ) : string

Finds car by it`s id and deletes it

getCars ( ) : IEnumerable

Gets all car entries from repository

getCarsByUserID ( int id ) : IEnumerable

Gets list of cars which user`s id is equal to the value of input parameter

getCarsByUserID ( int id, string parameter ) : IEnumerable

비공개 메소드들

메소드 설명
MakeACarMain ( Car carToChange ) : string

Private manager method taht is used to change isMain property of a specific car object`s property.

MakeACarMain ( int carId, int userId ) : string

Private manager method taht is used to change isMain property of a specific car object`s property.

NewWorkerShift ( int id ) : void

Creates new workshift entry. WorkEnded property is null

SetCarStateModified ( Car newCarObj, CarDTO inputCarObj ) : CarDTO

Edits car object using values from second input object and maps edited object to another type

메소드 상세

CarManager() 공개 메소드

public CarManager ( IUnitOfWork uOW ) : System
uOW IUnitOfWork
리턴 System

ChangeCarToMain() 공개 메소드

Manager method that is used to change car`s isUsed property.
public ChangeCarToMain ( int carId, int userId ) : string
carId int Input parameter that represents specific car object`s id.
userId int Input parameter that represents id of a current user.
리턴 string

EditCar() 공개 메소드

Finds a car entry in repository which id is equal to input object id
public EditCar ( CarDTO car ) : CarDTO
car Model.DTO.CarDTO input object
리턴 Model.DTO.CarDTO

EndAllCurrentUserShifts() 공개 메소드

Finishes current driver`s workshift, plus ends all user`s unfinished shifts
public EndAllCurrentUserShifts ( int id, string timeStop ) : string
id int user`s id
timeStop string
리턴 string

EndWorkShiftEvent() 공개 메소드

Ends workshift entry which driver`s id is matching input parameters value
public EndWorkShiftEvent ( int id ) : void
id int input parameter
리턴 void

FindMainCar() 공개 메소드

public FindMainCar ( int id ) : bool
id int
리턴 bool

GetCarByCarID() 공개 메소드

Gets a car which id is matching the value of input parameter
public GetCarByCarID ( int id ) : CarDTO
id int input parameter
리턴 Model.DTO.CarDTO

GetWorkShiftsByWorkerId() 공개 메소드

Searches for uncompleted WorkShifts for driver with specific Id. If they are avialable, returns true, if not - false.
public GetWorkShiftsByWorkerId ( int WorkerId ) : bool
WorkerId int drivers id
리턴 bool

GetWorkingDrivers() 공개 메소드

Gets list of workers from a pero by specific criteria. If criteria is not matching returns null
public GetWorkingDrivers ( ) : IEnumerable
리턴 IEnumerable

GiveAwayCar() 공개 메소드

Manager method that is used to set specific car objects UserId property, used to determine who is currently using specific car.
public GiveAwayCar ( int CarId, int NewCarUserId ) : string
CarId int Input parameter that represents car object`s id.
NewCarUserId int Input paramenter that represents new car object`s id.
리턴 string

StartWorkEvent() 공개 메소드

Starting workshift for a driver which id is matching input parameter`s value
public StartWorkEvent ( int id, string TimeStart ) : void
id int input parameter
TimeStart string
리턴 void

addCar() 공개 메소드

Adds new Car to repository
public addCar ( CarDTO car ) : void
car Model.DTO.CarDTO input object
리턴 void

deleteCarByID() 공개 메소드

Finds car by it`s id and deletes it
public deleteCarByID ( int id ) : string
id int value that represents car id
리턴 string

getCars() 공개 메소드

Gets all car entries from repository
public getCars ( ) : IEnumerable
리턴 IEnumerable

getCarsByUserID() 공개 메소드

Gets list of cars which user`s id is equal to the value of input parameter
public getCarsByUserID ( int id ) : IEnumerable
id int
리턴 IEnumerable

getCarsByUserID() 공개 메소드

public getCarsByUserID ( int id, string parameter ) : IEnumerable
id int
parameter string
리턴 IEnumerable