예제 #1
0
 public ListarTurnos(Profesional prof)
 {
     matr        = prof.matricula;
     esp         = prof.especialidad;
     profesional = prof;
     InitializeComponent();
     this.dataGridView1.DataSource                = ProfesionalManager.MostrarTurnosDeProfesional(matr, esp);
     dataGridView1.Columns["Ticks"].Visible       = false;
     dataGridView1.Columns["Year"].Visible        = false;
     dataGridView1.Columns["Month"].Visible       = false;
     dataGridView1.Columns["Day"].Visible         = false;
     dataGridView1.Columns["Second"].Visible      = false;
     dataGridView1.Columns["Millisecond"].Visible = false;
     dataGridView1.Columns["DayOfWeek"].Visible   = false;
     dataGridView1.Columns["DayOfYear"].Visible   = false;
     dataGridView1.Columns["Kind"].Visible        = false;
     dataGridView1.Columns["Minute"].Visible      = false;
     dataGridView1.Columns["Hour"].Visible        = false;
 }
예제 #2
0
        private void hola_Click_1(object sender, EventArgs e)
        {
            try
            {
                if (Validacion.soloNumeros(txMatricula, "matricula"))
                {
                    if (txMatricula.Text.Trim() == "")
                    {
                        txMatricula.Text = "-1";
                    }

                    this.dataGridView1.DataSource = ProfesionalManager.BuscarProfesionales(txNombre.Text.Trim(), txApellido.Text.Trim(), comboBox1.SelectedItem.ToString().Trim(), Convert.ToInt32(txMatricula.Text.Trim()));
                }
            }
            catch (SqlException ex)
            {
                MessageBox.Show(ex.Message);
            }
            catch (FormatException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }