Exemplo n.º 1
0
        private void Save_Click(object sender, EventArgs e)
        {
            string name     = nameTextBox.Text;
            string tempArea = areaTextBox.Text;
            string tempRent = rentTextBox.Text;

            if (name == null || tempArea == null || tempRent == null)
            {
                //TODO: Meldung
                return;
            }

            double area = 0;
            double rent = 0;

            try
            {
                area = Convert.ToDouble(tempArea);
                rent = Convert.ToDouble(tempRent);
            } catch
            {
                //TODO: Meldung bitte korrekte Werte für area und rent eingeben
                return;
            }

            Program.building.AddRoom(name, area, rent);
            NavigationForm nf = (NavigationForm)Application.OpenForms["NavigationForm"];

            nf.ReloadAllTables();
            this.Close();
        }
Exemplo n.º 2
0
        private void saveButton_Click(object sender, EventArgs e)
        {
            double rent = Convert.ToDouble(inventoryItemType.Text);
            string name = inventoryItemTypeNameTextbox.Text;

            Program.building.AddInventoryItemType(name, rent);
            NavigationForm nf = (NavigationForm)Application.OpenForms["NavigationForm"];

            nf.ReloadAllTables();
            this.Close();
        }
Exemplo n.º 3
0
        private void Save_Click(object sender, EventArgs e)
        {
            string name = nameTextBox.Text;

            if (name == null)
            {
                //TODO: Meldung
                return;
            }

            Program.building.AddTenant(name);
            NavigationForm nf = (NavigationForm)Application.OpenForms["NavigationForm"];

            nf.ReloadAllTables();
            this.Close();
        }
Exemplo n.º 4
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            this.room.SetNumberWorkingPlaces(Convert.ToInt32(roomNumberWorkingPlaces.Text));
            this.room.SetNumberSeatingPositions(Convert.ToInt32(roomNumberSeatingPositions.Text));
            this.room.SetRoomType(roomType.Text);
            this.room.SetTypeOfUse(roomTypeOfUse.Text);
            this.room.SetTenant(Convert.ToInt32(roomTenant.SelectedValue));

            UpdateIventoryItems();

            Program.dataManagement.SaveRoom(this.room);
            NavigationForm nf = (NavigationForm)Application.OpenForms["NavigationForm"];

            nf.ReloadAllTables();
            this.Close();
        }