Esempio n. 1
0
 private int Idp;//LO USO PARA OBTENER EL ID COMO RESULTADO DE LA BUSQUEDA
 #region Comportamientos de los controles
 #region Busquedas
 private void bttn_Consultar_Click(object sender, EventArgs e)
 {
     if (dataGridView_Cliente.CurrentRow == null)
     {
         MessageBox.Show("Seleccione un cliente al cual se va a realizar la consulta", "Error de selección", MessageBoxButtons.OK, MessageBoxIcon.Stop);
     }
     else
     {
         if (dataGridView_Cliente.RowCount > 0)
         {
             int             dato = Convert.ToInt32(dataGridView_Cliente.CurrentRow.Cells["Id_ClienteC"].Value);
             Reporte_cliente rc   = new Reporte_cliente();
             rc.recibe(dato);
             rc.Show();
         }
     }
 }
 private void bttn_Consultar_Click(object sender, EventArgs e)
 {
     if (dataGridView_Cliente.CurrentRow == null)
     {
         MessageBox.Show("Seleccione un cliente al cual se va a realizar la consulta", "Error de selección", MessageBoxButtons.OK, MessageBoxIcon.Stop);
     }
     else
     {
         if (dataGridView_Cliente.RowCount > 0)
         {
             int dato=Convert.ToInt32(dataGridView_Cliente.CurrentRow.Cells["Id_ClienteC"].Value);
             Reporte_cliente rc = new Reporte_cliente();
             rc.recibe(dato);
             rc.Show();
         }
     }
 }