Пример #1
0
        public MainForm()
        {
            hotel  = new Hotel();
            guests = new Guests(hotel);
            InitializeComponent();
            hotelBindingSource.DataSource  = hotel;
            guestsBindingSource.DataSource = guests;
            InformChange += updateMainFormData;

            ////////
            hotel.AddFloor();
            hotel.AddFloor();
            hotel.AddRoomRange(1, 215, 220, "FIRSTЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕЕ", 3, 15);
            guests.SettleGuests(216, new DateTime(2016, 5, 14), new Guest("Ivan", "Petrov", "0502122222"));
            showHotelPanel();
        }
Пример #2
0
 public MainForm()
 {
     dataBase = new DataBase("..\\..\\database.xml");
     try
     {
         dataBase = new DataBase("..\\..\\database.xml");
     }
     catch
     {
         errorMessageShow("Произошла ошибка чтения данных. Приложение будет закрыто.");
         Environment.Exit(0);
     }
     hotel  = new Hotel(dataBase);
     guests = new Guests(hotel, dataBase);
     InitializeComponent();
     hotelBindingSource.DataSource  = hotel;
     guestsBindingSource.DataSource = guests;
     InformChange += updateMainFormData;
     InformChange();
 }
 // Конструктор.
 public ChangeLeaveForm(Guests g)
 {
     InitializeComponent();
     guests = g;
     leaveDatePicker.MinDate = DateTime.Today;
 }
Пример #4
0
 // Конструктор.
 public AddGuestsForm(Guests g)
 {
     guests = g;
     InitializeComponent();
     datePicker.MinDate = DateTime.Today.AddDays(1);
 }
 public FindGuestsForm(Guests g)
 {
     guests = g;
     InitializeComponent();
 }
 public DeleteGuestsForm(Guests g, Hotel h)
 {
     InitializeComponent();
     hotel  = h;
     guests = g;
 }