public ActionResult Index()
        {
            SetRequestURL(APIURL.HOME_COLLECTIONS, Method.GET);
            var response = rest.Execute(request);

            if (response.StatusCode == HttpStatusCode.OK)
            {
                HomeCollectionViewModel model = JsonConvert.DeserializeObject<HomeCollectionViewModel>(response.Content);

                ViewData["SlideCount"] = model.slides.Count;
                ViewData["HomeSlides"] = model.slides;

                ViewBag.suffix_id = new SelectList(model.suffixes, "suffix", "suffix");
                ViewBag.workbase = new SelectList(model.workbases, "id", "description");
                ViewBag.specialization = new SelectList(model.specializations, "id", "description");
                ViewData["search"] = new SearchJobViewModel();
                ViewData["register"] = new PrimaryViewModel();

                return View(model.jobGroups);
            }
            else
            {
                SetTitle();
                return CustomMessage(response.Content);
            }
        }
        // GET: /Register/
        public ActionResult Index()
        {
            SetRequestURL(APIURL.SUFFIXES, Method.GET);
            var response = rest.Execute(request);

            if (response.StatusCode == HttpStatusCode.OK)
            {
                var model = new PrimaryViewModel();
                // CHECK IF REDIRECTED FROM INQUIRY
                if (Session["INQUIRY"] != null)
                {
                    Inquiry inquiry = (Inquiry)Session["Inquiry"];
                    model.first_name = inquiry.first_name;
                    model.last_name = inquiry.last_name;
                    model.email = inquiry.email;
                    Session["INQUIRY"] = null;
                }

                SelectCollectionsViewModel selModel = JsonConvert.DeserializeObject<SelectCollectionsViewModel>(response.Content);
                ViewBag.suffix_id = new SelectList(selModel.suffixes, "suffix", "suffix");
                return View("Index", model);
            }
            else
            {
                return CustomMessage(response.Content);
            }
        }
        public ActionResult Index(PrimaryViewModel model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    SetRequestURL(APIURL.APPLICANT_ADD_INITIAL_INFO, Method.POST);
                    request.AddBody(model);

                    var response = rest.Execute(request);
                    if (response.StatusCode == HttpStatusCode.OK)
                    {
                        Applicant app = JsonConvert.DeserializeObject<Applicant>(response.Content);
                        // SAVE INITIAL INFO AND LOGIN
                        Response.SetCookie(UserHelpers.SetUser(app));

                        var result = new
                        {
                            success = true,
                            message = new CustomException(Success.REGISTRATION, MESSAGE_TYPE.SUCCESS).RenderAlert(),
                            callbackURL = "User/Profile/Basic"
                        };

                        return Content(JsonConvert.SerializeObject(result));
                    }
                    else
                    {
                        CustomException ex = JsonConvert.DeserializeObject<CustomException>(response.Content);

                        var result = new
                        {
                            success = false,
                            message = new CustomException(ex.Message, MESSAGE_TYPE.ERROR).RenderAlert()
                        };

                        return Content(JsonConvert.SerializeObject(result));
                    }
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("", ex.Message);
            }

            string retVal = string.Empty;
            foreach (var key in ViewData.ModelState.Keys)
            {
                foreach (var err in ViewData.ModelState[key].Errors)
                {
                    retVal += "<div class='alert-item'>" + err.ErrorMessage + "</div>";
                }
            }

            var res = new
            {
                success = false,
                message = new CustomException(retVal, MESSAGE_TYPE.ERROR).RenderAlert()
            };

            return Content(JsonConvert.SerializeObject(res));
        }