private void PopulateStudentDetails(string studentId)
        {
            var student = PageDataService.GetStudentAdoNet(Convert.ToInt32(studentId));

            if (student != null)
            {
                if (txtStudentName != null && txtMotherName != null && txtFatherName != null && txtAge != null &&
                    ddlGender != null && ddlClassInAddStudent != null && ddlSectionInAddStudent != null &&
                    ddlMediumInAddStudent != null && ddlCastInAddStudent != null && txtAddressLineOne != null &&
                    txtVillage != null && txtDistrict != null && txtPincode != null)
                {
                    txtStudentName.Text                  = student.StudentName;
                    txtFatherName.Text                   = student.FatherName;
                    txtMotherName.Text                   = student.MotherName;
                    txtAge.Text                          = Convert.ToString(student.Age);
                    txtAddressLineOne.Text               = student.Address.AdrressLineOne;
                    txtVillage.Text                      = student.Address.Village;
                    txtDistrict.Text                     = student.Address.District;
                    txtPincode.Text                      = student.Address.Pincode;
                    ddlGender.SelectedValue              = student.Gender;
                    ddlClassInAddStudent.SelectedValue   = Convert.ToString(student.Class);
                    ddlSectionInAddStudent.SelectedValue = Convert.ToString(student.SectionId);
                    ddlCastInAddStudent.SelectedValue    = Convert.ToString(student.CastId);
                    ddlMediumInAddStudent.SelectedValue  = Convert.ToString(student.MediumId);
                }
            }
        }
        private void PopulateStudentDetails(string studentId)
        {
            var student             = PageDataService.GetStudentAdoNet(Convert.ToInt32(studentId));
            var currentAcademicYear = PageDataService.GetActiveAcademicYearAdoNet();

            if (student != null && currentAcademicYear != null)
            {
                hdnAccademicYearId.Value = Convert.ToString(currentAcademicYear.AcademicYearId);
                var feeMaster = PageDataService.GetFeeMasterByMediumIdAndClassIdAndAcademicYearIdAdoNet(student.MediumId,
                                                                                                        student.Class,
                                                                                                        currentAcademicYear.
                                                                                                        AcademicYearId);
                var studentAccount = AddAccountForCurrentAcademicYearForStuddentIfNotPresent(currentAcademicYear,
                                                                                             student);
                PopulateStudentAccountDetails(studentAccount, feeMaster, student, currentAcademicYear);
            }
        }