コード例 #1
0
        private void BTNaltaUsuario_Click(object sender, EventArgs e)
        {
            // Create a new instance of the form
            FRMusuario formularioNuevoUsuario = new FRMusuario();

            // Show form
            formularioNuevoUsuario.Show();
        }
コード例 #2
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         if (e.ColumnIndex == dataGridView1.Columns["Editar"].Index)
         {
             DataGridViewRow row = dataGridView1.Rows[e.RowIndex];
             FRMusuario      formularioUsuario = new FRMusuario();
             formularioUsuario.recibirDatosUsuario(Convert.ToString(row.Cells[2].Value), Convert.ToString(row.Cells[1].Value), Convert.ToInt64(row.Cells[0].Value), Convert.ToInt16(row.Cells[4].Value), Convert.ToString(row.Cells[3].Value));
             formularioUsuario.Show();
         }
         if (e.ColumnIndex == dataGridView1.Columns["Eliminar"].Index)
         {
             DataGridViewRow row       = dataGridView1.Rows[e.RowIndex];
             Usuario         unUsuario = new Usuario(Convert.ToString(row.Cells[2].Value), Convert.ToInt16(row.Cells[4].Value), Convert.ToInt64(row.Cells[0].Value), "Inactivo");
             unUsuario.modificate();
             this.busquedaDeValores();
         }
     }
 }