Beispiel #1
0
 public TicketController(IPersonServ personServ, ICarriageServ carrServ, ISqlProcServ sqlServ, IStationServ statServ, IReservSeatServ seatServ, IStationOnRouteServ statOnRouteServ, ITicketServ ticketServ)
 {
     this.personServ      = personServ;
     this.carrServ        = carrServ;
     this.sqlServ         = sqlServ;
     this.statServ        = statServ;
     this.seatServ        = seatServ;
     this.statOnRouteServ = statOnRouteServ;
     this.ticketServ      = ticketServ;
     this.mapper          = new ObjMapper(this.sqlServ, this.carrServ, this.seatServ, this.statOnRouteServ, this.personServ, this.ticketServ);
 }
 public TrainController(ISqlProcServ sqlProcServ, IStationServ stationServ, ICarriageServ carrServ, IReservSeatServ seatServ, IStationOnRouteServ statOnRouteServ, IPersonServ personServ, ITicketServ ticketServ)
 {
     this.sqlProcService  = sqlProcServ;
     this.stationServ     = stationServ;
     this.carrServ        = carrServ;
     this.seatServ        = seatServ;
     this.personServ      = personServ;
     this.statOnRouteServ = statOnRouteServ;
     this.ticketServ      = ticketServ;
     mapper = new ObjMapper(this.sqlProcService, this.carrServ, this.seatServ, this.statOnRouteServ, this.personServ, this.ticketServ);
     FillFromTimesDropDown();
 }
Beispiel #3
0
        public ObjMapper(ISqlProcServ sqlProcServ, ICarriageServ carrServ, IReservSeatServ seatServ, IStationOnRouteServ statOnRouteServ, IPersonServ personServ, ITicketServ ticketServ)
        {
            this.seatServ        = seatServ;
            this.sqlProcService  = sqlProcServ;
            this.carrServ        = carrServ;
            this.statOnRouteServ = statOnRouteServ;
            this.personServ      = personServ;
            this.ticketServ      = ticketServ;

            config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <TrainByTwoStationsAndDate, TrainByStationsAndDate>();
                cfg.CreateMap <CarriageTypeInTrain, CarrTypesAndCountOfSeats>();
                cfg.CreateMap <FreeSeatInCarr, FreeSeatInCarriage>();
                cfg.AllowNullCollections = true;
            });
            mapper = config.CreateMapper();
        }