private void BindingDataToComboBox() { try { List <StudentDegree> student_degrees = StudentDegreeController.StudentDegreeSelectAll(); cmbStudentAdmissionDegree.DataSource = student_degrees; cmbStudentAdmissionDegree.DisplayMember = "DegreeName"; cmbStudentAdmissionDegree.ValueMember = "DegreeID"; cmbStudentAdmissionDegree.Tag = "DegreeID"; cmbStudentAdmissionDegree.SelectedIndex = 0; List <StudentProgram> selected_programs = StudentProgramController.StudentProgramSelectAll(); cmbStudentAdmissionProgram.DataSource = selected_programs; cmbStudentAdmissionProgram.DisplayMember = "ProgramName"; cmbStudentAdmissionProgram.ValueMember = "ProgramID"; cmbStudentAdmissionProgram.Tag = "ProgramID"; cmbStudentAdmissionProgram.SelectedIndex = 0; List <StudentSession> student_Sessions = StudentSessionController.StudentSessionSelectAll(); cmbStudentSession.DataSource = student_Sessions; cmbStudentSession.DisplayMember = "SessionName"; cmbStudentSession.ValueMember = "SessionID"; cmbStudentSession.Tag = "SessionID"; cmbStudentSession.SelectedIndex = 0; List <StudentSections> Student_section = StudentSectionsController.StudentSectionsSelectAll(); cmbStudentSession.DataSource = Student_section; cmbStudentSession.DisplayMember = "SectionName"; cmbStudentSession.ValueMember = "SectionID"; cmbStudentSession.Tag = "SectionID"; cmbStudentSession.SelectedIndex = 0; List <StudentSubject> student_Subject = StudentSubjectController.StudentSubjectSelectAll(); cmbMasterMajor.DataSource = student_Subject; cmbMasterMajor.DisplayMember = "SubjectName"; cmbMasterMajor.ValueMember = "SubjectID"; cmbMasterMajor.Tag = "SubjectID"; cmbMasterMajor.SelectedIndex = 0; List <DAEStudentMajor> student_DAEMajor = DAEStudentMajorController.DAEStudentMajorSelectAll(); cmbInterStudentDEAMajor.DataSource = student_DAEMajor; cmbDAE.DisplayMember = "DAEName"; cmbInterStudentDEAMajor.ValueMember = "DAEMajorID"; cmbInterStudentDEAMajor.Tag = "DAEMajorID"; cmbInterStudentDEAMajor.SelectedIndex = 0; List <AllReligion> religion = AllReligionController.AllReligionSelectAll(); cmbRligion.DataSource = religion; cmbRligion.DisplayMember = "ReligionName"; cmbRligion.ValueMember = "ReligionID"; cmbRligion.Tag = "ReligionID"; cmbRligion.SelectedIndex = 0; } catch (Exception) { } }
private void Daly_Tick(object sender, EventArgs e) { Daly.Stop(); List <StudentDegree> studentDegrees = new List <StudentDegree>(); studentDegrees = StudentDegreeController.StudentDegreeSelectAll(); lblTotalDegree.Text = studentDegrees.Count.ToString(); StudentDegree studentDegree = new StudentDegree(); studentDegrees = studentDegree.StudentDegreeSelectAll(); List <StudentProgram> studentPrograms = new List <StudentProgram>(); StudentProgram studentProgram = new StudentProgram(); studentPrograms = studentProgram.StudentProgramSelectAll(); lblProgramTotal.Text = studentPrograms.Count.ToString(); List <CollageAdmin> collageAdmins = CollageAdminController.CollageAdminSelectAll(); lblTotalAdmin.Text = collageAdmins.Count.ToString(); List <StudentPersonalInfo> studentPersonalInfos = StudentPersonalInfoController.StudentPersonalInfoSelectAll(); lblTotalStudent.Text = studentPersonalInfos.Count.ToString(); List <StudentSections> studentSections = StudentSectionsController.StudentSectionsSelectAll(); lblTotalSection.Text = studentSections.Count.ToString(); Bunifu.DataViz.Data data = new Bunifu.DataViz.Data(); Bunifu.DataViz.DataPoint dataPoint = new Bunifu.DataViz.DataPoint(Bunifu.DataViz.BunifuCharts._type.column); Random r = new Random(); dataPoint.addLabely("Degrees", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint.addLabely("Users", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint.addLabely("Program", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint.addLabely("Degrees", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint.addLabely("Users", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint.addLabely("Program", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); data.addData(dataPoint); CollumChart.Render(data); Bunifu.DataViz.Data data1 = new Bunifu.DataViz.Data(); Bunifu.DataViz.DataPoint dataPoint2 = new Bunifu.DataViz.DataPoint(Bunifu.DataViz.BunifuCharts._type.pie); dataPoint2.addLabely("Degrees", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint2.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint2.addLabely("Users", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint2.addLabely("Program", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint2.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint2.addLabely("Degrees", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint2.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint2.addLabely("Users", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint2.addLabely("Program", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint2.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); data1.addData(dataPoint2); bunifuCharts1.Render(data1); Bunifu.DataViz.Data data2 = new Bunifu.DataViz.Data(); Bunifu.DataViz.DataPoint dataPoint3 = new Bunifu.DataViz.DataPoint(Bunifu.DataViz.BunifuCharts._type.spline); dataPoint3.addLabely("Degrees", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint3.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint3.addLabely("Users", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint3.addLabely("Program", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint3.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint3.addLabely("Degrees", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint3.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint3.addLabely("Program", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint3.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); data2.addData(dataPoint3); bunifuCharts2.Render(data2); Bunifu.DataViz.Data data3 = new Bunifu.DataViz.Data(); Bunifu.DataViz.DataPoint dataPoint4 = new Bunifu.DataViz.DataPoint(Bunifu.DataViz.BunifuCharts._type.area); dataPoint4.addLabely("Degrees", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint4.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint4.addLabely("Users", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint4.addLabely("Program", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint4.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint4.addLabely("Degrees", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint4.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); dataPoint4.addLabely("Program", r.Next(0, Convert.ToInt32(studentDegrees.Count.ToString())).ToString()); dataPoint4.addLabely("Program", r.Next(0, Convert.ToInt32(studentPrograms.Count.ToString())).ToString()); data3.addData(dataPoint4); bunifuCharts3.Render(data3); }