Example #1
0
 public MyActivityController()
 {
     _Context = new SREDContext();
     _projectEntryRepository = new ProjectEntryRepository(_Context);
     _projectEntryHandler    = new ProjectEntryHandler(_Context, _projectEntryRepository);
     _projectEntryTableModel = new ProjectEntryTable();
     _hours = new Hours();
 }
Example #2
0
 public ProjectsController()
 {
     _Context                = new SREDContext();
     _EmployeeRepository     = new EmployeeRepository(_Context);
     _ProjectRepository      = new ProjectRepository(_Context);
     _SREDCategoryRepository = new SREDCategoryRepository(_Context);
     _EmployeeHandler        = new EmployeeHandler(_Context, _EmployeeRepository);
 }
Example #3
0
 public StaffController()
 {
     _Context             = new SREDContext();
     _EmployeeRepository  = new EmployeeRepository(_Context);
     _EmployeeHandler     = new EmployeeHandler(_Context, _EmployeeRepository);
     _projectEntryHandler = new ProjectEntryHandler(_Context, _projectEntryRepository);
     _staffView           = new StaffView();
     _fakeEmployee        = new FakeEmployee();
 }
Example #4
0
        public SelectList GetCategoryNameList(ISREDContext context)
        {
            var categoryNames = context.SREDCategories.Select(category =>
                                                              new SelectListItem
            {
                Text  = category.CategoryName,
                Value = category.SREDCategoryID.ToString()
            }).
                                ToList();

            categoryNames = categoryNames.OrderBy(category => category.Text).ToList();

            return(new SelectList(categoryNames, "Value", "Text"));
        }
Example #5
0
        public SelectList GetProjectNameList(ISREDContext context)
        {
            var projectNames = context.Projects.Select(project =>
                                                       new SelectListItem
            {
                Text  = project.ProjectName,
                Value = project.ProjectID.ToString()
            }).
                               ToList();

            projectNames = projectNames.OrderBy(project => project.Text).ToList();

            return(new SelectList(projectNames, "Value", "Text"));
        }
 public UserController()
 {
     _sredContext        = new SREDContext();
     _employeeRepository = new EmployeeRepository(_sredContext);
     _employeeHandler    = new EmployeeHandler(_sredContext, _employeeRepository);
 }
 public SREDCategoryRepository(ISREDContext context)
 {
     _context = context;
 }
 public ProjectRepository(ISREDContext context)
 {
     _context = context;
 }
Example #9
0
 public ProjectEntryHandler(ISREDContext context, IProjectEntryRepository projectEntryRepository)
 {
     _context = context;
     _projectEntryRepository = projectEntryRepository;
 }
Example #10
0
 public EmployeeController()
 {
     _Context            = new SREDContext();
     _EmployeeRepository = new EmployeeRepository(_Context);
 }
 public UserProfileController()
 {
     _Context            = new SREDContext();
     _EmployeeRepository = new EmployeeRepository(_Context);
     _EmployeeHandler    = new EmployeeHandler(_Context, _EmployeeRepository);
 }
 public SREDCategoryController()
 {
     _Context = new SREDContext();
     _SREDCategoryRepository = new SREDCategoryRepository(_Context);
 }
Example #13
0
 public EmployeeHandler(ISREDContext context, IEmployeeRepository employeeRepository)
 {
     _Context            = context;
     _EmployeeRepository = employeeRepository;
 }
 public scmController()
 {
     _context = new SREDContext();
     _projectEntryRepository = new ProjectEntryRepository(_context);
     _projectEntryHandler    = new ProjectEntryHandler(_context, _projectEntryRepository);
 }
Example #15
0
 public EmployeeRepository(ISREDContext context)
 {
     _Context = context;
 }