public ActionResult Index() { ChoiceFillingRepository _objRepository = new ChoiceFillingRepository(); DataSet _ds = _objRepository.SELECT_tbl_Student_Ch_Basic(Session["studentid"].ToString()); if (_ds != null) { if (_ds.Tables[0].Rows.Count > 0) { foreach (DataRow _dr in _ds.Tables[0].Rows) { Session["ApplicationNo"] = _dr["ApplicationNo"].ToString(); } } } return(View()); }
public JsonResult SelectBasic() { List <mStudent_Ch_Basic> _listSCHB = new List <mStudent_Ch_Basic>(); List <mStudent_Ch_Basic_EC> _listSCHBEC = new List <mStudent_Ch_Basic_EC>(); List <mStudent_Ch_Basic_AE> _listSCHBAE = new List <mStudent_Ch_Basic_AE>(); ChoiceFillingRepository _objRepository = new ChoiceFillingRepository(); try { DataSet _ds = _objRepository.SELECT_tbl_Student_Ch_Basic(Session["studentid"].ToString()); if (_ds != null) { if (_ds.Tables[0].Rows.Count > 0) { foreach (DataRow _dr in _ds.Tables[0].Rows) { Session["ApplicationNo"] = _dr["ApplicationNo"].ToString(); _listSCHB.Add(new mStudent_Ch_Basic { ID = _dr["ID"].ToString(), studentid = _dr["studentid"].ToString(), ApplicationNo = _dr["ApplicationNo"].ToString() }); } } if (_ds.Tables[1].Rows.Count > 0) { foreach (DataRow _dr in _ds.Tables[1].Rows) { _listSCHBEC.Add(new mStudent_Ch_Basic_EC { ID = _dr["ID"].ToString(), EQName = _dr["EQName"].ToString(), IsGiven = _dr["IsGiven"].ToString(), EQID = _dr["EQID"].ToString(), MainPart = _dr["MainPart"].ToString(), DeciamlPart = _dr["DeciamlPart"].ToString() }); } } if (_ds.Tables[2].Rows.Count > 0) { foreach (DataRow _dr in _ds.Tables[2].Rows) { _listSCHBAE.Add(new mStudent_Ch_Basic_AE { ID = _dr["ID"].ToString(), AEName = _dr["AEName"].ToString(), AEID = _dr["AEID"].ToString(), Score = _dr["Score"].ToString() }); } } } } catch (System.Exception) { throw; } return(Json(new { List = _listSCHB, ListEC = _listSCHBEC, ListAE = _listSCHBAE }, JsonRequestBehavior.AllowGet )); }