private void cmdConsultar_Click(object sender, EventArgs e) { try { MovtosInvRegistro Ventana = new MovtosInvRegistro(db, ParamSystem, user, StiloColor, 3, TipoDocProv, grdView[0, grdView.CurrentRow.Index].Value.ToString()); Ventana.CaptionBarColor = ColorTranslator.FromHtml(StiloColor.Encabezado); Ventana.CaptionForeColor = ColorTranslator.FromHtml(StiloColor.FontColor); Ventana.ShowDialog(); LlenaGridView(); } catch (Exception ex) { MessageBoxAdv.Show("Tienes que seleccionar un registro. " + ex.Message, "Error al consultar", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void cmdAgregar_Click(object sender, EventArgs e) { MovtosInvPui pui = new MovtosInvPui(db); String folMovto = pui.AgregarBlanco(1, user.FecServer); if (folMovto.CompareTo("Error") != 0) { MovtosInvRegistro Ventana = new MovtosInvRegistro(db, ParamSystem, user, StiloColor, 1, TipoDocProv, folMovto); Ventana.CaptionBarColor = ColorTranslator.FromHtml(StiloColor.Encabezado); Ventana.CaptionForeColor = ColorTranslator.FromHtml(StiloColor.FontColor); Ventana.ShowDialog(); } else { MessageBoxAdv.Show("Movimiento Inventario: Ha ocurrido un error.", "InventarioMovimientos", MessageBoxButtons.OK, MessageBoxIcon.Warning); } LlenaGridView(); }