public ActionResult Links_Read([DataSourceRequest] DataSourceRequest request, string oid, int type) { IList <Links> _Phone = new List <Links>(); if (type == 1) { _Phone = _objPersonContactBAL.PersonLinks_GetbyPersonIdBAL(Convert.ToInt64(oid)); } else { _Phone = _objIOrganizationBAL.OrganizationLinks_GetbyOrganizationIdBAL(Convert.ToInt64(oid)); } return(Json(_Phone.ToDataSourceResult(request, ModelState))); }