public ItemOptions(IBtwTypeData btwTypeData, ICatagoryData catagoryData, IStationData stationData) { /* * IBtwTypeData btwTypeData = DependencyResolver.Current.GetService<IBtwTypeData>(); * ICatagoryData catagoryData = DependencyResolver.Current.GetService<ICatagoryData>(); * IStationData stationData = DependencyResolver.Current.GetService<IStationData>(); */ BtwTypes = btwTypeData.GetAll(); Catagories = catagoryData.GetAll(); Stations = stationData.GetAll(); }
public ReceiptDetails(IBtwTypeData btwTypeData, IItemData itemData, IReservationData reservationData, IReservationItemData reservationItemData, ITableData tableData, IWaiterData waiterData, int reservationId) { Reservation reservation = reservationData.Get(reservationId); Waitername = waiterData.Get(reservation.WaitorId).Name; StartTime = reservation.StartTime; TableNumber = tableData.Get(reservation.TableId).Number; List <ReservationItemDetail> newReservationItems = new List <ReservationItemDetail>(); IEnumerable <ReservationItem> reservationItems = reservationItemData.Get(reservationId); foreach (ReservationItem reservationItem in reservationItems) { newReservationItems.Add(new ReservationItemDetail(itemData, reservationItemData, reservationItem.ReservationId, reservationItem.ItemId)); } this.reservationItems = newReservationItems; BtwTypes = btwTypeData.GetAll(); }