public JsonResult AllADataTableViewer(int id) { var obj = GetData(); var result2 = db.BI_Affi_pop_applications_id_wrt_inst_id(id); foreach (var v in result2) { ComMembers.Application_id = Convert.ToInt16(v.Value.ToString()); } //var result = db.BI_affi_pop_com_mem_result(ComMembers.Application_id, userId, AffiliationComMemberDetail.Year_id); var result = db.BI_affi_pop_com_mem_result(ComMembers.Application_id, Convert.ToInt32(obj.Institute_Id), 1); return(Json(result, JsonRequestBehavior.AllowGet)); }