Esempio n. 1
0
 public void cargardata()
 {
     if (metodo == 1)
     {
         dataGridView1.DataSource         = op.MostrarDoctor();
         dataGridView1.Columns[2].Visible = false;
         dataGridView1.Columns[3].Visible = false;
         dataGridView1.Columns[4].Visible = false;
     }
     else if (metodo == 2)
     {
         dataGridView1.DataSource         = op.MostrarPaciente();
         dataGridView1.Columns[2].Visible = false;
         dataGridView1.Columns[3].Visible = false;
         dataGridView1.Columns[4].Visible = false;
         dataGridView1.Columns[5].Visible = false;
     }
     else if (metodo == 3)
     {
         dataGridView1.DataSource         = op.MostrarUsuario();
         dataGridView1.Columns[2].Visible = false;
         dataGridView1.Columns[3].Visible = false;
         dataGridView1.Columns[4].Visible = false;
     }
     else if (metodo == 4)
     {
         dataGridView1.DataSource         = op.MostrarBitacora();
         dataGridView1.Columns[0].Visible = false;
         dataGridView1.Columns[2].Visible = false;
     }
     else if (metodo == 5)
     {
         dataGridView1.DataSource         = op.MostrarExamenes();
         dataGridView1.Columns[0].Visible = false;
         dataGridView1.Columns[2].Visible = false;
         dataGridView1.Columns[3].Visible = false;
         dataGridView1.Columns[4].Visible = false;
     }
     else if (metodo == 6)
     {
         dataGridView1.DataSource         = op.MostrarCai();
         dataGridView1.Columns[1].Visible = false;
         dataGridView1.Columns[2].Visible = false;
     }
 }
Esempio n. 2
0
 public void cargardata()
 {
     dataGridDoc.DataSource = op.MostrarDoctor();
 }