public List <PurchaseHistoryDto> GetPurchaseHistory(string userId) { List <PurchaseHistory> ph = _purchaseHistoryRepository.GetAll().Where(p => p.UserId == userId).ToList(); var phdto = new List <PurchaseHistoryDto>(); foreach (var item in ph) { TMEventSeatDto seat = _tmeventSeatService.GetTMEventSeat(item.TMEventSeatId); TMEventAreaDto area = _tmeventAreaService.GetTMEventArea(seat.TMEventAreaId); phdto.Add(new PurchaseHistoryDto { SeatObj = seat, BookingDate = item.BookingDate, AreaPrice = area.Price, TMEventObj = _tmeventService.GetTMEvent(area.TMEventId), }); } return(phdto); }
public PartialViewResult SetPrice(int id = 0) { return(PartialView("_SetPrice", _tmeventAreaService.GetTMEventArea(id))); }