public ActionResult Summary([Bind(Prefix="OrderFindForm")] OrderModel model)
 {
     SummaryContext context = new SummaryContext {
         ShowOrderFindForm = true
     };
     if (base.ModelState.IsValid)
     {
         DateTime? currentDate = model.CurrentDate;
         DateTime dateFrom = currentDate.HasValue ? currentDate.GetValueOrDefault() : DateTime.Now.Date;
         List<GuestClaim> claims = GuestProvider.FindGuestClaims(UrlLanguage.CurrentLanguage, 0, model.ClaimName, new int?(Convert.ToInt32(model.Claim)), null);
         if ((claims != null) && (claims.Count > 0))
         {
             int? nullable2;
             ReservationState reservationState = BookingProvider.GetReservationState(UrlLanguage.CurrentLanguage, claims[0].claim);
             if ((reservationState != null) && (nullable2 = reservationState.claimId).HasValue)
             {
                 context.Claim = reservationState;
                 context.ShowOrderFindForm = false;
                 context.Hotels = new List<DepartureHotel>();
                 foreach (GuestClaim claim in claims)
                 {
                     nullable2 = null;
                     context.Hotels.AddRange(GuestProvider.GetDepartureInfo(UrlLanguage.CurrentLanguage, dateFrom, dateFrom.AddDays(1.0), nullable2, new int?(claim.claim)));
                 }
                 context.GuideDurties = new List<HotelGuideResult>();
                 List<GuestOrder> list2 = GuestProvider.GetActiveHotelOrders(claims, dateFrom, dateFrom.AddDays(1.0));
                 if ((list2 != null) && (list2.Count > 0))
                 {
                     GuideController controller = new GuideController();
                     foreach (GuestOrder order in list2)
                     {
                         HotelGuideParam param = new HotelGuideParam {
                             h = order.hotelid,
                             ln = UrlLanguage.CurrentLanguage,
                             pb = new DateTime?(order.period.begin.Value),
                             pe = new DateTime?(order.period.end.Value)
                         };
                         HotelGuideResult item = controller.HotelGuide(param);
                         context.GuideDurties.Add(item);
                     }
                 }
             }
         }
     }
     context.OrderFindNotFound = context.Claim == null;
     return base.View(context);
 }
 public ActionResult Summary(GuestWebParams param)
 {
     SummaryContext model = new SummaryContext {
         ShowOrderFindForm = true,
         OrderFindForm = new OrderModel()
     };
     model.OrderFindForm.Claim = "";
     model.OrderFindForm.ClaimName = "";
     model.OrderFindForm.CurrentDate = new DateTime?(((param != null) && param.TestDate.HasValue) ? param.TestDate.Value.Date : DateTime.Now.Date);
     return base.View(model);
 }