public MovementService(TrackerDbContext context) { _context = context; }
public void InitializeTests() { this.db = MockDbContext.GetContext(); this.mapper = MockAutoMapper.GetMapper(); }
public CreateLocationHandler(TrackerDbContext dbContext) { this.dbContext = dbContext; }
public Tbl_TheoDoiController() { _context = new TrackerDbContext(); }
public ActionResult List(string sortOrder, string searchString, bool?showArchive) { if (Session["User"] == null) { return(RedirectToAction("Login", "Account")); } var context = new TrackerDbContext(); var issues = context.Issues .Include(x => x.Status) .Include(x => x.Notifier) .Include(x => x.Agent) .ToList(); if (showArchive != true) { issues = issues.Where(x => x.ArchivedTimeStamp == null).ToList(); ViewBag.showArchive = false; } else { ViewBag.showArchive = true; } ViewBag.TitleSortParm = String.IsNullOrEmpty(sortOrder) ? "title_desc" : ""; ViewBag.AgentSortParm = sortOrder == "agent" ? "agent_desc" : "agent"; ViewBag.NotifierSortParm = sortOrder == "notifier" ? "notifier_desc" : "notifier"; ViewBag.StatusSortParm = sortOrder == "status" ? "status_desc" : "status"; if (!String.IsNullOrEmpty(searchString)) { issues = issues.Where(x => x.Title.ToLower().Contains(searchString.ToLower()) || x.Agent.FullName.ToLower().Contains(searchString.ToLower()) || x.Notifier.FullName.ToLower().Contains(searchString.ToLower()) || x.Status.Name.ToLower().Contains(searchString.ToLower()) ).ToList(); ViewBag.IssueSearchString = searchString; } switch (sortOrder) { case "agent": issues = issues.OrderBy(x => x.Agent.Lastname).ToList(); break; case "agent_desc": issues = issues.OrderByDescending(x => x.Agent.Lastname).ToList(); break; case "notifier": issues = issues.OrderBy(x => x.Notifier.Lastname).ToList(); break; case "notifier_desc": issues = issues.OrderByDescending(x => x.Notifier.Lastname).ToList(); break; case "status": issues = issues.OrderBy(x => x.Status.Name).ToList(); break; case "status_desc": issues = issues.OrderByDescending(x => x.Status.Name).ToList(); break; case "title_desc": issues = issues.OrderByDescending(x => x.Title).ToList(); break; default: issues = issues.OrderBy(x => x.Title).ToList(); break; } return(View(issues)); }
public LobList(TrackerDbContext db) { this.db = db; }
public ActionResult Details(int companyId, string sortOrder, string searchString, bool?showArchive) { if (Session["User"] == null) { return(RedirectToAction("Login", "Account")); } var context = new TrackerDbContext(); Company company = context.Companies .Where(x => x.Id == companyId) .Include(x => x.Employees) .FirstOrDefault(); company.Employees = company.Employees.ToList(); if (showArchive != true) { company.Employees = company.Employees.Where(x => x.ArchivedTimeStamp == null).ToList(); ViewBag.showArchive = false; } else { ViewBag.showArchive = true; } ViewBag.CompanyId = companyId; ViewBag.LastNameSortParm = String.IsNullOrEmpty(sortOrder) ? "lname_desc" : ""; ViewBag.FirstNameSortParm = sortOrder == "fname" ? "fname_desc" : "fname"; ViewBag.CompanySortParm = sortOrder == "company" ? "company_desc" : "company"; if (!String.IsNullOrEmpty(searchString)) { company.Employees = company.Employees.Where(x => x.FullName.ToLower().Contains(searchString.ToLower()) || x.Company.Name.ToLower().Contains(searchString.ToLower()) ).ToList(); ViewBag.UserSearchString = searchString; } switch (sortOrder) { case "fname": company.Employees = company.Employees.OrderBy(x => x.FirstName).ToList(); break; case "fname_desc": company.Employees = company.Employees.OrderByDescending(x => x.FirstName).ToList(); break; case "company": company.Employees = company.Employees.OrderBy(x => x.Company.Name).ToList(); break; case "company_desc": company.Employees = company.Employees.OrderByDescending(x => x.Company.Name).ToList(); break; case "lname_desc": company.Employees = company.Employees.OrderByDescending(x => x.Lastname).ToList(); break; default: company.Employees = company.Employees.OrderBy(x => x.Lastname).ToList(); break; } return(View(company)); }
public SettingsController(TrackerDbContext context, ChildrensService childrensService, UserManager <ApplicationUser> userManager) { _context = context; _childrensService = childrensService; this.userManager = userManager; }
public ExerciseTypesService(TrackerDbContext dbContext) { _dbContext = dbContext; }
public Activity(TrackerDbContext db) { this.db = db; }
public Status(TrackerDbContext db) { this.db = db; }
public DivisionList(TrackerDbContext db) { this.db = db; }
public Mining(TrackerDbContext db) { this.db = db; }