Exemple #1
0
 private static void RunSilverCreek()
 {
     ExcelWriter excelWriter = new ExcelWriter(EXCEL_OUTPUT_PATH + ResortName.SILVER_CREEK.Name + @"\");
     ResortAvailability resortAvailability = SilverCreek.GetResortAvailability(SilverCreek.START_DATE, SilverCreek.END_DATE);
     excelWriter.WriteHotelAvailability(resortAvailability.HotelAvailabilities[HotelName.SILVER_CREEK]);
     EmailSender.SendEmail(EXCEL_OUTPUT_PATH, HotelName.SILVER_CREEK);
 }
Exemple #2
0
 private static void RunSummitPenthouses()
 {
     ExcelWriter excelWriter = new ExcelWriter(EXCEL_OUTPUT_PATH + ResortName.SUMMIT_PENTHOUSES.Name + @"\");
     ResortAvailability resortAvailability = SummitPenthouses.GetResortAvailability(SummitPenthouses.START_DATE, SummitPenthouses.END_DATE); 
     excelWriter.WriteHotelAvailability(resortAvailability.HotelAvailabilities[HotelName.SUMMIT_PENTHOUSES]);
     EmailSender.SendEmail(EXCEL_OUTPUT_PATH, HotelName.SUMMIT_PENTHOUSES);
 }
Exemple #3
0
 private static void RunMysticSprings()
 {
     ExcelWriter excelWriter = new ExcelWriter(EXCEL_OUTPUT_PATH + ResortName.MYSTIC_SPRINGS.Name + @"\");
     ResortAvailability resortAvailability = MysticSprings.GetResortAvailability(MysticSprings.START_DATE, MysticSprings.END_DATE);  
     excelWriter.WriteHotelAvailability(resortAvailability.HotelAvailabilities[HotelName.MYSTIC_SPRINGS]);
     EmailSender.SendEmail(EXCEL_OUTPUT_PATH, HotelName.MYSTIC_SPRINGS);
 }
Exemple #4
0
 private static void RunFireMountain()
 {
     ExcelWriter excelWriter = new ExcelWriter(EXCEL_OUTPUT_PATH + ResortName.FIRE_MOUNTAIN.Name + @"\");
     ResortAvailability resortAvailability = FireMountain.GetResortAvailability(FireMountain.START_DATE, FireMountain.END_DATE);   //;
     excelWriter.WriteHotelAvailability(resortAvailability.HotelAvailabilities[HotelName.FIRE_MOUNTAIN]);
     EmailSender.SendEmail(EXCEL_OUTPUT_PATH, HotelName.FIRE_MOUNTAIN);
 }
Exemple #5
0
 private static void RunBanffBoundary()
 {
     ExcelWriter excelWriter = new ExcelWriter(EXCEL_OUTPUT_PATH + ResortName.BANFF_BOUNDARY.Name + @"\");
     ResortAvailability resortAvailability = BanffBoundary.GetResortAvailability(BanffBoundary.START_DATE, BanffBoundary.END_DATE);
     excelWriter.WriteHotelAvailability(resortAvailability.HotelAvailabilities[HotelName.BANFF_BOUNDARY]);
     EmailSender.SendEmail(EXCEL_OUTPUT_PATH, HotelName.BANFF_BOUNDARY);
 }
Exemple #6
0
        public static async void AddAvailabilityForDate(ResortAvailability resortAvailability, DateTime startDate, Dictionary <string, string> relevantHeaders)
        {
            string cookie            = relevantHeaders["Cookie"];
            string rwid              = relevantHeaders["rwid"];
            string url               = "https://www.reseze.net/servlet/WebresShowAvailable";
            string arrivalDateString = String.Format("&arrivalMonth=%d&arrivalDay=%d&arrivalYear=%d", startDate.Month, startDate.Day, startDate.Year);
            string postBody          = "rwid=" + rwid + arrivalDateString + "&nightsStay=2&buildingCodeRoomType=any%7Cany&numberRooms=1&adults=1&children=0&age3=0&age4=0&rateCode=&groupId=&iataNumber=&ownerReservation=false&check=Check+Now";
            string html              = await GetPage(url, postBody, cookie);

            //SilverStarParser.parseAvailabilityForDate(html, startDate, resortAvailability);
        }
Exemple #7
0
        public static void Run()
        {
            ResortAvailability resortAvailability = GetResortAvailability(START_DATE, END_DATE);

            foreach (KeyValuePair <string, RoomAvailability> roomAvailability in resortAvailability.HotelAvailabilities[HotelName.SILVER_CREEK].RoomAvailabilities)
            {
                foreach (KeyValuePair <DateTime, AvailabilityType> availability in roomAvailability.Value.TotalAvailability)
                {
                    Console.WriteLine(DateUtils.GetReadableDateFormat(availability.Key) + ": " + availability.Value);
                }
                Console.WriteLine("\n");
            }
            Console.WriteLine("SUCCESS");
        }