public ActionResult Departure(GuestWebParams param)
 {
     DepartureContext context;
     DateTime date = ((param != null) && param.TestDate.HasValue) ? param.TestDate.Value.Date : DateTime.Now.Date;
     if (WebSecurity.IsAuthenticated)
     {
         context = new DepartureContext();
         List<GuestClaim> list = GuestProvider.GetActiveClaims(UrlLanguage.CurrentLanguage, WebSecurity.CurrentUserId, date);
         if ((list != null) && (list.Count > 0))
         {
             context.Hotels = new List<DepartureHotel>();
             foreach (GuestClaim claim in list)
             {
                 int? hotel = null;
                 context.Hotels.AddRange(GuestProvider.GetDepartureInfo(UrlLanguage.CurrentLanguage, date, date.AddDays(1.0), hotel, new int?(claim.claim)));
             }
         }
         return base.View(context);
     }
     if (HttpPreferences.Current.LocationHotel != null)
     {
         context = new DepartureContext {
             Hotel = CatalogProvider.GetHotelDescription(UrlLanguage.CurrentLanguage, HttpPreferences.Current.LocationHotel)
         };
         if (context.Hotel != null)
         {
             context.Hotels = GuestProvider.GetDepartureInfo(UrlLanguage.CurrentLanguage, date, date.AddDays(1.0), new int?(context.Hotel.id), null);
         }
         return base.View(context);
     }
     string str = base.Url.RouteUrl(base.Request.QueryStringAsRouteValues());
     return base.RedirectToAction("login", "account", new { returnUrl = str });
 }
 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);
 }
 public ActionResult Brief(GuestWebParams param)
 {
     BriefContext model = new BriefContext();
     return base.View(model);
 }
 public ActionResult Index(GuestWebParams param)
 {
     GuestContext model = new GuestContext();
     if (WebSecurity.IsAuthenticated)
     {
         DateTime firstDate = ((param != null) && param.TestDate.HasValue) ? param.TestDate.Value.Date : DateTime.Now.Date;
         model.GuideDurties = new List<HotelGuideResult>();
         List<GuestOrder> list = GuestProvider.GetActiveHotelOrders(UrlLanguage.CurrentLanguage, WebSecurity.CurrentUserId, firstDate, firstDate.AddDays(1.0));
         if ((list != null) && (list.Count > 0))
         {
             GuideController controller = new GuideController();
             foreach (GuestOrder order in list)
             {
                 HotelGuideParam param2 = 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(param2);
                 model.GuideDurties.Add(item);
             }
         }
     }
     else
     {
         model.ShowAuthenticationMessage = true;
     }
     return base.View(model);
 }