예제 #1
0
        private void refreshDataGridView()
        {
            string strStartDate;
            string strEndDate;

            strStartDate = mtcCalendario.SelectionRange.Start.ToString("yyyy-MM-dd HH:mm:ss");
            strEndDate   = mtcCalendario.SelectionRange.Start.AddDays(1).AddMilliseconds(-1).ToString("yyyy-MM-dd HH:mm:ss");

            ConexaoMySQL  conn  = new ConexaoMySQL();
            List <string> aulas = conn.SelectAulas(strStartDate, strEndDate);

            dgvAulasAgendadas.Rows.Clear();
            foreach (string s in aulas)
            {
                string strIdAulaAgendada = s.Split(';')[0];
                string strHorario        = s.Split(';')[1];
                string strProfessor      = s.Split(';')[2];
                string strTurma          = s.Split(';')[3];
                string strBloco          = s.Split(';')[4];
                string strConteudo       = s.Split(';')[5];
                string strData           = s.Split(';')[6];
                dgvAulasAgendadas.Rows.Add(strIdAulaAgendada, strHorario, strProfessor, strTurma, strBloco, strConteudo, strData);
            }
            conn = null;
        }