private void savePriceConfiguration(object sender, EventArgs e)
        {
            try
            {
                ValidCostPrice();
                if (elementList.SelectedItem.ToString().Equals("Pared"))
                {
                    priceAndCostHandler.WallModifyPriceCost(int.Parse(CostTextBox.Text), int.Parse(PriceTextBox.Text));
                }
                else if (elementList.SelectedItem.ToString().Equals("Viga"))
                {
                    priceAndCostHandler.WallBeamColumnModifyPriceCost(int.Parse(CostTextBox.Text), int.Parse(PriceTextBox.Text));
                }
                else if (elementList.SelectedItem.ToString().Equals("Ventana"))
                {
                    priceAndCostHandler.WindowModifyPriceCost(int.Parse(CostTextBox.Text), int.Parse(PriceTextBox.Text));
                }
                else if (elementList.SelectedItem.ToString().Equals("Puerta"))
                {
                    priceAndCostHandler.DoorModifyPriceCost(int.Parse(CostTextBox.Text), int.Parse(PriceTextBox.Text));
                }
                else if (elementList.SelectedItem.ToString().Equals("Columna Decorativa"))
                {
                    priceAndCostHandler.DecorativeColumnModifyPriceCost(int.Parse(CostTextBox.Text), int.Parse(PriceTextBox.Text));
                }

                MessageBox.Show("Se han actualizado los precios del sistema.", "Confirmacion", MessageBoxButtons.OK, MessageBoxIcon.Information);

                ClearFields();
            }
            catch (ExceptionController Exception)
            {
                string message = Exception.Message;
                MessageBox.Show(message, "Oops", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Example #2
0
 public override void ModifyCostAndPrice(int cost, int price)
 {
     priceAndCostHandler.DoorModifyPriceCost(cost, price);
 }