public ActionResult Index()
        {
            ViewBag.Message = TempData["message"];
            int _organizationID = 0;

            if (HCRGCLIENT.ClientTypeID == 1)
            {
                _organizationID = 0;
            }
            else
            {
                _organizationID = HCRGCLIENT.OrganizationID;
            }
            PagedPreTest pagedPreTestModel = new PagedPreTest();

            pagedPreTestModel = Mapper.Map <PagedPreTest>(_examService.GetAllPagedPreTest("", GlobalConst.Records.Skip, GlobalConst.Records.Take, HCRGCLIENT.ClientID, _organizationID));
            pagedPreTestModel.PagedRecords = GlobalConst.Records.Take;
            foreach (var objResult in pagedPreTestModel.PreTests)
            {
                objResult.EncryptedPreTestID = EncryptString(objResult.PreTestID.ToString());
            }
            if (HCRGCLIENT.ClientTypeID == 1)
            {
                pagedPreTestModel.IsHCRGAdmin = true;
            }
            else
            {
                pagedPreTestModel.IsHCRGAdmin = false;
            }
            return(View(pagedPreTestModel));
        }
        public ActionResult GetAllPagedPreTest(int skip, string searchText)
        {
            PagedPreTest pagedPreTestModel = new PagedPreTest();

            pagedPreTestModel = Mapper.Map <PagedPreTest>(_examService.GetAllPagedPreTest(searchText == null ? "" : searchText, skip, GlobalConst.Records.Take, HCRGCLIENT.ClientID, HCRGCLIENT.OrganizationID));
            pagedPreTestModel.PagedRecords = GlobalConst.Records.Take;
            return(Json(pagedPreTestModel, GlobalConst.Message.text_html));
        }
        public ActionResult Index(string searchText)
        {
            int _organizationID = 0;

            if (HCRGCLIENT.ClientTypeID == 1)
            {
                _organizationID = 0;
            }
            else
            {
                _organizationID = HCRGCLIENT.OrganizationID;
            }
            PagedPreTest pagedPreTestModel = new PagedPreTest();

            pagedPreTestModel = Mapper.Map <PagedPreTest>(_examService.GetAllPagedPreTest(searchText, GlobalConst.Records.Skip, GlobalConst.Records.Take, HCRGCLIENT.ClientID, _organizationID));
            pagedPreTestModel.PagedRecords = GlobalConst.Records.Take;
            foreach (var objResult in pagedPreTestModel.PreTests)
            {
                objResult.EncryptedPreTestID = EncryptString(objResult.PreTestID.ToString());
            }
            return(Json(pagedPreTestModel));
        }