public ActionResult Index() { int _organizationID = 0; if (HCRGCLIENT.ClientTypeID == 1) { _organizationID = 0; } else { _organizationID = HCRGCLIENT.OrganizationID; } PagedPlanGrid objPagedplan = new PagedPlanGrid(); if (HCRGCLIENT.ClientTypeID == 1) { objPagedplan.IsHCRGAdmin = true; } else { objPagedplan.IsHCRGAdmin = false; } var objPlanList = _planService.GetAllPagedPlanByClientID(HCRGCLIENT.ClientID, _organizationID, GlobalConst.Records.Skip, GlobalConst.Records.Take); objPagedplan.PlanRecords = Mapper.Map <IEnumerable <PlanGrid> >(objPlanList.PlanRecords); foreach (var objorganizationResult in objPagedplan.PlanRecords) { objorganizationResult.EncryptedPlanID = EncryptString(objorganizationResult.PlanID.ToString()); } objPagedplan.TotalCount = objPlanList.TotalCount; return(View(objPagedplan)); }
public ActionResult GetAllPlanByClientID(int?skip, int?orgID) { if (HCRGCLIENT.ClientTypeID == 1) { if (orgID == null) { orgID = 0; } } else { orgID = HCRGCLIENT.OrganizationID; } PagedPlanGrid objPagedplan = new PagedPlanGrid(); var objPlanList = _planService.GetAllPagedPlanByClientID(HCRGCLIENT.ClientID, orgID.Value, skip.Value, GlobalConst.Records.Take); objPagedplan.PlanRecords = Mapper.Map <IEnumerable <PlanGrid> >(objPlanList.PlanRecords); foreach (var objorganizationResult in objPagedplan.PlanRecords) { objorganizationResult.EncryptedPlanID = EncryptString(objorganizationResult.PlanID.ToString()); } objPagedplan.TotalCount = objPlanList.TotalCount; return(Json(objPagedplan, GlobalConst.Message.text_html)); }
public ActionResult GetPlanAccordingToOrganization(int OrganizationID, int?skip) { PagedPlanGrid objPagedplan = new PagedPlanGrid(); var objPlanList = _planService.GetAllPagedPlanByClientID(HCRGCLIENT.ClientID, OrganizationID, skip.Value, GlobalConst.Records.Take); objPagedplan.PlanRecords = Mapper.Map <IEnumerable <PlanGrid> >(objPlanList.PlanRecords); foreach (var objorganizationResult in objPagedplan.PlanRecords) { objorganizationResult.EncryptedPlanID = EncryptString(objorganizationResult.PlanID.ToString()); } objPagedplan.TotalCount = objPlanList.TotalCount; return(Json(objPagedplan)); }