Esempio n. 1
0
        //gets data from form
        //takes selected row as a studet object
        //takes combobox selected item as a teacher object
        public AttandanceControl GetDataFromForm()
        {
            Student           student = (Student)dgvStudents.SelectedRows[0].DataBoundItem;
            Teacher           teacher = (Teacher)cbxTeachers.SelectedItem;
            AttandanceControl t       = new AttandanceControl(teacher, student);

            return(t);
        }
Esempio n. 2
0
 private void btnAttend_Click(object sender, EventArgs e)
 {
     if (dgvStudents.SelectedRows.Count > 0)
     {
         AttandanceControl t = GetDataFromForm();
         t.AStatus = AttendanceStatus.Attended;
         EduManagement.Instance.AddAttendanceSwipe(t);
         EduManagement.Instance.AddControlling(t);
     }
 }
Esempio n. 3
0
        public NewAttendance(Teacher teacher, Student student, bool New)
        {
            InitializeComponent();
            MdiParent = Application.OpenForms["ParentForm"];

            isNew       = New;
            _attendance = new AttandanceControl(teacher, student);
            _teacher    = teacher;
            _student    = student;

            //set form text
            if (isNew)
            {
                this.Text = "New Attendance";
            }
            else
            {
                this.Text = "Edit Attendance";
            }
        }