private void PopulateScholarShipDetails(string scholarShipDetailsId) { var scholarShipDetails = PageDataService.GetScholarShipDetailsByScholarShipDetailsIdAdoNet(Convert.ToInt32(scholarShipDetailsId)); if (scholarShipDetails != null && lblStudentNameSelected != null && lblStudentmName != null && lblStudentfName != null && lblStudentcName != null && lblStudentsName != null && lblStudentMediumName != null && ddlAcademicYearInScholarShipAdd != null && ddlScholarShipTypeInScholarShipAdd != null) { lblStudentNameSelected.Text = scholarShipDetails.Student.StudentName; lblStudentmName.Text = scholarShipDetails.Student.MotherName; lblStudentfName.Text = scholarShipDetails.Student.FatherName; lblStudentcName.Text = scholarShipDetails.Student.Class1.ClassName; lblStudentsName.Text = scholarShipDetails.Student.Section.SectionName; lblStudentMediumName.Text = scholarShipDetails.Student.Medium.MediumName; ddlAcademicYearInScholarShipAdd.SelectedValue = Convert.ToString(scholarShipDetails.AcademicYearId); ddlScholarShipTypeInScholarShipAdd.SelectedValue = Convert.ToString(scholarShipDetails.ScholarShipTypeId); txtStudentScholarShip.Text = Convert.ToString(scholarShipDetails.AmountSanctioned); } }