private void dgOrdenes_KeyDown(object sender, KeyEventArgs e)
        {
            if (dgOrdenes.Rows.Count > 0)
            {
                if (dgOrdenes.CurrentRow != null)
                {
                    if (dgOrdenes.ReadOnly == false)
                    {
                        if (e.KeyCode == Keys.F1)
                        {
                            switch (dgOrdenes.Columns[dgOrdenes.CurrentCell.ColumnIndex].Name.ToUpper().Trim())
                            {
                                case "COLUMN1":
                                    Frm_AyudaUsuarios frm = new Frm_AyudaUsuarios();
                                    frm._PasaUsuarios = PasaUsuarios;
                                    frm.ShowDialog();
                                    break;
                            }
                        }
                    }

                    if (e.KeyCode == Keys.Enter)
                    {
                        switch (dgOrdenes.Columns[dgOrdenes.CurrentCell.ColumnIndex].Name.ToUpper().Trim())
                        {
                            case "COLUMN4":
                                Frm_IngresarPassword frm = new Frm_IngresarPassword();
                                frm._SoloLectura = this.dgOrdenes.ReadOnly;
                                frm._Pass = dgOrdenes["COLUMN3", dgOrdenes.CurrentCell.RowIndex].Value.ToString().Trim();
                                frm.PasaPassword = PasaPassword;
                                frm.ShowDialog();
                                e.Handled = true;
                                break;
                            case "COLUMN7":
                                Frm_SeleccionImagen frm1 = new Frm_SeleccionImagen();
                                frm1.Text = "Elegir Firma";
                                frm1._SoloLectura = dgOrdenes.ReadOnly;
                                frm1._RutaImagen = dgOrdenes["COLUMN6", dgOrdenes.CurrentCell.RowIndex].Value.ToString().Trim();
                                frm1._PasaRutaImagen = RutaImagen;
                                frm1.ShowDialog();
                                e.Handled = true;
                                break;
                        }
                    }
                }
            }
        }
        private void dgOrdenes_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (dgOrdenes.Rows.Count > 0)
            {
                if (e.RowIndex > -1)
                {
                    if (dgOrdenes.CurrentRow != null)
                    {
                        if (dgOrdenes.Columns[e.ColumnIndex].Name.ToUpper().Trim() == "COLUMN4")
                        {
                            Frm_IngresarPassword frm = new Frm_IngresarPassword();
                            frm._SoloLectura = dgOrdenes.ReadOnly;
                            frm._Pass = dgOrdenes["COLUMN3", e.RowIndex].Value.ToString().Trim();
                            frm.PasaPassword = PasaPassword;
                            frm.ShowDialog();
                        }

                        if (dgOrdenes.Columns[e.ColumnIndex].Name.ToUpper().Trim() == "COLUMN7")
                        {
                            Frm_SeleccionImagen frm = new Frm_SeleccionImagen();
                            frm.Text = "Elegir Firma";
                            frm._SoloLectura = dgOrdenes.ReadOnly;
                            frm._RutaImagen = dgOrdenes["COLUMN6", e.RowIndex].Value.ToString().Trim();
                            frm._PasaRutaImagen = RutaImagen;
                            frm.ShowDialog();
                        }
                    }
                }
            }
        }