public JsonResult GetAllOrganization() { if (HCRGCLIENT == null) { return(Json("")); } if (HCRGCLIENT.ClientTypeID == 1) { return(Json(_clientService.getAllOrganization(), GlobalConst.Message.text_html)); } else { return(Json(_clientService.getOrganizationByOrganizationID(HCRGCLIENT.OrganizationID), GlobalConst.Message.text_html)); } }
public ActionResult Index() { OrganizationViewModel _organizationViewModel = new OrganizationViewModel(); if (HCRGCLIENT.ClientTypeID == 1) { _organizationViewModel.OrganizationResults = Mapper.Map <IEnumerable <Organization> >(_clientService.getAllOrganization()); } else if (HCRGCLIENT.ClientTypeID == 2) { _organizationViewModel.OrganizationResults = Mapper.Map <IEnumerable <Organization> >(_clientService.getOrganizationByOrganizationID(HCRGCLIENT.OrganizationID)); } else { return(RedirectToAction("Unauthorized", "Common")); } foreach (var objorganizationResult in _organizationViewModel.OrganizationResults) { objorganizationResult.EncryptedOrganizationID = EncryptString(objorganizationResult.OrganizationID.ToString()); } if (HCRGCLIENT.ClientTypeID == 1) { _organizationViewModel.IsHCRGAdmin = true; } else { _organizationViewModel.IsHCRGAdmin = false; } return(View(_organizationViewModel)); }