Ejemplo n.º 1
0
        private void btnAceptarDos_Click(object sender, EventArgs e)
        {
            PropiedadNegocio negocio = new PropiedadNegocio();
            Propiedad        nuevo   = new Propiedad();

            try
            {
                nuevo.DescripcionGeneral = txtDescripcion.Text;
                if (txtSuperficieCubierta.Text.Trim() == "" || txtSuperficieDescubierta.Text.Trim() == "")
                {
                    MessageBox.Show("Las superficies son obligatorias");
                    return;
                }
                nuevo.SuperficieCubierta    = int.Parse(txtSuperficieCubierta.Text);
                nuevo.SuperficieDescubierta = int.Parse(txtSuperficieDescubierta.Text);

                negocio.altaDos(nuevo);

                Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }