예제 #1
0
        protected void btnSimpleSearch_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            //lblCrPrTermHead.Text = "List of available Course Part Terms";
            divCourses.Style.Add("display", "block");

            /* call SP for listing all courses of a student here */

            if (txtElgFormNo.Text != "")
            {
                Elg_FormNo = txtElgFormNo.Text.Trim();
            }

            else
            {
                Elg_FormNo = "0-0-0-0";
            }

            int    cnt = 0;
            string str = Elg_FormNo;
            int    pos = str.IndexOf('-');

            string[] arr = new string[] { "0", "0", "0", "0" };
            Regex    objNotNaturalPattern = new Regex("^([0-9]){16}$");

            if (objNotNaturalPattern.IsMatch(txtPRN.Text.Trim()))
            {
                PRNumber = txtPRN.Text.Trim();
            }

            while (pos != -1)
            {
                str = str.Substring(pos + 1);
                pos = str.IndexOf('-');
                cnt++;
            }
            if (cnt == 3)
            {
                arr = new string[4];
                arr = Elg_FormNo.Split('-');   //UniID = arr[0], InstID = arr[1], Year = arr[2], StudID = arr[3]
                for (int i = 0; i < 4; i++)
                {
                    if (arr[i] == "")
                    {
                        arr[i] = "0";
                    }
                }
            }

            dt = ElgClasses.clsCollegeAdmissionReports.ListStudentwiseCrPrTerms_ExemptionClaim(PRNumber, arr[0], arr[1], arr[2], arr[3]);

            if (dt != null && dt.Rows.Count > 0)
            {
                GVCourseTerms.Visible = true;
                divNoteEnabledLink.Style.Add("display", "block");
                lblCrPrTermHead.Visible   = true;
                lblNoRecordsFound.Visible = false;

                GVCourseTerms.DataSource = dt;
                GVCourseTerms.DataBind();
                //storing UniID, YearID, StudentID in hidden fields
                arr            = dt.Rows[0].ItemArray[0].ToString().Split('-');
                hidUniID.Value = arr[0].ToString();
                DataRow Dr = dt.Rows[0];
                hidYearID.Value    = Dr["pkYear"].ToString();
                hidStudentID.Value = Dr["pkStudentID"].ToString();
                hidPRN.Value       = txtPRN.Text;
                hidElgFormNo.Value = txtElgFormNo.Text;

                // changing Page Heading according to selected student
                lblAcaYear.Text  = " for " + Dr["StudentName"].ToString() + " for " + Dr["CourseName"].ToString();
                hidHeading.Value = Dr["StudentName"].ToString() + " for " + Dr["CourseName"].ToString();
            }
            else
            {
                GVCourseTerms.Visible     = false;
                lblNoRecordsFound.Visible = true;

                if (txtElgFormNo.Text == "")
                {
                    lblNoRecordsFound.Text = "Student does not exist for entered " + lblPRNNomenclature.Text;
                }
                else
                {
                    lblNoRecordsFound.Text = "Student does not exist for entered Eligibility form number";
                }

                divNoteEnabledLink.Style.Add("display", "none");
                lblCrPrTermHead.Visible = false;
                lblAcaYear.Text         = "";
            }
        }
예제 #2
0
        protected void btnSimpleSearch_Click(object sender, EventArgs e)
        {
            /* call SP for listing all courses of a student here */
            lblCrPrTermHead.Text = "List of available " + lblCourse.Text + " Part Terms";
            divCourses.Style.Add("display", "block");

            if (txtElgFormNo.Text != "")
            {
                Elg_FormNo = txtElgFormNo.Text.Trim();
            }

            else
            {
                Elg_FormNo = "0-0-0-0";
            }

            int    cnt = 0;
            string str = Elg_FormNo;
            int    pos = str.IndexOf('-');

            string[] arr = new string[] { "0", "0", "0", "0" };
            Regex    objNotNaturalPattern = new Regex("^([0-9]){16}$");

            if (objNotNaturalPattern.IsMatch(txtPRN.Text.Trim()))
            {
                PRNumber = txtPRN.Text.Trim();
            }

            while (pos != -1)
            {
                str = str.Substring(pos + 1);
                pos = str.IndexOf('-');
                cnt++;
            }
            if (cnt == 3)
            {
                arr = new string[4];
                arr = Elg_FormNo.Split('-');   //UniID = arr[0], InstID = arr[1], Year = arr[2], StudID = arr[3]
                for (int i = 0; i < 4; i++)
                {
                    if (arr[i] == "")
                    {
                        arr[i] = "0";
                    }
                }
            }

            dt = ElgClasses.clsCollegeAdmissionReports.ListStudentwiseCrPrTerms_ChangeExemptionDecision(PRNumber, arr[0], arr[1], arr[2], arr[3]);

            if (dt != null && dt.Rows.Count > 0)
            {
                GVCourseTerms.Visible = true;
                divNoteEnabledLink.Style.Add("display", "block");
                lblCrPrTermHead.Visible   = true;
                lblNoRecordsFound.Visible = false;

                GVCourseTerms.DataSource = dt;
                GVCourseTerms.DataBind();
                //storing UniID, YearID in hidden fields
                arr            = dt.Rows[0].ItemArray[0].ToString().Split('-');
                hidUniID.Value = arr[0].ToString();

                /* Commented by Shivani on 15/12/2014 to resolve a budobserver thru issue no 57355
                 * hidYearID.Value = arr[2].ToString();
                 */
                hidYearID.Value    = dt.Rows[0]["pkYear"].ToString();
                hidPRN.Value       = txtPRN.Text;
                hidElgFormNo.Value = txtElgFormNo.Text;
                DataRow Dr = dt.Rows[0];
                lblAcaYear.Text = " for " + Dr["StudentName"].ToString() + " for " + Dr["CourseName"].ToString();
            }
            else
            {
                GVCourseTerms.Visible     = false;
                lblNoRecordsFound.Visible = true;
                divNoteEnabledLink.Style.Add("display", "none");
                lblCrPrTermHead.Visible = false;
            }
        }