Пример #1
0
        private void btoMostrar_Click(object sender, EventArgs e)
        {
            ngDetalle_Ficha_Alumno car = new ngDetalle_Ficha_Alumno();

            this.dgListadoCargos.DataSource = car.retornaDetalle_Ficha_AlumnoDataSet();
            this.dgListadoCargos.DataMember = "Detalle_Ficha_Alumno";
        }
Пример #2
0
    public double calculaIMC(double peso, double altura)
    {
        double IMC;

        ngDetalle_Ficha_Alumno auxNegocio = new ngDetalle_Ficha_Alumno();

        return(IMC = auxNegocio.calculaIMC(peso, altura));
    }
Пример #3
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            ngDetalle_Ficha_Alumno ncargo = new ngDetalle_Ficha_Alumno();

            if (String.IsNullOrEmpty(ncargo.buscaDetalle_Ficha_Alumno(this.txtCodDetalleFicha.Text).Cod_Detalle_Ficha))
            {
                MessageBox.Show("No se puede eliminar Detalle Ficha Alumnos", "Mensaje Sistema");
            }

            else
            {
                ncargo.eliminarDetalle_Ficha_Alumno(txtCodDetalleFicha.Text);
                MessageBox.Show("Detalle Ficha Alumnos eliminada", "Mensaje Sistema");
                LimpiarDetalle();
                this.txtCodDetalleFicha.Focus();
            }
        }
Пример #4
0
        private void btnActualizar_Click(object sender, EventArgs e)
        {
            ngDetalle_Ficha_Alumno car = new ngDetalle_Ficha_Alumno();

            if (txtCodDetalleFicha.Text.Trim().Length == 0 || txtCodCabeceraFicha.Text.Trim().Length == 0 || txtValorIMC.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ningún campo puede estar vacío");
                return;
            }
            else
            {
                if (!String.IsNullOrEmpty(car.buscaDetalle_Ficha_Alumno(this.txtCodDetalleFicha.Text).Cod_Detalle_Ficha))
                {
                    Cursor.Current = Cursors.WaitCursor;
                    ngDetalle_Ficha_Alumno det = new ngDetalle_Ficha_Alumno();
                    ngDetalle_Ficha_Alumno de2 = new ngDetalle_Ficha_Alumno();

                    det.Cod_Detalle_Ficha = txtCodDetalleFicha.Text;
                    det.Cod_Ficha         = txtCodCabeceraFicha.Text;

                    double value = Convert.ToDouble(txtValorIMC.Text);

                    //darle formato al double de valor IMC
                    det.Valor_IMC = Convert.ToDouble((String.Format(CultureInfo.InvariantCulture,
                                                                    "{0:0.00}", txtValorIMC.Text)));


                    det.Clasificacion_IMC      = txtClasifIMC.Text;
                    det.Fecha_Revision         = dtIFechaRevision.Value.Date;
                    det.Fecha_Proxima_Revision = dtFechaProxRevision.Value.Date;

                    de2.actualizarDetalle_Ficha_Alumno(det);
                    MessageBox.Show("Detalle_Ficha_Alumnos Actualizado Correctamente");
                    LimpiarCabecera();
                }
                else
                {
                    MessageBox.Show("No se pudo actualizar Detalle_Ficha_Alumnos", "Mensaje Sistema");
                    return;
                }
            }
        }
Пример #5
0
        private void txtGuardarDetalle_Click(object sender, EventArgs e)
        {
            ngDetalle_Ficha_Alumno car = new ngDetalle_Ficha_Alumno();

            if (txtCodDetalleFicha.Text.Trim().Length == 0 || txtCodCabeceraFicha.Text.Trim().Length == 0 || txtValorIMC.Text.Trim().Length == 0)
            {
                MessageBox.Show("Algunos campos no pueden estar vacíos", "Diálogo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            else
            {
                if (String.IsNullOrEmpty(car.buscaDetalle_Ficha_Alumno(this.txtCodDetalleFicha.Text).Cod_Detalle_Ficha))
                {
                    Cursor.Current = Cursors.WaitCursor;
                    ngDetalle_Ficha_Alumno det = new ngDetalle_Ficha_Alumno();
                    ngDetalle_Ficha_Alumno de2 = new ngDetalle_Ficha_Alumno();

                    det.Cod_Detalle_Ficha = txtCodDetalleFicha.Text;
                    det.Cod_Ficha         = txtCodCabeceraFicha.Text;

                    double value = Convert.ToDouble(txtValorIMC.Text);

                    //darle formato al double de valor IMC
                    det.Valor_IMC = Convert.ToDouble((String.Format(CultureInfo.InvariantCulture,
                                                                    "{0:0.00}", txtValorIMC.Text)));


                    det.Clasificacion_IMC      = txtClasifIMC.Text;
                    det.Fecha_Revision         = dtIFechaRevision.Value.Date;
                    det.Fecha_Proxima_Revision = dtFechaProxRevision.Value.Date;

                    de2.ingresaDetalle_Ficha_Alumno(det);
                    MessageBox.Show("Detalle Ficha Alumnos Guardada Correctamente");
                    LimpiarDetalle();
                }
                else
                {
                    MessageBox.Show("Detalle Ficha Alumnos ya existe", "Mensaje Sistema");
                    return;
                }
            }
        }
Пример #6
0
        private void txtCodDetalleFicha_Leave(object sender, EventArgs e)
        {
            ngDetalle_Ficha_Alumno ncar  = new ngDetalle_Ficha_Alumno();
            Detalle_Ficha_Alumno   ncar2 = new Detalle_Ficha_Alumno();

            ncar2 = ncar.buscaDetalle_Ficha_Alumno(txtCodDetalleFicha.Text);
            if (String.IsNullOrEmpty(ncar2.Cod_Detalle_Ficha))
            {
                return;
            }
            else
            {
                txtCodCabeceraFicha.Text = ncar2.Cod_Ficha;
                txtCodDetalleFicha.Text  = ncar2.Cod_Detalle_Ficha;
                txtValorIMC.Text         = Convert.ToString(ncar2.Valor_IMC);
                txtClasifIMC.Text        = ncar2.Clasificacion_IMC;

                dtIFechaRevision.Value    = ncar2.Fecha_Revision;
                dtFechaProxRevision.Value = ncar2.Fecha_Proxima_Revision;
            }
        }