Exemple #1
0
        private void btnStudentAttendenceRecord_Click(object sender, EventArgs e)
        {
            lblMarkStudentAttendence.Hide();
            lblAttendenceDate.Hide();
            dtpAttendenceDate.Hide();
            btnViewListOfAddedStudents.Hide();
            metroGridListOfAddedStudents.Hide();
            btnMark.Hide();

            using (SqlConnection con = new SqlConnection(constr))
            {
                using (SqlCommand cmd = new SqlCommand("SELECT std.Id, std.FirstName,std.LastName,ca.AttendanceDate, std.RegistrationNumber,CASE a.AttendanceStatus WHEN 1 THEN 'Present' WHEN 2 THEN 'Absent' WHEN  3 THEN 'Leave' WHEN  4 THEN 'Late' END as Status FROM Student as std JOIN StudentAttendance as a ON a.StudentId= std.Id JOIN ClassAttendance ca ON ca.Id=a.AttendanceId", con))
                {
                    cmd.CommandType = CommandType.Text;
                    using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
                    {
                        using (DataTable dt = new DataTable())
                        {
                            sda.Fill(dt);
                            StudentAttendenceRecordDataGridView.DataSource = dt;
                        }
                    }
                }
            }
            lblFilterByStatus.Show();
            combboxFilter.Show();
            StudentAttendenceRecordDataGridView.Show();

            //StudentAttendenceRecordForm t = new StudentAttendenceRecordForm();
            //this.Hide();
            //t.Show();
        }
Exemple #2
0
        private void btnMarkAttendence_Click_1(object sender, EventArgs e)
        {
            lblMarkStudentAttendence.Show();
            lblAttendenceDate.Show();
            dtpAttendenceDate.Show();
            btnViewListOfAddedStudents.Show();
            metroGridListOfAddedStudents.Show();
            btnMark.Show();

            lblFilterByStatus.Hide();
            combboxFilter.Hide();
            StudentAttendenceRecordDataGridView.Hide();
        }
Exemple #3
0
 private void StudentAttendanceForm_Load(object sender, EventArgs e)
 {
     lblFilterByStatus.Hide();
     combboxFilter.Hide();
     StudentAttendenceRecordDataGridView.Hide();
 }