Beispiel #1
0
 private void clickcc(object sender, EventArgs e)
 {
     ch = new chart(chart1, HomePreview.id);
     Bunifu.Framework.UI.BunifuTileButton the_cc = ((Bunifu.Framework.UI.BunifuTileButton)sender);
     ch.addChartBy(nom: semestre[cl_buttons.IndexOf(the_cc)] + " " + the_cc.LabelText, semestre: semestre[cl_buttons.IndexOf(the_cc)], titre: the_cc.LabelText, id_matiere: idm);
     render_details();
 }
Beispiel #2
0
        private void bunifuCircleProgressbar1_Click(object sender, EventArgs e)
        {
            panel2.Visible = false;
            chart ch = new chart(chart1, HomePreview.id);

            ch.addChartBy(nom: HomePreview.nomgr, id_matiere: idm);
        }
Beispiel #3
0
        public Subjects(string idm, string nomm)
        {
            InitializeComponent();
            semestre = new string[10] {
                "1", "1", "1", "1", "1", "2", "2", "2", "2", "2"
            };
            cl_buttons.Add(Button1); cl_buttons.Add(Button2); cl_buttons.Add(Button3); cl_buttons.Add(Button6); cl_buttons.Add(Button7); cl_buttons.Add(Button8); cl_buttons.Add(Button4); cl_buttons.Add(Button5); cl_buttons.Add(Button9); cl_buttons.Add(Button10);
            foreach (Bunifu.Framework.UI.BunifuTileButton b in cl_buttons)
            {
                b.Click += new System.EventHandler(this.clickcc);
            }
            string id    = HomePreview.id;
            string nomgr = HomePreview.nomgr;

            this.idm  = idm;
            this.nomm = nomm;
            chart ch = new chart(chart1, HomePreview.id);

            ch.addChartBy(nom: nomgr);

            Login.read = DBConnect.Gets("select max(calcule.n), min(calcule.n) , avg(calcule.n) from (select avg(note) as n from examiner where id_matiere=" + this.idm + " group by id_etudiant) as calcule");
            if (Login.read.Read())
            {
                max.Text = Login.read[0].ToString();
                min.Text = Login.read[1].ToString();
                moy      = Login.read[2].ToString();
            }
            bunifuCircleProgressbar1.Value = (int)Math.Ceiling(float.Parse(moy));

            Login.read = DBConnect.Gets("select nom , prenom from groupe_matiere_enseignant , enseignant where id_enseignant=id and id_groupe=" + id + " and id_matiere=" + this.idm);
            while (Login.read.Read())
            {
                label2.Text = Login.read["nom"].ToString() + " " + Login.read["prenom"].ToString();
            }
            Login.read.Close();

            moyenne.Text = Math.Round(double.Parse(moy), 2).ToString();
            if (double.Parse(moyenne.Text) < 5)
            {
                bunifuCircleProgressbar1.ProgressColor = Color.Red;
            }
            else
            {
                bunifuCircleProgressbar1.ProgressColor = Color.Green;
            }
            Login.read = DBConnect.Gets("select distinct titre from examiner where id_groupe = " + id + " and id_matiere=" + this.idm + " order by semestre,titre");
            int i = 0;

            while (Login.read.Read())
            {
                cl_buttons[i++].Visible = true;
            }
            Login.read.Close();
            Infobox.Text = this.nomm;
        }
Beispiel #4
0
        private void bunifuCircleProgressbar1_Click(object sender, EventArgs e)
        {
            chart ch = new chart(chart1, HomePreview.id);

            ch.addChartBy(nom: HomePreview.nomgr);
        }