コード例 #1
0
        public void GuardarFamilia()
        {
            string    mensaje;
            FamiliaBL familiaBL = new FamiliaBL();

            if (Id > 0)
            {
                Familia familia = CrearFamilia();
                familiaBL.ActualizarFamilia(familia);
                mensaje = error.getError("actualizado");
            }
            else
            {
                DataSet ultimoId = new DataSet();
                ultimoId = familiaBL.buscar_Ultima_Familia();
                Id       = Convert.ToInt32(ultimoId.Tables["ultimoEstudiante"].Rows[0]["IdEstudiante"]) + 1;
                Familia familia = CrearFamilia();
                familiaBL.InsertarFamilia(familia);
                mensaje = error.getError("creado");
            }
            mostrarError(mensaje);
            Limpiar(this.txtNombrePadre, this.txtPrimerApellidoPadre, this.txtSegundoApellidoPadre, this.txttelefonoPadre,
                    this.txtNombreMadre, this.txtPrimerApellidoMadre, this.txtSegundoApellidoMadre, this.txtTelefonoMadre,
                    this.txtDireccion, this.txtEstado);
        }