public JsonResult EditProfileSchoolStu(long UID, long SchoolID) { ResultInfo <SchoolStudentEdit> ResultInfo = new ResultInfo <SchoolStudentEdit>() { Status = false, Description = "Failed|Login" }; SchoolStudent obj = new SchoolStudent(); SchoolStudentEdit demo = new SchoolStudentEdit(); try { if (UID > 0) { demo = obj.EditSchoolStudentProfile(UID); if (demo.DivisionID > 0) { demo.Levels = obj.GetlevelListByDivID(demo.DivisionID); } if (demo.Level_ID > 0) { demo.ClassObj = obj.GetClassByLevelID(demo.Level_ID, demo.School_ID); } demo.GenderInfo = obj.GetAllGender(); demo.Divisions = obj.GetDivisionList(); } ResultInfo.Info = demo; if (ResultInfo.Info != null) { ResultInfo.Description = "Success| Get all School Student Details"; ResultInfo.Status = true; } } catch (Exception ex) { } return(Json(ResultInfo, JsonRequestBehavior.AllowGet)); }
public JsonResult SchlStdntCurriculum(long UID, long SchoolID) { ResultInfo <SchlStuCurriCulum> ResultInfo = new ResultInfo <SchlStuCurriCulum>() { Status = false, Description = "Failed|Login" }; SchoolStudent obj = new SchoolStudent(); SchlStuCurriCulum demo = new SchlStuCurriCulum(); try { if (UID > 0) { // demo = obj.GetSchoolCurriculum(UID, SchoolID); // if (demo.DivisionID > 0) //{ // demo.Levels = obj.GetlevelListByDivID(demo.DivisionID); //} demo.Divisions = obj.GetDivisionList(); //if (demo.Divisions.FirstOrDefault().ID > 0) //{ // demo.Levels = obj.GetlevelListByDivID(demo.Divisions.FirstOrDefault().ID); // if (demo.Levels.FirstOrDefault().ID > 0) // { // demo.SchoolSub = obj.SubjectByLevelID(demo.Levels.FirstOrDefault().ID, SchoolID); // if (demo.SchoolSub.FirstOrDefault().ID > 0) // demo = obj.GetSchoolCurriculum(demo.SchoolSub.FirstOrDefault().ID, SchoolID); // } //} } ResultInfo.Info = demo; } catch (Exception ex) { } return(Json(ResultInfo, JsonRequestBehavior.AllowGet)); }