示例#1
0
        public void FetchStudentDetails1(int pk_Uni_ID, int pk_Year, int pk_Student_ID)
        {
            try
            {
                ds = clsEligibilityDBAccess.Elg_AdvSearch_StudentEligibilityDetails(pk_Uni_ID, pk_Year, pk_Student_ID, hidRef_InstReg_Uni_ID.Value, hidRef_InstReg_Institute_ID.Value, hidRef_InstReg_Year.Value, hidRef_Student_ID.Value, hidPRN.Value);

                divTblElgFormdetails.Style.Remove("display");
                divTblElgFormdetails.Style.Add("display", "none");

                if (ds.Tables[0].Rows.Count > 0)
                {
                    Regex objNotNaturalPattern = new Regex("^([0-9]){16}$");
                    if (!objNotNaturalPattern.IsMatch(ds.Tables[0].Rows[0]["PRN"].ToString()))
                    {
                        lblPermRegNo.Text = "Not Generated";
                    }
                    else
                    {
                        lblPermRegNo.Text = ds.Tables[0].Rows[0]["PRN"].ToString();
                    }

                    lblAlumni.Text            = ds.Tables[0].Rows[0]["Alumini_Flag"].ToString();
                    lblNameAsMarksheet.Text   = ds.Tables[0].Rows[0]["Name_QualExamMarkSheet"].ToString();
                    lblNameOfStudent.Text     = ds.Tables[0].Rows[0]["Last_Name"].ToString() + " " + ds.Tables[0].Rows[0]["First_Name"].ToString() + " " + ds.Tables[0].Rows[0]["Middle_Name"].ToString();
                    lblMothersMaidenName.Text = ds.Tables[0].Rows[0]["Mother_Last_Name"].ToString() + " " + ds.Tables[0].Rows[0]["Mother_First_Name"].ToString() + " " + ds.Tables[0].Rows[0]["Mother_Middle_Name"].ToString();
                    lblFathersName.Text       = ds.Tables[0].Rows[0]["Father_Last_Name"].ToString() + " " + ds.Tables[0].Rows[0]["Father_First_Name"].ToString() + " " + ds.Tables[0].Rows[0]["Father_Middle_Name"].ToString();
                    if (ds.Tables[0].Rows[0]["Changed_Name_Flag"].ToString() == "1")
                    {
                        lblPreviousName.Text = ds.Tables[0].Rows[0]["Prev_Last_Name"].ToString() + " " + ds.Tables[0].Rows[0]["Prev_First_Name"].ToString() + " " + ds.Tables[0].Rows[0]["Prev_Middle_Name"].ToString();
                    }
                    lblGender.Text      = ds.Tables[0].Rows[0]["Gender_Desc"].ToString();
                    lblDOB.Text         = ds.Tables[0].Rows[0]["DOB"].ToString();           //Gender,Date_of_Birth,Changed_Name_Reason
                    lblNationality.Text = ds.Tables[0].Rows[0]["Nationality"].ToString();
                }

                if (ds.Tables[1].Rows.Count > 0)
                {
                    lblDomicileState.Text = ds.Tables[1].Rows[0]["Domicile_of_State"].ToString();
                    lblResvCategory.Text  = ds.Tables[1].Rows[0]["Category"].ToString();
                    if (ds.Tables[1].Rows[0]["Category_Flag"].ToString() == "1")
                    {
                        if (ds.Tables[1].Rows[0]["ResvCategory"].ToString() != "")
                        {
                            lblResvCategory.Text += " (" + ds.Tables[1].Rows[0]["ResvCategory"].ToString();
                            if (ds.Tables[1].Rows[0]["SubCaste"].ToString() != "")
                            {
                                lblResvCategory.Text += " - " + ds.Tables[1].Rows[0]["SubCaste"].ToString();
                            }
                            lblResvCategory.Text += ")";
                        }
                    }
                    if (ds.Tables[1].Rows[0]["Physically_Challenged_Flag"].ToString() == "1")
                    {
                        lblPhyChlngd.Text = ds.Tables[1].Rows[0]["PhysicallyChallenged"].ToString();
                    }
                    else
                    {
                        lblPhyChlngd.Text = "     -";
                    }
                    lblGuardianincome.Text     = "Rs. " + ds.Tables[1].Rows[0]["Guardian_Annual_Income"].ToString();
                    lblGuardianOccupation.Text = ds.Tables[1].Rows[0]["GuardOccupation"].ToString();
                }

                if (ds.Tables[2].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[2].Rows.Count; i++)
                    {
                        lblSocResv.Text += ds.Tables[2].Rows[i]["SocialReservation_Description"].ToString();
                        if (i < (ds.Tables[2].Rows.Count - 1))
                        {
                            lblSocResv.Text += ", ";
                        }
                    }
                }
                if (ds.Tables[3].Rows.Count > 0)
                {
                    DGQualification1.DataSource = ds.Tables[3];
                    DGQualification1.DataBind();
                }
                if (ds.Tables[4].Rows.Count > 0)
                {
                    DGSubmittedDocs1.DataSource = ds.Tables[4];
                    DGSubmittedDocs1.DataBind();
                }

                /*IF there are any Matching Records
                 * if(ds.Tables[5].Rows.Count>0)
                 * {
                 *
                 *  divMatchingRecords.Style.Add("display","block");
                 *  //lblEligibilityFormNo.Text=ds.Tables[5].Rows[0]["ElgFormNo"].ToString() ;
                 *  DGMatchgCourseDetails.DataSource=ds.Tables[5];
                 *  DGMatchgCourseDetails.DataBind();
                 * }
                 * else
                 * {
                 *
                 *  divMatchingRecords.Style.Add("display","none");
                 * }
                 * if ((hidPRN.Value == null) || (hidPRN.Value == ""))
                 * {*/

                if (ds.Tables[5].Rows.Count > 0)
                {
                    lblInstName.Text          = ds.Tables[5].Rows[0]["RefInstName"].ToString();
                    lblElgReason.Text         = FormatReason(ds.Tables[5].Rows[0]["Reason"].ToString());
                    lblElgStatus.Text         = FormatReason(ds.Tables[5].Rows[0]["EligibilityStatus"].ToString());
                    lblEligibilityFormNo.Text = ds.Tables[5].Rows[0]["ElgFormNo"].ToString();
                    TblAdmission.Style.Remove("display");
                    TblAdmission.Style.Add("display", "block");
                    divTblElgFormdetails.Style.Remove("display");
                    divTblElgFormdetails.Style.Add("display", "block");
                    lblAdmissionDate.Text = ds.Tables[5].Rows[0]["Admission_Date"].ToString();
                    lblAppFormNo.Text     = ds.Tables[5].Rows[0]["Admission_Form_No"].ToString();
                    lblCourse.Text        = ds.Tables[5].Rows[0]["Course"].ToString();
                }

                /*}
                 * else
                 * if ((hidPRN.Value != null) && (hidPRN.Value != ""))
                 * {
                 *  TblAdmission.Style.Remove("display");
                 *  TblAdmission.Style.Add("display", "none");
                 *  divTblElgFormdetails.Style.Remove("display");
                 *  divTblElgFormdetails.Style.Add("display", "none");
                 *  lblGridName.Text = "Course Eligibility Status";
                 * }*/


                hidDocCnt.Value = ds.Tables[4].Rows.Count.ToString();

                //Image1.ImageUrl = "ELGV2_ViewStatus__3.aspx?img=PR&sStudentDetails=" + hidpkYear.Value + "-" + hidpkStudentID.Value;
                //Image1.Visible = true;
                //Image2.ImageUrl = "ELGV2_ViewStatus__3.aspx?img=SR&sStudentDetails=" + hidpkYear.Value + "-" + hidpkStudentID.Value;
                //Image2.Visible = true;

                ds = elgDBAccess.Reg_Fetch_Student_Photograph(Convert.ToInt32(Classes.clsGetSettings.UniversityID.ToString()), Convert.ToInt32(hidpkYear.Value), Convert.ToInt32(hidpkStudentID.Value));
                if (ds.Tables[0].Rows.Count > 0)
                {
                    //Modified as per Req 102312
                    if (oCDNKeys != null)
                    {
                        objCDN          = new clsCDN(oCDNKeys.PhotoSignKey);
                        sPathExists     = !string.IsNullOrEmpty(Convert.ToString(ds.Tables[0].Rows[0]["PhotoPath"])) ? "Y" : "N";
                        Image1.ImageUrl = objCDN.PhotoSignDisplay(Convert.ToString(ds.Tables[0].Rows[0]["PhotoPath"]), sPathExists, "P");
                        Image1.Width    = objCDN.PhotoWidth;
                        Image1.Height   = objCDN.PhotoHeight;

                        sPathExists     = !string.IsNullOrEmpty(Convert.ToString(ds.Tables[0].Rows[0]["SignPath"])) ? "Y" : "N";
                        Image2.ImageUrl = objCDN.PhotoSignDisplay(Convert.ToString(ds.Tables[0].Rows[0]["SignPath"]), sPathExists, "S");
                        Image2.Width    = objCDN.ImageWidth;
                        Image2.Height   = objCDN.ImageHeight;
                    }
                }



                lblStudName.Text = "<br><b> for student <i>" + lblNameOfStudent.Text + "</i> for " + lblCr.Text + " " + ds.Tables[5].Rows[0]["Course"].ToString() + "</b>";

                /*divStudentDetails.Style.Add("Display","block");
                 * For Proper Display Message of Eligibility Decision
                 *
                 * lblGridName.Text ="Candidate "+ds.Tables[2].Rows[0]["First_Name"].ToString() +"'s Matching Other Course  Details ";
                 * if(ds.Tables[0].Rows.Count > 0)
                 *  lblPageHead.Text += "<font color='black'> of <i>"+lblNameOfStudent.Text+"</i> for Course "+ds.Tables[0].Rows[0]["CoursePart"].ToString()+"</font>";*/
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
                throw new Exception(ex.Message);
            }

            ds.Dispose();
        }
示例#2
0
        public void FetchStudentDetails()
        {
            DataSet ds = new DataSet();

            string[] RefIDarr = new string[4];
            RefIDarr = ElgFormNo.Split('-');
            try
            {
                ds = elgDBAccess.IA_Fetch_Student_Details_BulkInsert(hidUniID.Value, hidpkStudentID.Value, hidpkYear.Value, Classes.clsGetSettings.UniversityID.ToString(), RefIDarr[1], RefIDarr[2], RefIDarr[3], hidFacID.Value, hidCrID.Value, hidMoLrnID.Value, hidPtrnID.Value, hidBrnID.Value, hidCrPrID.Value);

                if (ds.Tables[2].Rows.Count > 0)
                {
                    lblNameAsMarksheet.Text   = ds.Tables[2].Rows[0]["Name_QualExamMarkSheet"].ToString();
                    lblNameOfStudent.Text     = ds.Tables[2].Rows[0]["Last_Name"].ToString() + " " + ds.Tables[2].Rows[0]["First_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Middle_Name"].ToString();
                    lblMothersMaidenName.Text = ds.Tables[2].Rows[0]["Mother_Last_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Mother_First_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Mother_Middle_Name"].ToString();
                    lblFathersName.Text       = ds.Tables[2].Rows[0]["Father_Last_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Father_First_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Father_Middle_Name"].ToString();
                    if (ds.Tables[2].Rows[0]["Changed_Name_Flag"].ToString() == "1")
                    {
                        lblPreviousName.Text = ds.Tables[2].Rows[0]["Prev_Last_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Prev_First_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Prev_Middle_Name"].ToString();
                    }
                    lblGender.Text      = ds.Tables[2].Rows[0]["Gender_Desc"].ToString();
                    lblDOB.Text         = ds.Tables[2].Rows[0]["DOB"].ToString();           //Gender,Date_of_Birth,Changed_Name_Reason
                    lblNationality.Text = ds.Tables[2].Rows[0]["Nationality"].ToString();
                }

                if (ds.Tables[3].Rows.Count > 0)
                {
                    lblDomicileState.Text = ds.Tables[3].Rows[0]["Domicile_of_State"].ToString();
                    lblResvCategory.Text  = ds.Tables[3].Rows[0]["Category"].ToString();
                    if (ds.Tables[3].Rows[0]["Category_Flag"].ToString() == "1")
                    {
                        if (ds.Tables[3].Rows[0]["ResvCategory"].ToString() != "")
                        {
                            lblResvCategory.Text += " (" + ds.Tables[3].Rows[0]["ResvCategory"].ToString();
                            if (ds.Tables[3].Rows[0]["SubCaste"].ToString() != "")
                            {
                                lblResvCategory.Text += " - " + ds.Tables[3].Rows[0]["SubCaste"].ToString();
                            }
                            lblResvCategory.Text += ")";
                        }
                    }
                    if (ds.Tables[3].Rows[0]["Physically_Challenged_Flag"].ToString() == "1")
                    {
                        lblPhyChlngd.Text = ds.Tables[3].Rows[0]["PhysicallyChallenged"].ToString();
                    }
                    else
                    {
                        lblPhyChlngd.Text = "     -";
                    }
                    lblAdmittedCategory.Text   = ds.Tables[3].Rows[0]["AdmittedCategory"].ToString();
                    lblGuardianincome.Text     = "Rs. " + ds.Tables[3].Rows[0]["Guardian_Annual_Income"].ToString();
                    lblGuardianOccupation.Text = ds.Tables[3].Rows[0]["GuardOccupation"].ToString();
                }

                if (ds.Tables[4].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[4].Rows.Count; i++)
                    {
                        lblSocResv.Text += ds.Tables[4].Rows[i]["SocialReservation_Description"].ToString();
                        if (i < (ds.Tables[4].Rows.Count - 1))
                        {
                            lblSocResv.Text += ", ";
                        }
                    }
                }

                if (ds.Tables[5].Rows.Count > 0)
                {
                    DGQualification1.DataSource = ds.Tables[5];
                    DGQualification1.DataBind();
                }

                if (ds.Tables[6].Rows.Count > 0)
                {
                    DGSubmittedDocs1.DataSource = ds.Tables[6];
                    DGSubmittedDocs1.DataBind();
                }
                else
                {
                    lblDoctext.Text    = "No documents submitted.";
                    lblDoctext.Visible = true;
                }
                if (ds.Tables[0].Rows.Count > 0)
                {
                    lblInstName.Text          = ds.Tables[0].Rows[0]["RefInstName"].ToString();
                    lblEligibilityFormNo.Text = hidElgFormNo.Value;
                    TblAdmission.Style.Remove("display");
                    TblAdmission.Style.Add("display", "block");
                    divTblElgFormdetails.Style.Remove("display");
                    divTblElgFormdetails.Style.Add("display", "block");

                    lblAdmissionDate.Text = ds.Tables[0].Rows[0]["Admission_Date"].ToString();
                    lblAppFormNo.Text     = ds.Tables[0].Rows[0]["Admission_Form_No"].ToString();
                    lblCourse.Text        = ds.Tables[0].Rows[0]["Course"].ToString();// +"-" + ds.Tables[0].Rows[0]["CrPrAbbr"].ToString();
                }
                //Modified as per Req 102312  By Deepak Omar
                //Image1.ImageUrl = dtRow["Download_Path"].ToString() + ds.Tables[2].Rows[0]["PhotoPath"].ToString();//"ELGV2_BulkProcess__3.aspx?img=PR&sStudentDetails=" + hidpkYear.Value + "-" + hidpkStudentID.Value;
                Image1.Visible = true;
                //Image2.ImageUrl = dtRow["Download_Path"].ToString() + ds.Tables[2].Rows[0]["SignPath"].ToString();//"ELGV2_BulkProcess__3.aspx?img=SR&sStudentDetails=" + hidpkYear.Value + "-" + hidpkStudentID.Value;
                Image2.Visible = true;
                if (oCDNKeys != null)
                {
                    objCDN          = new clsCDN(oCDNKeys.PhotoSignKey);
                    sPathExists     = !string.IsNullOrEmpty(Convert.ToString(ds.Tables[2].Rows[0]["PhotoPath"])) ? "Y" : "N";
                    Image1.ImageUrl = objCDN.PhotoSignDisplay(Convert.ToString(ds.Tables[2].Rows[0]["PhotoPath"]), sPathExists, "P");
                    sPathExists     = !string.IsNullOrEmpty(Convert.ToString(ds.Tables[2].Rows[0]["SignPath"])) ? "Y" : "N";
                    Image2.ImageUrl = objCDN.PhotoSignDisplay(Convert.ToString(ds.Tables[2].Rows[0]["SignPath"]), sPathExists, "S");
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
                throw new Exception(ex.Message);
            }

            ds.Dispose();
        }
示例#3
0
        public void FetchStudentDetails()
        {
            string ElgFormNo = hidElgFormNo.Value.ToString();

            //string[] RefIDarr = new string[4];
            RefIDarr = ElgFormNo.Split('-');   //Year = RefIDarr[0], UniID = RefIDarr[1], InstID = RefIDarr[2], StudID = RefIDarr[3]
            try
            {
                //ds=clsEligibilityDBAccess.REG_Get_Eligibilitystatusdetails(Convert.ToInt32(hidUniID.Value),Convert.ToInt32(hidpkYear.Value),Convert.ToInt32(hidpkStudentID.Value),hidPRN.Value);//Convert.ToInt32(RefIDarr[0].ToString()),Convert.ToInt32(RefIDarr[2].ToString()),Convert.ToInt32(RefIDarr[1].ToString()),Convert.ToInt32(RefIDarr[3].ToString()),hidPRN.Value);
                ds = clsEligibilityDBAccess.REG_Get_Eligibilitystatusdetails(Convert.ToInt32(Classes.clsGetSettings.UniversityID.ToString()), Convert.ToInt32(hidpkYear.Value), Convert.ToInt32(hidpkStudentID.Value), Convert.ToInt32(RefIDarr[0].ToString()), Convert.ToInt32(RefIDarr[1].ToString()), Convert.ToInt32(RefIDarr[2].ToString()), Convert.ToInt32(RefIDarr[3].ToString()), Convert.ToInt32(hidpkFacID.Value), Convert.ToInt32(hidpkCrID.Value), Convert.ToInt32(hidpkMoLrnID.Value), Convert.ToInt32(hidpkPtrnID.Value), Convert.ToInt32(hidpkBrnID.Value), Convert.ToInt32(hidpkCrPrDetailsID.Value));


                /* if (ds.Tables[0].Rows.Count > 0)
                 * {
                 *   lblPapers.Text = "<table id='Tbl2' cellSpacing='0' cellPadding='3' width='100%' border='1px'>";
                 *   int j = 0;
                 *   for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                 *   {
                 *       if (j == 0)
                 *           lblPapers.Text += "<tr class='rfont'>";
                 *       lblPapers.Text += "<td>" + ds.Tables[1].Rows[i]["PaperCode"].ToString() + "</td>";
                 *       lblPapers.Text += "<td>" + ds.Tables[1].Rows[i]["PaperName"].ToString() + "</td>";
                 ++j;
                 *       if (j == 3)
                 *       {
                 *           lblPapers.Text += "</tr>";
                 *           j = 0;
                 *       }
                 *
                 *   }
                 *
                 *   lblPapers.Text += "</table>";
                 * }*/

                if (ds.Tables[1].Rows.Count > 0)
                {
                    Regex objNotNaturalPattern = new Regex("^([0-9]){16}$");
                    if (!objNotNaturalPattern.IsMatch(ds.Tables[1].Rows[0]["PRN"].ToString()))
                    {
                        lblPermRegNo.Text = "Not Generated";
                    }
                    else
                    {
                        lblPermRegNo.Text = ds.Tables[1].Rows[0]["PRN"].ToString();
                    }
                    //lblPermRegNo.Text=ds.Tables[1].Rows[0]["PRN"].ToString();
                    lblAlumni.Text            = ds.Tables[1].Rows[0]["Alumini_Flag"].ToString();
                    lblNameAsMarksheet.Text   = ds.Tables[1].Rows[0]["Name_QualExamMarkSheet"].ToString();
                    lblNameOfStudent.Text     = ds.Tables[1].Rows[0]["Last_Name"].ToString() + " " + ds.Tables[1].Rows[0]["First_Name"].ToString() + " " + ds.Tables[1].Rows[0]["Middle_Name"].ToString();
                    lblMothersMaidenName.Text = ds.Tables[1].Rows[0]["Mother_Last_Name"].ToString() + " " + ds.Tables[1].Rows[0]["Mother_First_Name"].ToString() + " " + ds.Tables[1].Rows[0]["Mother_Middle_Name"].ToString();
                    lblFathersName.Text       = ds.Tables[1].Rows[0]["Father_Last_Name"].ToString() + " " + ds.Tables[1].Rows[0]["Father_First_Name"].ToString() + " " + ds.Tables[1].Rows[0]["Father_Middle_Name"].ToString();
                    if (ds.Tables[1].Rows[0]["Changed_Name_Flag"].ToString() == "1")
                    {
                        lblPreviousName.Text = ds.Tables[1].Rows[0]["Prev_Last_Name"].ToString() + " " + ds.Tables[1].Rows[0]["Prev_First_Name"].ToString() + " " + ds.Tables[1].Rows[0]["Prev_Middle_Name"].ToString();
                    }
                    lblGender.Text      = ds.Tables[1].Rows[0]["Gender_Desc"].ToString();
                    lblDOB.Text         = ds.Tables[1].Rows[0]["DOB"].ToString();
                    lblNationality.Text = ds.Tables[1].Rows[0]["Nationality"].ToString();
                    lblStudName.Text    = "<br><b> for student <i>" + lblNameOfStudent.Text + "</i> for " + lblCr.Text + " " + ds.Tables[0].Rows[0]["Course"].ToString() + "</b>";
                }

                if (ds.Tables[2].Rows.Count > 0)
                {
                    lblDomicileState.Text = ds.Tables[2].Rows[0]["Domicile_of_State"].ToString();
                    lblResvCategory.Text  = ds.Tables[2].Rows[0]["Category"].ToString();
                    if (ds.Tables[2].Rows[0]["Category_Flag"].ToString() == "1")
                    {
                        if (ds.Tables[2].Rows[0]["ResvCategory"].ToString() != "")
                        {
                            lblResvCategory.Text += " (" + ds.Tables[2].Rows[0]["ResvCategory"].ToString();
                            if (ds.Tables[2].Rows[0]["SubCaste"].ToString() != "")
                            {
                                lblResvCategory.Text += " - " + ds.Tables[2].Rows[0]["SubCaste"].ToString();
                            }
                            lblResvCategory.Text += ")";
                        }
                    }
                    if (ds.Tables[2].Rows[0]["Physically_Challenged_Flag"].ToString() == "1")
                    {
                        lblPhyChlngd.Text = ds.Tables[2].Rows[0]["PhysicallyChallenged"].ToString();
                    }
                    else
                    {
                        lblPhyChlngd.Text = "     -";
                    }
                    lblGuardianincome.Text     = "Rs. " + ds.Tables[2].Rows[0]["Guardian_Annual_Income"].ToString();
                    lblGuardianOccupation.Text = ds.Tables[2].Rows[0]["GuardOccupation"].ToString();
                }

                if (ds.Tables[5].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[5].Rows.Count; i++)
                    {
                        lblSocResv.Text += ds.Tables[5].Rows[i]["SocialReservation_Description"].ToString();
                        if (i < (ds.Tables[5].Rows.Count - 1))
                        {
                            lblSocResv.Text += ", ";
                        }
                    }
                }
                if (ds.Tables[3].Rows.Count > 0)
                {
                    DGQualification1.DataSource = ds.Tables[3];
                    DGQualification1.DataBind();
                }
                if (ds.Tables[4].Rows.Count > 0)
                {
                    DGSubmittedDocs1.DataSource = ds.Tables[4];
                    DGSubmittedDocs1.DataBind();
                }

                /*IF there are any Matching Records    This functionality is commented to supress
                 *                                      the logic of duplicate erecord checking
                 * if(ds.Tables[5].Rows.Count>0)
                 * {
                 *
                 *  divMatchingRecords.Style.Add("display","block");
                 *  //lblEligibilityFormNo.Text=ds.Tables[5].Rows[0]["ElgFormNo"].ToString() ;
                 *  DGMatchgCourseDetails.DataSource=ds.Tables[5];
                 *  DGMatchgCourseDetails.DataBind();
                 * }
                 * else
                 * {
                 *
                 *  divMatchingRecords.Style.Add("display","none");
                 * }
                 *
                 * if((hidPRN.Value==null)||(hidPRN.Value==""))
                 * {*/

                if (ds.Tables[0].Rows.Count > 0)
                {
                    lblInstName.Text          = ds.Tables[0].Rows[0]["RefInstName"].ToString();
                    lblElgReason.Text         = FormatReason(ds.Tables[0].Rows[0]["Reason"].ToString());
                    lblElgStatus.Text         = ds.Tables[0].Rows[0]["EligibilityStatus"].ToString();
                    lblEligibilityFormNo.Text = ds.Tables[0].Rows[0]["ElgFormNo"].ToString();
                    TblAdmission.Style.Remove("display");
                    TblAdmission.Style.Add("display", "block");
                    divTblElgFormdetails.Style.Remove("display");
                    divTblElgFormdetails.Style.Add("display", "block");

                    lblAdmissionDate.Text = ds.Tables[0].Rows[0]["Admission_Date"].ToString();
                    lblAppFormNo.Text     = ds.Tables[0].Rows[0]["Admission_Form_No"].ToString();
                    lblCourse.Text        = ds.Tables[0].Rows[0]["Course"].ToString();
                }

                /*}
                 * else
                 * if((hidPRN.Value!=null) && (hidPRN.Value!=""))
                 * {
                 *  TblAdmission.Style.Remove("display");
                 *  TblAdmission.Style.Add("display","none");
                 *  divTblElgFormdetails.Style.Remove("display");
                 *  divTblElgFormdetails.Style.Add("display","none");
                 *  lblGridName.Text="Course Eligibility Status";
                 * }*/
                //hidDocCnt.Value = ds.Tables[5].Rows.Count.ToString();

                //Image1.ImageUrl = dtRow["Download_Path"].ToString() + ds.Tables[1].Rows[0]["PhotoPath"].ToString();//"ELGV2_ViewStatus__3.aspx?img=PR&sStudentDetails=" + hidpkYear.Value + "-" + hidpkStudentID.Value;
                Image1.Visible = true;
                //Image2.ImageUrl = dtRow["Download_Path"].ToString() + ds.Tables[1].Rows[0]["SignPath"].ToString();//"ELGV2_ViewStatus__3.aspx?img=SR&sStudentDetails=" + hidpkYear.Value + "-" + hidpkStudentID.Value;
                Image2.Visible = true;
                if (oCDNKeys != null)
                {
                    objCDN          = new clsCDN(oCDNKeys.PhotoSignKey);
                    sPathExists     = !string.IsNullOrEmpty(Convert.ToString(ds.Tables[1].Rows[0]["PhotoPath"])) ? "Y" : "N";
                    Image1.ImageUrl = objCDN.PhotoSignDisplay(Convert.ToString(ds.Tables[1].Rows[0]["PhotoPath"]), sPathExists, "P");
                    sPathExists     = !string.IsNullOrEmpty(Convert.ToString(ds.Tables[1].Rows[0]["SignPath"])) ? "Y" : "N";
                    Image2.ImageUrl = objCDN.PhotoSignDisplay(Convert.ToString(ds.Tables[1].Rows[0]["SignPath"]), sPathExists, "S");
                }


                /*divStudentDetails.Style.Add("Display","block");
                 * For Proper Display Message of Eligibility Decision
                 *
                 * lblGridName.Text ="Candidate "+ds.Tables[2].Rows[0]["First_Name"].ToString() +"'s Matching Other Course  Details ";
                 * if(ds.Tables[0].Rows.Count > 0)
                 *  lblPageHead.Text += "<font color='black'> of <i>"+lblNameOfStudent.Text+"</i> for Course "+ds.Tables[0].Rows[0]["CoursePart"].ToString()+"</font>";*/
            }
            catch (Exception ex)
            {
                //    Response.Write(ex.Message);
                throw ex;
            }

            finally
            {
                ds.Dispose();
            }
        }
        public void FetchStudentDetails()
        {
            //			Session["ElgFormNo"] = null;
            //			Session["pk_Year"] = null;
            //			Session["pk_Student_ID"]=null;
            //			Session["pk_CrMoLrnPtrn_ID"]=null;
            lblEligibilityFormNo.Text = hidElgFormNo.Value.ToString();

            //lblEligibilityFormNo.Text = Session["ElgFormNo"].ToString();
            //string ElgFormNo = Session["ElgFormNo"].ToString();
            string ElgFormNo = hidElgFormNo.Value.ToString();

            RefIDarr = ElgFormNo.Split('-');   // UniID = RefIDarr[0], InstID = RefIDarr[1],Year = RefIDarr[2], StudID = RefIDarr[3]
            try
            {
                //ds=clsEligibilityDBAccess.Fetch_REG_Pending_Student_Details(Convert.ToInt32(ConfigurationSettings.AppSettings["UniversityID"].ToString()),Convert.ToInt32(Session["pk_Year"].ToString()),Convert.ToInt32(Session["pk_Student_ID"].ToString()),Convert.ToInt32(RefIDarr[1].ToString()),Convert.ToInt32(RefIDarr[0].ToString()),Convert.ToInt32(RefIDarr[2].ToString()),Convert.ToInt32(RefIDarr[3].ToString()),Convert.ToInt32(Session["pk_CrMoLrnPtrn_ID"].ToString()));
                ds = clsEligibilityDBAccess.Fetch_REG_Pending_Student_Details(Convert.ToInt32(Classes.clsGetSettings.UniversityID.ToString()), Convert.ToInt32(hidpkYear.Value), Convert.ToInt32(hidpkStudentID.Value), Convert.ToInt32(RefIDarr[0].ToString()), Convert.ToInt32(RefIDarr[1].ToString()), Convert.ToInt32(RefIDarr[2].ToString()), Convert.ToInt32(RefIDarr[3].ToString()), Convert.ToInt32(hidpkFacID.Value), Convert.ToInt32(hidpkCrID.Value), Convert.ToInt32(hidpkMoLrnID.Value), Convert.ToInt32(hidpkPtrnID.Value), Convert.ToInt32(hidpkCrPrDetailsID.Value), Convert.ToInt32(hidpkBrnID.Value));
                //ds=clsEligibilityDBAccess.Fetch_REG_Pending_Student_Details(179,1996,100,179,1996,1,1,1);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    lblInstName.Text      = ds.Tables[0].Rows[0]["RefInstName"].ToString();
                    lblPendingReason.Text = FormatReason(ds.Tables[0].Rows[0]["PendingReason"].ToString());
                    lblAdmissionDate.Text = ds.Tables[0].Rows[0]["Admission_Date"].ToString();
                    lblAppFormNo.Text     = ds.Tables[0].Rows[0]["Admission_Form_No"].ToString();
                    //lblCourse.Text=ds.Tables[0].Rows[0]["Course"].ToString()+" ("+ds.Tables[0].Rows[0]["CoursePart"].ToString()+")";
                    //lblFaculty.Text = ds.Tables[0].Rows[0]["Faculty"].ToString();
                    lblCourse.Text      = ds.Tables[0].Rows[0]["Course"].ToString(); //+ "-" + ds.Tables[0].Rows[0]["CrPrAbbr"].ToString();
                    hidElgFlag.Value    = ds.Tables[0].Rows[0]["Eligibility"].ToString();
                    hidSMSCrAbbr.Value  = ds.Tables[0].Rows[0]["CrAbbr"].ToString();
                    hidAcademicYr.Value = ds.Tables[0].Rows[0]["Year"].ToString();
                    if (hidSMSCrAbbr.Value.Length > 9)
                    {
                        hidSMSCrAbbr.Value = hidSMSCrAbbr.Value.Substring(0, 8);
                    }
                }

                if (ds.Tables[1].Rows.Count > 0)
                {
                    lblPapers.Text = "<table cellSpacing='0' cellPadding='3' width='100%' align='center' style='BORDER-TOP: silver 1px solid; BORDER-LEFT: silver 1px solid;'>"; //border='1px'
                    int j = 0;
                    for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                    {
                        if (j == 0)
                        {
                            lblPapers.Text += "<tr>"; //class='rfont'
                        }
                        lblPapers.Text += "<td style='BORDER-RIGHT: silver 1px solid; BORDER-BOTTOM: silver 1px solid'>" + ds.Tables[1].Rows[i]["PaperCode"].ToString() + "</td>";
                        lblPapers.Text += "<td style='BORDER-RIGHT: silver 1px solid; BORDER-BOTTOM: silver 1px solid'>" + ds.Tables[1].Rows[i]["PaperName"].ToString() + "</td>";
                        ++j;
                        if (j == 3)
                        {
                            lblPapers.Text += "</tr>";
                            j = 0;
                        }
                    }
                    lblPapers.Text += "</table>";
                }

                if (ds.Tables[2].Rows.Count > 0)
                {
                    lblPermRegNo.Text = ds.Tables[2].Rows[0]["PRN"].ToString();
                    if (lblPermRegNo.Text == "" || lblPermRegNo.Text == null)
                    {
                        lblPermRegNo.Text = "Not Generated";
                    }
                    lblAlumni.Text            = ds.Tables[2].Rows[0]["Alumini_Flag"].ToString();
                    lblNameOfStudent.Text     = ds.Tables[2].Rows[0]["Last_Name"].ToString() + " " + ds.Tables[2].Rows[0]["First_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Middle_Name"].ToString();
                    lblNameAsMarksheet.Text   = ds.Tables[2].Rows[0]["Name_QualExamMarkSheet"].ToString();
                    lblMothersMaidenName.Text = ds.Tables[2].Rows[0]["Mother_Last_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Mother_First_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Mother_Middle_Name"].ToString();
                    lblFathersName.Text       = ds.Tables[2].Rows[0]["Father_Last_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Father_First_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Father_Middle_Name"].ToString();
                    hidSMSFirstName.Value     = ds.Tables[2].Rows[0]["First_Name"].ToString();
                    if (hidSMSFirstName.Value.Length > 15)
                    {
                        hidSMSFirstName.Value = hidSMSFirstName.Value.Substring(0, 14);
                    }
                    if (ds.Tables[2].Rows[0]["Changed_Name_Flag"].ToString() == "1")
                    {
                        lblPreviousName.Text = ds.Tables[2].Rows[0]["Prev_Last_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Prev_First_Name"].ToString() + " " + ds.Tables[2].Rows[0]["Prev_Middle_Name"].ToString();
                    }
                    lblGender.Text           = ds.Tables[2].Rows[0]["Gender_Desc"].ToString();
                    lblDOB.Text              = ds.Tables[2].Rows[0]["DOB"].ToString();      //Gender,Date_of_Birth,Changed_Name_Reason
                    lblNationality.Text      = ds.Tables[2].Rows[0]["Nationality"].ToString();
                    hidSMSMobileNumber.Value = ds.Tables[2].Rows[0]["Mobile_Number"].ToString();
                    hidUniAbbrv.Value        = ds.Tables[2].Rows[0]["UniAbbr"].ToString().ToUpper();
                }

                if (ds.Tables[3].Rows.Count > 0)
                {
                    lblDomicileState.Text = ds.Tables[3].Rows[0]["Domicile_of_State"].ToString();
                    lblResvCategory.Text  = ds.Tables[3].Rows[0]["Category"].ToString();
                    if (ds.Tables[3].Rows[0]["Category_Flag"].ToString() == "1")
                    {
                        if (ds.Tables[3].Rows[0]["ResvCategory"].ToString() != "")
                        {
                            lblResvCategory.Text += " (" + ds.Tables[3].Rows[0]["ResvCategory"].ToString();
                            if (ds.Tables[3].Rows[0]["SubCaste"].ToString() != "")
                            {
                                lblResvCategory.Text += " - " + ds.Tables[3].Rows[0]["SubCaste"].ToString();
                            }
                            lblResvCategory.Text += ")";
                        }
                    }
                    if (ds.Tables[3].Rows[0]["Physically_Challenged_Flag"].ToString() == "1")
                    {
                        lblPhyChlngd.Text = ds.Tables[3].Rows[0]["PhysicallyChallenged"].ToString();
                    }
                    else
                    {
                        lblPhyChlngd.Text = "     -";
                    }
                    lblAdmittedCategory.Text   = ds.Tables[3].Rows[0]["AdmittedCategory"].ToString();
                    lblGuardianincome.Text     = "Rs. " + ds.Tables[3].Rows[0]["Guardian_Annual_Income"].ToString();
                    lblGuardianOccupation.Text = ds.Tables[3].Rows[0]["GuardOccupation"].ToString();
                }

                if (ds.Tables[4].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[4].Rows.Count; i++)
                    {
                        lblSocResv.Text += ds.Tables[4].Rows[i]["SocialReservation_Description"].ToString();
                        if (i < (ds.Tables[4].Rows.Count - 1))
                        {
                            lblSocResv.Text += ", ";
                        }
                    }
                }
                if (ds.Tables[5].Rows.Count > 0)
                {
                    DGQualification1.DataSource = ds.Tables[5];
                    DGQualification1.DataBind();
                }
                if (ds.Tables[6].Rows.Count > 0)
                {
                    DGSubmittedDocs1.DataSource = ds.Tables[6];
                    DGSubmittedDocs1.DataBind();
                }

                //IF there are any Matching Records
                //Commented By deepti on 10/09/2007 to supress the functionality of
                //displaying match records for different Courses and Institutes for given student

                /*
                 *      HTML code to show matching records,removed from aspx page as it was giving error when commented
                 *                      <div id="divMatchingRecords" style="DISPLAY: block" runat="server"><br>
                 *                              <asp:label id="lblGridName" runat="server" Width="100%" CssClass="GridHeadingM" Height="18px"> Eligiblility Pending Student's Other Course(s) Details</asp:label><asp:datagrid id="DGMatchgCourseDetails" runat="server" Width="100%" BorderColor="#336699" BorderWidth="1px"
                 *                                      AutoGenerateColumns="False" PageSize="5" BorderStyle="Solid">
                 *                                      <ItemStyle CssClass="GridData2"></ItemStyle>
                 *                                      <HeaderStyle Font-Bold="True" HorizontalAlign="Center" BorderWidth="1px" ForeColor="White" BorderStyle="Solid"
                 *                                              BorderColor="White" CssClass="GridHeading"></HeaderStyle>
                 *                                      <Columns>
                 *                                              <asp:BoundColumn ReadOnly="True" HeaderText="Sr. No."></asp:BoundColumn>
                 *                                              <asp:BoundColumn DataField="Course" HeaderText="Course"></asp:BoundColumn>
                 *                                              <asp:BoundColumn DataField="InstituteName" HeaderText="Institute Name"></asp:BoundColumn>
                 *                                              <asp:BoundColumn DataField="EligibilityStatus" HeaderText="Eligibility Status"></asp:BoundColumn>
                 *                                              <asp:BoundColumn DataField="CourseStatus" HeaderText="Course Status"></asp:BoundColumn>
                 *                                      </Columns>
                 *                                      <PagerStyle Mode="NumericPages"></PagerStyle>
                 *                              </asp:datagrid>
                 *                      </div>
                 */
                /*if(ds.Tables[7].Rows.Count>0)
                 * {
                 *
                 *  divMatchingRecords.Style.Add("display","block");
                 *  DGMatchgCourseDetails.DataSource=ds.Tables[7];
                 *  DGMatchgCourseDetails.DataBind();
                 * }
                 * else
                 * {
                 *
                 *  divMatchingRecords.Style.Add("display","none");
                 * }*/


                hidDocCnt.Value = ds.Tables[6].Rows.Count.ToString();
                //Image1.ImageUrl = dtRow["Download_Path"].ToString() + ds.Tables[2].Rows[0]["PhotoPath"].ToString();//"ELGV2_ResolvePending__3.aspx?img=PR&sStudentDetails=" + hidpkYear.Value + "-" + hidpkStudentID.Value;
                Image1.Visible = true;
                Image2.Visible = true;
                if (oCDNKeys != null)
                {
                    objCDN          = new clsCDN(oCDNKeys.PhotoSignKey);
                    sPathExists     = !string.IsNullOrEmpty(Convert.ToString(ds.Tables[2].Rows[0]["PhotoPath"])) ? "Y" : "N";
                    Image1.ImageUrl = objCDN.PhotoSignDisplay(Convert.ToString(ds.Tables[2].Rows[0]["PhotoPath"]), sPathExists, "P");
                    sPathExists     = !string.IsNullOrEmpty(Convert.ToString(ds.Tables[2].Rows[0]["SignPath"])) ? "Y" : "N";
                    Image2.ImageUrl = objCDN.PhotoSignDisplay(Convert.ToString(ds.Tables[2].Rows[0]["SignPath"]), sPathExists, "S");
                }

                divStudentDetails.Style.Add("Display", "block");

                //For Proper Display Message of Eligibility Decision
                if (hidElgFlag.Value == "1")
                {
                    lblProfileHeading.Text   = "Candidate " + ds.Tables[2].Rows[0]["First_Name"].ToString() + " is Marked Eligible for the " + lblCr.Text + " : " + ds.Tables[0].Rows[0]["CrPrAbbr"].ToString();
                    divPendingReason.Visible = false;
                    divReason.Attributes.Add("style", "display:none");
                }
                else if (hidElgFlag.Value == "2")
                {
                    lblProfileHeading.Text    = "Candidate " + ds.Tables[2].Rows[0]["First_Name"].ToString() + " is Marked Not-Eligible for the " + lblCr.Text + " : " + ds.Tables[0].Rows[0]["CrPrAbbr"].ToString();
                    lblEligibilityReason.Text = "Not-Eligible due to following reason(s)";
                    divPendingReason.Visible  = true;
                    rbDefaulter.Checked       = true;
                    divReason.Attributes.Add("style", "display:inline");
                    divOldReason.Attributes.Add("style", "display:inline");
                    //tbReason.Text = ds.Tables[0].Rows[0]["PendingReason"].ToString();
                    tbOldReason.Text = FormatReason(ds.Tables[0].Rows[0]["PendingReason"].ToString()).Replace("<br/>", Environment.NewLine);;
                }
                else if (hidElgFlag.Value == "3")
                {
                    lblProfileHeading.Text    = "Candidate " + ds.Tables[2].Rows[0]["First_Name"].ToString() + " is Marked Pending for the " + lblCr.Text + " : " + ds.Tables[0].Rows[0]["CrPrAbbr"].ToString();
                    lblEligibilityReason.Text = "Eligibility Kept Pending due to following reason(s)";
                    divPendingReason.Visible  = true;
                    rbPending.Checked         = true;
                    divReason.Attributes.Add("style", "display:inline");
                    divOldReason.Attributes.Add("style", "display:inline");
                    //tbReason.Text = ds.Tables[0].Rows[0]["PendingReason"].ToString();
                    tbOldReason.Text = FormatReason(ds.Tables[0].Rows[0]["PendingReason"].ToString()).Replace("<br/>", Environment.NewLine);;
                }
                //lblGridName.Text ="Candidate "+ds.Tables[2].Rows[0]["First_Name"].ToString() +"'s Matching Other Course  Details ";
                if (ds.Tables[0].Rows.Count > 0)
                {
                    hidUniID.Value = Classes.clsGetSettings.UniversityID.ToString();
                }
                lblPageHead.Text  = "Resolve Pending Eligibility";
                lblSubHeader.Text = "  for " + InstRep.InstituteName(hidUniID.Value, hidInstID.Value);
                lblStudName.Text  = "<br><b> for student <i>" + lblNameOfStudent.Text + "</i> for " + lblCr.Text + " " + ds.Tables[0].Rows[0]["CrPrAbbr"].ToString() + "</b>";
            }
            catch (Exception ex)
            {
                throw (ex);
            }

            finally
            {
                ds.Dispose();
            }
        }