public ActionResult SelectQasForeignKeys() { SelectQasFKs setForeignKeys = new SelectQasFKs(); setForeignKeys.Advertises = advertiseService.GetAdvertises(); setForeignKeys.SubDomains = subDomainService.GetSubDomains(); return(View(setForeignKeys)); }
public ActionResult SelectAdvertisesForeignKeys() { SelectAdvertisesFKs setForeignKeys = new SelectAdvertisesFKs(); setForeignKeys.Users = userService.GetUsers().Where(e => e.Role.Name == "Company"); setForeignKeys.Domains = domainService.GetDomains(); setForeignKeys.SubDomains = subDomainService.GetSubDomains(); return(View(setForeignKeys)); }
public ActionResult SelectQuestionsFK() { SelectQuestionsFK model = new SelectQuestionsFK(); model.Tests = testService.GetTests(); model.Domains = domainService.GetDomains(); model.SubDomains = subDomainService.GetSubDomains(); return(View(model)); }
public ActionResult SelectQasForeignKeys() { SelectQasFKs setForeignKeys = new SelectQasFKs(); try { setForeignKeys.Domains = domainService.GetDomains(); setForeignKeys.SubDomains = subDomainService.GetSubDomains(); } catch (Exception e) { Log.Error(e.ToString()); } return(View(setForeignKeys)); }
public ActionResult SelectAdvertisesForeignKeys() { SelectAdvertisesFKs setForeignKeys = new SelectAdvertisesFKs(); try { setForeignKeys.Users = userService.GetUsers();//.Where(e=>e.Role.Name == "Company");//.Where(e => e.RoleId == 3); setForeignKeys.Domains = domainService.GetDomains(); setForeignKeys.SubDomains = subDomainService.GetSubDomains(); } catch (Exception e) { Log.Error(e.ToString()); } return(View(setForeignKeys)); }
public ActionResult SubDomains(string stringSearch, string sortOrder, string currentFilter, int page = 1) { Log.Debug("Started getting all the Subdomains"); var getSubDomains = subDomainService.GetSubDomains(); SearchingAndPagingViewModel <SubDomain> model = new SearchingAndPagingViewModel <SubDomain> { Collection = getSubDomains.OrderBy(p => p.Name).Skip((page - 1) * PageSize).Take(PageSize), PagingInfo = new PagingInfo { CurrentPage = page, ItemsPerPage = PageSize, TotalItems = stringSearch == null?getSubDomains.Count() : getSubDomains.Count(s => s.Name.Contains(stringSearch)) }, SortingOrder = IsNullOrEmpty(sortOrder) ? "name_desc" : "", SearchString = stringSearch }; switch (sortOrder) { case "name_desc": model.Collection = model.Collection.OrderByDescending(s => s.DomainId); break; default: // Name ascending model.Collection = model.Collection.OrderBy(s => s.DomainId); break; } if (!IsNullOrEmpty(stringSearch)) { model.Collection = getSubDomains.Where(s => s.Name.Contains(stringSearch)); } return(View(model)); }