예제 #1
0
        private void refreshComboBox()
        {
            try
            {
                ConexaoMySQL  conn        = new ConexaoMySQL();
                List <string> horarios    = conn.SelectHorarios();
                List <string> professores = conn.SelectProfessores();
                List <string> turmas      = conn.SelectTurmas();

                foreach (string s in horarios)
                {
                    cbbHorario.Items.Add(s.Split(';')[1]);
                }

                foreach (string s in professores)
                {
                    cbbProfessor.Items.Add(s);
                }

                foreach (string s in turmas)
                {
                    cbbTurma.Items.Add(s.Split(';')[1] + "/" + s.Split(';')[2]);
                }

                cbbHorario.SelectedItem   = this.strAntigoHorario;
                cbbProfessor.SelectedItem = this.strAntigoProfessor;
                cbbTurma.SelectedItem     = this.strAntigaTurma + "/" + this.strAntigoBloco;
                rtbConteudo.Text          = this.strAntigoConteudo;
                mtcCalendario.SetSelectionRange(Convert.ToDateTime(strAntigaData.ToString()), Convert.ToDateTime(strAntigaData.ToString()));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
예제 #2
0
        private void refreshComboBox()
        {
            try
            {
                ConexaoMySQL  conn        = new ConexaoMySQL();
                List <string> horarios    = conn.SelectHorarios();
                List <string> professores = conn.SelectProfessores();
                List <string> turmas      = conn.SelectTurmas();

                foreach (string s in horarios)
                {
                    cbbHorario.Items.Add(s.Split(';')[1]);
                }

                foreach (string s in professores)
                {
                    cbbProfessor.Items.Add(s);
                }

                foreach (string s in turmas)
                {
                    cbbTurma.Items.Add(s.Split(';')[1] + "/" + s.Split(';')[2]);
                }
            }catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
예제 #3
0
        private void refreshDataGridView()
        {
            ConexaoMySQL  conn   = new ConexaoMySQL();
            List <string> turmas = conn.SelectTurmas();

            dgvTurmas.Rows.Clear();
            foreach (string s in turmas)
            {
                string strIdTurma = s.Split(';')[0];
                string strTurma   = s.Split(';')[1];
                string strBloco   = s.Split(';')[2];
                dgvTurmas.Rows.Add(strIdTurma, strTurma, strBloco);
            }
            conn = null;
        }