Exemplo n.º 1
0
        private void loadAll()
        {
            t1 = 0.0;
            t2 = 0.0;
            AppSettings dat = new AppSettings();
            dat.loadAttendance(subnum);

            Marks_Data m = new Marks_Data();
            m.Subject = "Subject Code";
            m.Slot = dat.getSubjectCode();
            details.Items.Add(m);

            m = new Marks_Data();
            m.Subject = "Type";
            m.Slot = dat.getType();
            details.Items.Add(m);

            m = new Marks_Data();
            m.Subject = "Slot";
            m.Slot = dat.getSlot();
            details.Items.Add(m);

            m = new Marks_Data();
            m.Subject = "Attended";
            m.Slot = Convert.ToString(dat.getAttended());
            details.Items.Add(m);

            m = new Marks_Data();
            m.Subject = "Conducted";
            m.Slot = Convert.ToString(dat.getConducted());
            details.Items.Add(m);

            m = new Marks_Data();
            m.Subject = "Percentage";
            m.Slot = Convert.ToString(dat.getPercentage());
            details.Items.Add(m);

            List<String> lst = new List<String>();
            lst = dat.getDetails();
            int i = lst.Count-1;
            while (i >= 0) {
                m = new Marks_Data();
                m.Subject = lst[i-1];
                m.Slot = lst[i];
                moreDetais.Items.Add(m);
                i -= 2;

            }

            controller.Title = dat.getSubjectName();
            attended = Convert.ToDouble(dat.getAttended());
            conducted = Convert.ToDouble(dat.getConducted());
            lbl_percent.Text = Convert.ToString(Math.Round((attended / conducted) * 100,1)) + "%";
        }