protected void uiButtonUpdate_Click(object sender, EventArgs e) { DBLayer db = new DBLayer(); if (CurrentAttendanceReport != 0) { db.UpdateMonthlyAttendanceReport(CurrentAttendanceReport, CurrentCheckedStudent, true, DateTime.ParseExact(uiTextBoxDay.Text,"dd/MM/yyyy",null)); } else { db.AddMonthlyAttendanceReport(CurrentCheckedStudent, true, DateTime.ParseExact(uiTextBoxDay.Text, "dd/MM/yyyy", null)); } uiPanelCurrentStudents.Visible = false; uiPanelCurrent.Visible = true; CurrentAttendanceReport = 0; BindData(); }