public string CheckDuplicateIndustry(string IndustryName)
        {
            var list = _manageContentService.GetCategories().Where(x => x.IndustryName.ToLower() == IndustryName.ToLower()).ToList();

            if (list.Count > 0)
            {
                return("exists");
            }
            else
            {
                return("notexists");
            }
        }
Ejemplo n.º 2
0
        //
        // GET: /Admin/ManageUser/
        public ActionResult Index()
        {
            if (smartData.Common.SessionManager.LoggedInUser.UserType == 3)
            {
                List <smIndustry> newlist = _manageContentApi.GetCategories();
                ViewBag.IndustryName = new SelectList(newlist, "IndustryId", "IndustryName");
            }
            else
            {
                smIndustry newlist = _manageContentService.GetIndustryById(smartData.Common.SessionManager.LoggedInUser.IndustryId);
                ViewBag.IndustryId   = newlist.IndustryId.ToString();
                ViewBag.IndustryName = newlist.IndustryName.ToString();
            }

            return(View());
        }
Ejemplo n.º 3
0
        // GET: /Admin/ManageContent/
        // [AuditLog(Event = "Manage Content", Message = "Manage Content")]
        public ActionResult Index()
        {
            smContentLibrary content = new smContentLibrary();

            if (smartData.Common.SessionManager.LoggedInUser.UserType == 3)//superadmin
            {
                content.categoryList = new SelectList(_manageContentAPIController.GetCategories(), "IndustryId", "IndustryName");
            }
            else
            {
                smIndustry newlist = _manageContentService.GetIndustryById(smartData.Common.SessionManager.LoggedInUser.IndustryId);
                ViewBag.IndustryId   = newlist.IndustryId.ToString();
                ViewBag.IndustryName = newlist.IndustryName.ToString();
            }
            TempData["img"] = false;
            return(View(content));
        }