Esempio n. 1
0
        static void Main(string[] args)
        {
            //set console
            SetConsole();

            //get input
            string startDate;
            string endDate;

            Console.WriteLine("Input @startDate");
            startDate = Console.ReadLine();
            Console.WriteLine("Input @endDate");
            endDate = Console.ReadLine();

            //do work
            _scheduleManager = new ScheduleManager();
            _scheduleManager.GenerateSchedule(startDate, endDate);
            List <Schedule> scheduleList = _scheduleManager.GetSchedule("SELECT * FROM [airport].[dbo].[Schedule]");

            foreach (Schedule s in scheduleList)
            {
                Console.WriteLine(s.ToString());
            }
            //do not close window
            Console.ReadLine();
        }
Esempio n. 2
0
 /// <summary>
 /// Creator: Jordan Lindo
 /// Created: 4/8/2020
 /// Approver: Chase Schulte
 ///
 /// Generates a new schedule.
 /// </summary>
 /// <remarks>
 /// Updater: NA
 /// Updated: NA
 /// Update: NA
 ///
 /// </remarks>
 private void btnNewSchedule_Click(object sender, RoutedEventArgs e)
 {
     getBaseSchedule();
     if (_baseScheduleVM != null)
     {
         try
         {
             DateTime              startDate = getStartDate();
             ScheduleVM            vM        = _scheduleManager.GenerateSchedule(startDate, _baseScheduleVM.BaseScheduleLines);
             frmConfirmNewSchedule confirm   = new frmConfirmNewSchedule(_user, vM);
             if ((bool)confirm.ShowDialog())
             {
                 vM.ScheduleID = _scheduleManager.AddSchedule(vM);
                 _scheduleManager.AddScheduledHours(vM.ScheduleID);
                 getSchedules();
                 setCboDateRange();
             }
         }
         catch (Exception ex)
         {
             WPFErrorHandler.ErrorMessage(ex.Message);
         }
     }
 }