public void fillmatchingrecords() { matchingrecords.Tables.Add("MatchingRecord"); matchingrecords.Tables["MatchingRecord"].Columns.Add("StudentName"); matchingrecords.Tables["MatchingRecord"].Columns.Add("PRN"); matchingrecords.Tables["MatchingRecord"].Columns.Add("Certificate_Number"); matchingrecords.Tables["MatchingRecord"].Columns.Add("PassedYear"); matchingrecords.Tables["MatchingRecord"].Columns.Add("Board"); DataRow dr = matchingrecords.Tables["MatchingRecord"].NewRow(); dr["StudentName"] = "Ram Gopal"; dr["PRN"] = "20060000011"; dr["Certificate_Number"] = "765432"; dr["PassedYear"] = "1996"; dr["Board"] = "MAHARASHTRA STATE BOARD OF SECONDARY AND HIGHER SECONDARY EDUCATION"; matchingrecords.Tables["MatchingRecord"].Rows.Add(dr); dr = matchingrecords.Tables["MatchingRecord"].NewRow(); dr["StudentName"] = "Ram G"; dr["PRN"] = "20060000011"; dr["Certificate_Number"] = "765432"; dr["PassedYear"] = "1996"; dr["Board"] = "MAHARASHTRA STATE BOARD OF SECONDARY AND HIGHER SECONDARY EDUCATION"; matchingrecords.Tables["MatchingRecord"].Rows.Add(dr); DGMatchingRecords.DataSource = matchingrecords; DGMatchingRecords.DataBind(); }
public void FetchStudentDetails() { trChangedName.Style.Add("display", "none"); //lblEligibilityFormNo.Text = Session["ElgFormNo"].ToString(); lblEligibilityFormNo.Text = hidElgFormNo.Value; //string ElgFormNo = Session["ElgFormNo"].ToString(); string ElgFormNo = hidElgFormNo.Value; string[] arr = new string[4]; arr = ElgFormNo.Split('-'); //UniID = arr[0], InstID = arr[1], Year = arr[2], StudID = arr[3] ds = new DataSet(); try { ds = elgDBAccess.IA_Fetch_Student_Details(arr[2], ConfigurationSettings.AppSettings["UniversityID"].ToString(), arr[1], arr[3]); if (ds.Tables[0].Rows.Count > 0) { 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() + "(" + ds.Tables[0].Rows[0]["Faculty"].ToString() + ")"; //lblFaculty.Text = ds.Tables[0].Rows[0]["Faculty"].ToString(); lblInstName.Text = ds.Tables[0].Rows[0]["InstName"].ToString(); hidCrMoLrnPtrnID.Value = ds.Tables[0].Rows[0]["pk_CrMoLrnPtrn_ID"].ToString(); } 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) { 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(); //Giving Title lblTitle.Text = " of " + " <i>" + lblNameOfStudent.Text + "</i>" + " for Course " + ds.Tables[0].Rows[0]["CoursePart"].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(); trChangedName.Style.Add("display", "block"); } 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 = " -"; } 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) { DGQualification.DataSource = ds.Tables[5]; DGQualification.DataBind(); } if (ds.Tables[6].Rows.Count > 0) { DGSubmittedDocs.DataSource = ds.Tables[6]; DGSubmittedDocs.DataBind(); } else { lblDoctext.Text = "NO documents submitted."; lblDoctext.Visible = true; } if (ds.Tables[7].Rows.Count > 0) { DGMatchingRecords.DataSource = ds.Tables[7]; DGMatchingRecords.DataBind(); divMatchingRecords.Style.Add("display", "block"); } hidMatchingRecCount.Value = ds.Tables[7].Rows.Count.ToString(); hidDocCnt.Value = ds.Tables[6].Rows.Count.ToString(); Image1.ImageUrl = "PhotoAndSignTemp.aspx?img=PI"; Image1.Visible = true; Image2.ImageUrl = "PhotoAndSignTemp.aspx?img=SI"; Image2.Visible = true; divStudentDetails.Style.Add("Display", "block"); } catch (Exception ex) { throw new Exception(ex.Message); } ds.Dispose(); }