Dim tb As TextBox = CType(UserIdTextBox, TextBox) Dim userName As String = tb.Text Dim gvw As GridView = CType(sender, GridView) Dim scheduleId As Integer = Integer.Parse(gvw.SelectedRow.Cells(1).Text) Dim caspbll As New CASpBLL Dim schedDt As tbCASp_ExamScheduleDataTable = caspbll.GetExamSchedule(scheduleId) Dim appDt As QuickAppInfoDataTable = caspbll.AppInfoSummary(userName) Dim regDt As tbCASp_RegistrationDataTable = caspbll.GetExamReg(userName, scheduleId) If appDt IsNot Nothing AndAlso appDt.Rows.Count = 1 Then If regDt IsNot Nothing AndAlso regDt.Rows.Count = 0 And (Not caspbll.AlreadyRegisteredForThisExam(appDt(0).ApplicationID, schedDt(0).ExamID)) Then Dim RegNumber As String = "" Dim RegId As Integer RegId = caspbll.NewRegistration(appDt(0).ApplicationID, scheduleId, HttpContext.Current.Request.UserHostAddress, RegNumber) Dim CASp As New CASpBLL CASp.UpdateExamRegFromDSA601(Today.ToShortDateString(), SpecialAccomodationCheckBox.Checked, NoSaturdayExamCheckBox.Checked, RegId) Response.Redirect(String.Format("view_registration.aspx?regid={0}", RegId.ToString())) Else lblErrorMsg.Visible = True lblErrorMsg.Text = "User has already registered for a session for this exam" End If Else lblErrorMsg.Visible = True lblErrorMsg.Text = "UserId doesn't exist." End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)