Esempio n. 1
0
        private void btnAgregarCategoria_Click(object sender, EventArgs e)
        {
            //btnAgregarCategoria.Enabled = false;
            frmIngresarCategoria formIngresarCategoria = new frmIngresarCategoria();

            //CAPTURADOR DE EVENTO FORMULARIO INGRESAR CATEGORIA CERRADO
            formIngresarCategoria.FormClosed += new FormClosedEventHandler(formIngresarCategoria_FormClosed);
            formIngresarCategoria.ShowDialog();
        }
Esempio n. 2
0
        /*METODO GUARDAR - NO SE UTILIZA YA QUE SE GUARDA AL HACER CLICK EN EL BOTON GUARDAR DEL FORMULARIO
         * frmIngresarCategoria
         *
         * public void Insertar()
         * {
         *  frmIngresarCategoria formIngresarCategoria = new frmIngresarCategoria();
         *  string agregarActualizar = "";
         *  agregarActualizar = NegocioCategoria.Insertar(
         *  formIngresarCategoria.nombre,
         *  formIngresarCategoria.descripcion);
         *  formIngresarCategoria.MensajeOk("Categoría guardada exitosamente");
         *  formIngresarCategoria.Limpiar();
         *  dgvListado.DataSource = NegocioCategoria.Mostrar();
         *  Mostrar();
         * }
         */

        //BOTON INGRESAR
        private void btnIngresar_Click(object sender, EventArgs e)
        {
            frmIngresarCategoria formIngresarCategoria = new frmIngresarCategoria();

            formIngresarCategoria.ctrlSeleccionado = 0;
            //CAPTURADOR DE EVENTO FORM CLOSED
            formIngresarCategoria.FormClosed += new FormClosedEventHandler(formIngresarCategoria_FormClosed);
            //CAPTURADOR DE EVENTO CLICK EN BOTON INSERTAR
            formIngresarCategoria.btnInsertar.Click += new EventHandler(formIngresarCategoria_btnInsertarClick);
            btnIngresar.Enabled = false;
            formIngresarCategoria.ShowDialog();
        }
Esempio n. 3
0
        private void VerDetalles()
        {
            frmIngresarCategoria formIngresarCategoria = new frmIngresarCategoria();

            formIngresarCategoria.ctrlSeleccionado   = 2;
            formIngresarCategoria.IdCategoria        = Convert.ToString(dgvListado.CurrentRow.Cells["IdCategoria"].Value).Trim().ToUpper();
            formIngresarCategoria.Categoria          = Convert.ToString(dgvListado.CurrentRow.Cells["Categoria"].Value).Trim().ToUpper();
            formIngresarCategoria.Descripcion        = Convert.ToString(dgvListado.CurrentRow.Cells["Descripcion"].Value).Trim();
            formIngresarCategoria.FormClosed        += new FormClosedEventHandler(formIngresarCategoria_FormClosed);
            formIngresarCategoria.btnInsertar.Click += new EventHandler(formIngresarCategoria_btnInsertarClick);
            btnIngresar.Enabled = false;
            formIngresarCategoria.ShowDialog();
        }