Exemplo n.º 1
0
        protected void ddlRollNumber_SelectedIndexChanged(object sender, EventArgs e)
        {
            //Get student name and ID based on the Selected Class, Section and Roll Sumber
            string getNameAndID = dbops.getName(ddlClasses.SelectedValue, ddlSection.SelectedValue, ddlRollNumber.SelectedValue);

            string[] studentInfo = getNameAndID.Split('$');
            studentName.Text    = studentInfo[0];
            studentID.Value     = studentInfo[1];
            filenameField.Value = studentID.Value + "_" + ddlClasses.SelectedValue + "_" + ddlSection.SelectedValue + "_" + ddlRollNumber.SelectedValue + "_face";

            //Check if student is already registered
            Boolean studentAlreadyExists = dbops.checkForRegisteredStudent(studentID.Value.Trim());

            if (studentAlreadyExists)
            {
                alreadyExistsLabel.Text  = "Student already registered!";
                nextRegistration.Visible = true;
                cameraModule.Enabled     = false;
                btnSave1.Visible         = false;
                videoModule.Visible      = false;
            }
            else
            {
                alreadyExistsLabel.Text  = "";
                cameraModule.Enabled     = true;
                nextRegistration.Visible = false;
                btnSave1.Visible         = true;
                videoModule.Visible      = true;
            }
        }