Esempio n. 1
0
 public Client_Edit_Form()
 {
     try { bll = BLLmain.GetInfo(); }
     catch (ArgumentNullException) { }
     InitializeComponent();
     Client_editPNTBox.Text = bll.Clients[k].phone_number;
 }
Esempio n. 2
0
        //List<Client> temp_clients = new List<Client>();

        public Order_Add_Form(List <Client> clients, List <Hotels> hotels, List <Room> rooms)
        {
            try { bll = BLLmain.GetInfo(); }
            catch (ArgumentNullException) { }
            InitializeComponent();
            temp_hotels   = hotels;
            temp_rooms    = rooms;
            textBox1.Text = DateTime.Now.ToShortDateString();
            comboBox3.Items.Clear();
            for (int i = 0; i < clients.Count; i++)
            {
                comboBox1.Items.Add(clients[i].surname + " " + clients[i].name + " " + clients[i].patronymic);
            }
            for (int i = 0; i < hotels.Count; i++)
            {
                comboBox2.Items.Add(hotels[i].hotel_name);
            }
            DateTime temp = DateTime.Now;

            for (int i = 0; i < 7; i++)
            {
                temp = temp.AddDays(1);
                comboBox4.Items.Add(temp.ToShortDateString());
            }
        }
Esempio n. 3
0
 public Room_Edit_Form()
 {
     try { bll = BLLmain.GetInfo(); }
     catch (ArgumentNullException) { }
     InitializeComponent();
     Room_editPTextBox.Text = bll.Rooms[k].price.ToString("F", CultureInfo.CreateSpecificCulture("fr-FR"));
 }
Esempio n. 4
0
 public Main_Form()
 {
     try { bll = BLLmain.GetInfo(); }
     catch (ArgumentNullException) { }
     InitializeComponent();
     SelfRef = this;
     ShowHotels(bll.Hotels);
     ShowClients(bll.Clients);
     ShowRooms(bll.Rooms);
     ShowOrders(bll.Orders);
 }
Esempio n. 5
0
        private void tabData_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (tabData.SelectedIndex)
            {
            case 0:
            {
                try { bll = BLLmain.GetInfo(); }
                catch (ArgumentNullException) { }
                ShowHotels(bll.Hotels);
            }
            break;

            case 1:
            {
                try { bll = BLLmain.GetInfo(); }
                catch (ArgumentNullException) { }
                ShowClients(bll.Clients);
            }
            break;

            case 2:
            {
                try { bll = BLLmain.GetInfo(); }
                catch (ArgumentNullException) { }
                if (toolStripComboBox1.SelectedIndex == 0)
                {
                    ShowRooms(bll.Rooms);
                }
                else
                {
                    ShowHotelRooms(bll.Rooms);
                }
            }
            break;

            case 3:
            {
                try { bll = BLLmain.GetInfo(); }
                catch (ArgumentNullException) { }
                ShowOrders(bll.Orders);
            }
            break;

            default:
                break;
            }
        }