예제 #1
0
        private async void dgvbase_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                string idEmpleado     = this.dgvbase.SelectedRows[0].Cells[0].Value.ToString();
                string nombreEmpleado = this.dgvbase.SelectedRows[0].Cells[1].Value.ToString();
                var    r = MessageBox.Show($"Seleccionar {nombreEmpleado} ?", "Confirmar", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (r == DialogResult.No)
                {
                    return;
                }
                this.Usuario = await usrCtrl.obtenerPorId(Convert.ToInt32(idEmpleado));

                this.DialogResult = DialogResult.Yes;
            }
            catch (Exception)
            {
                return;
            }
        }