public EmployeeTableService(IEmployeeService employeeService, IProjectService projectService,
     IEmployeeDAO employeeDAO, IProjectDAO projectDAO)
 {
     this.employeeService = employeeService;
     this.projectService = projectService;
     this.employeeDataAccessObject = employeeDAO;
     this.projectDataAccessObject = projectDAO;
 }
Exemple #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;
 }
 public ExtendedProjectService(IProjectService projectService, IEmployeeService employeeService,
                               IEmployeeDAO employeeDataAccessObject, IProjectDAO projectDataAccessObject)
 {
     this.projectService           = projectService;
     this.employeeService          = employeeService;
     this.employeeDataAccessObject = employeeDataAccessObject;
     this.projectDataAccessObject  = projectDataAccessObject;
 }
Exemple #5
0
 public MedicationPackageBLL(string username)
 {
     this.username         = username;
     MedicationPackageDAO  = DAOFactory.GetMedicationPackageDAO();
     MedicationTypeDAO     = DAOFactory.GetMedicationTypeDAO();
     DistributionCentreDAO = DAOFactory.GetDistributionCentreDAO();
     EmployeeDAO           = DAOFactory.GetEmployeeDAO();
 }
 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");
 }
Exemple #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();
 }
Exemple #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();
        }
Exemple #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();
        }
Exemple #11
0
 public EmployeeBLL()
 {
     EmployeeDAO = DAOFactory.GetEmployeeDAO();
 }
 public AutocompleteEmployeeService(IEmployeeDAO employeeDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
 }
 public EmployeeManager(IEmployeeDAO employeeDAO)
 {
     _employeeDAO = employeeDAO;
 }
 public EmployeeBusiness(IEmployeeDAO employeeDAO)
 {
     this.employeeDAO = employeeDAO;
 }
Exemple #15
0
 public BroadcastService(IEmployeeDAO employeeDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
 }
Exemple #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;
 }
Exemple #18
0
 public EmployeesBL()
 {
     // employeesDAO = new EmployeeDAO();
     employeesDAO = new EmployeeDAOdb();
 }
Exemple #19
0
 public ProjectCLI(IEmployeeDAO employeeDAO, IProjectDAO projectDAO, IDepartmentDAO departmentDAO)
 {
     this.employeeDAO   = employeeDAO;
     this.projectDAO    = projectDAO;
     this.departmentDAO = departmentDAO;
 }
Exemple #20
0
 public EmployeeService(IEmployeeDAO employeeDataAccessObject, IProjectDAO projectDataAccessObject, IManagingTableService managingTableService)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
     this.projectDataAccessObject  = projectDataAccessObject;
     this.managingTableService     = managingTableService;
 }
Exemple #21
0
 public EmployeeService(IEmployeeDAO employeeDataAccessObject, IProjectDAO projectDataAccessObject, IManagingTableService managingTableService)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
     this.projectDataAccessObject = projectDataAccessObject;
     this.managingTableService = managingTableService;
 }
 public AutocompleteEmployeeService(IEmployeeDAO employeeDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
 }
Exemple #23
0
 public EmployeeService(IEmployeeDAO employeeDataAccessObject, IProjectDAO projectDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
     this.projectDataAccessObject  = projectDataAccessObject;
 }
Exemple #24
0
 public void Setup()
 {
     dao = new EmployeeEntityFrameworkDAO();
 }
Exemple #25
0
 public BroadcastService(IEmployeeDAO employeeDataAccessObject)
 {
     this.employeeDataAccessObject = employeeDataAccessObject;
 }