Exemplo n.º 1
0
 public EmployeeTableService(IEmployeeService employeeService, IProjectService projectService,
     IEmployeeDAO employeeDAO, IProjectDAO projectDAO)
 {
     this.employeeService = employeeService;
     this.projectService = projectService;
     this.employeeDataAccessObject = employeeDAO;
     this.projectDataAccessObject = projectDAO;
 }
Exemplo n.º 2
0
 public EmployeeTableService(IEmployeeService employeeService, IProjectService projectService,
                             IEmployeeDAO employeeDAO, IProjectDAO projectDAO)
 {
     this.employeeService          = employeeService;
     this.projectService           = projectService;
     this.employeeDataAccessObject = employeeDAO;
     this.projectDataAccessObject  = projectDAO;
 }
 public ExtendedProjectService(IProjectService projectService, IEmployeeService employeeService, 
                               IEmployeeDAO employeeDataAccessObject, IProjectDAO projectDataAccessObject)
 {
     this.projectService = projectService;
     this.employeeService = employeeService;
     this.employeeDataAccessObject = employeeDataAccessObject;
     this.projectDataAccessObject = projectDataAccessObject;
 }
Exemplo n.º 4
0
 public ExtendedProjectService(IProjectService projectService, IEmployeeService employeeService,
                               IEmployeeDAO employeeDataAccessObject, IProjectDAO projectDataAccessObject)
 {
     this.projectService           = projectService;
     this.employeeService          = employeeService;
     this.employeeDataAccessObject = employeeDataAccessObject;
     this.projectDataAccessObject  = projectDataAccessObject;
 }
Exemplo n.º 5
0
 public MedicationPackageBLL(string username)
 {
     this.username         = username;
     MedicationPackageDAO  = DAOFactory.GetMedicationPackageDAO();
     MedicationTypeDAO     = DAOFactory.GetMedicationTypeDAO();
     DistributionCentreDAO = DAOFactory.GetDistributionCentreDAO();
     EmployeeDAO           = DAOFactory.GetEmployeeDAO();
 }
Exemplo n.º 6
0
 protected override ValidationResult IsValid(object value, ValidationContext validationContext)
 {
     employeeDataAccessObject = Container.Resolve <IEmployeeDAO>();
     if (!employeeDataAccessObject.Exists((validationContext.ObjectInstance as EmployeeViewModel).AsEmployeeModel()))
     {
         return(ValidationResult.Success);
     }
     return(new ValidationResult("Oops, something went wrong, seems this employee has already been added"));
 }
 protected override  ValidationResult IsValid(object value,  ValidationContext validationContext)
 {
     employeeDataAccessObject = Container.Resolve<IEmployeeDAO>();
     if (!employeeDataAccessObject.Exists((validationContext.ObjectInstance as EmployeeViewModel).AsEmployeeModel()))
     {
         return ValidationResult.Success;
     }
     return new ValidationResult("Oops, something went wrong, seems this employee has already been added");
 }
Exemplo n.º 8
0
 public MainMenu()
 {
     clientDAO       = new ClientDAO();
     carInventoryDAO = new CarInventoryDAO();
     colorDAO        = new ColorDAO();
     operationsDAO   = new OperationsDAO();
     brandDAO        = new BrandDAO();
     modelDAO        = new ModelDAO();
     engineDAO       = new EngineDAO();
     employeeDAO     = new EmployeeDAO();
     dealDAO         = new DealDAO();
 }
Exemplo n.º 9
0
        static void Main(string[] args)
        {
            // Get the connection string from the appsettings.json file
            IConfigurationBuilder builder = new ConfigurationBuilder()
                                            .SetBasePath(Directory.GetCurrentDirectory())
                                            .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);

            IConfigurationRoot configuration = builder.Build();

            string connectionString = configuration.GetConnectionString("Project");

            IProjectDAO    projectDAO    = null;
            IEmployeeDAO   employeeDAO   = null;
            IDepartmentDAO departmentDAO = null;

            ProjectCLI projectCLI = new ProjectCLI(employeeDAO, projectDAO, departmentDAO);

            projectCLI.RunCLI();
        }
Exemplo n.º 10
0
        public ProjectCLI(IEmployeeDAO employeeDAO, IProjectDAO projectDAO, IDepartmentDAO departmentDAO)
        {
            this.employeeDAO   = employeeDAO;
            this.projectDAO    = projectDAO;
            this.departmentDAO = departmentDAO;
            AddOption("Show all departments", GetAllDepartments)
            .AddOption("Show all employees", GetAllEmployees)
            .AddOption("Employee search by first and last name", EmployeeSearch)
            .AddOption("Get employees without projects", GetEmployeesWithoutProjects)
            .AddOption("Get all projects", GetAllProjects)
            .AddOption("Create Department", CreateDepartment)
            .AddOption("Update Department Name", UpdateDepartment)
            .AddOption("Create Project", CreateProject)
            .AddOption("Assign Employee to Project", AssignEmployeeToProject)
            .AddOption("Remove Employee from Project", RemoveEmployeeFromProject)
            .AddOption("Quit", Close, "Q");

            Configure(cfg =>
            {
                cfg.MenuSelectionMode = MenuSelectionMode.KeyString;
            });
            Console.WriteLine();
        }
Exemplo n.º 11
0
 public EmployeeBLL()
 {
     EmployeeDAO = DAOFactory.GetEmployeeDAO();
 }
Exemplo n.º 12
0
 public AutocompleteEmployeeService(IEmployeeDAO employeeDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
 }
Exemplo n.º 13
0
 public EmployeeManager(IEmployeeDAO employeeDAO)
 {
     _employeeDAO = employeeDAO;
 }
Exemplo n.º 14
0
 public EmployeeBusiness(IEmployeeDAO employeeDAO)
 {
     this.employeeDAO = employeeDAO;
 }
Exemplo n.º 15
0
 public BroadcastService(IEmployeeDAO employeeDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
 }
Exemplo n.º 16
0
 public ProjectService(IProjectDAO projectDataAccessObject, IEmployeeDAO employeeDataAccessObject)
 {
     this.projectDataAccessObject = projectDataAccessObject;
     this.employeeDataAccessObject = employeeDataAccessObject;
 }
 public EmployeeController(ILogger <EmployeeController> logger, IEmployeeDAO employeeDAO)
 {
     _logger      = logger;
     _employeeDAO = employeeDAO;
 }
Exemplo n.º 18
0
 public EmployeesBL()
 {
     // employeesDAO = new EmployeeDAO();
     employeesDAO = new EmployeeDAOdb();
 }
Exemplo n.º 19
0
 public ProjectCLI(IEmployeeDAO employeeDAO, IProjectDAO projectDAO, IDepartmentDAO departmentDAO)
 {
     this.employeeDAO   = employeeDAO;
     this.projectDAO    = projectDAO;
     this.departmentDAO = departmentDAO;
 }
Exemplo n.º 20
0
 public EmployeeService(IEmployeeDAO employeeDataAccessObject, IProjectDAO projectDataAccessObject, IManagingTableService managingTableService)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
     this.projectDataAccessObject  = projectDataAccessObject;
     this.managingTableService     = managingTableService;
 }
Exemplo n.º 21
0
 public EmployeeService(IEmployeeDAO employeeDataAccessObject, IProjectDAO projectDataAccessObject, IManagingTableService managingTableService)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
     this.projectDataAccessObject = projectDataAccessObject;
     this.managingTableService = managingTableService;
 }
Exemplo n.º 22
0
 public AutocompleteEmployeeService(IEmployeeDAO employeeDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
 }
Exemplo n.º 23
0
 public EmployeeService(IEmployeeDAO employeeDataAccessObject, IProjectDAO projectDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
     this.projectDataAccessObject  = projectDataAccessObject;
 }
Exemplo n.º 24
0
 public void Setup()
 {
     dao = new EmployeeEntityFrameworkDAO();
 }
Exemplo n.º 25
0
 public BroadcastService(IEmployeeDAO employeeDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
 }