示例#1
0
 public ReportGeneration(IReportFormatting reportFormatting, IEmployeeStorage employeeStorage,
                         IRendition rendition)
 {
     _reportFormatting = reportFormatting;
     _employeeStorage  = employeeStorage;
     _rendition        = rendition;
 }
示例#2
0
        public ClockInOutWindow(int id)
        {
            InitializeComponent();
            lblDepartment.Visible  = false;
            cmbxDepartment.Visible = false;
            dtpClockIn.Value       = DateTime.Now;
            dtpClockOut.Value      = DateTime.Now;
            this.userid            = id;
            employeeStorage        = new EmployeeMySQL();
            shiftStorage           = new ShiftMySQL();
            departmentStorage      = new DepartmentMySQL();
            ComboboxItem ci = null;

            foreach (Employee e in employeeStorage.GetAll(true))
            {
                ci       = new ComboboxItem();
                ci.Text  = e.Id.ToString() + " - " + e.FirstName + " " + e.SurName;
                ci.Value = e.Id;
                cmbxEmployee.Items.Add(ci);
                if (e.Id == id)
                {
                    cmbxEmployee.SelectedItem = ci;
                }
            }
        }
示例#3
0
 public MainController(
     IEmployeeStorage employeeStorage,
     IEmployeeManager employeeManager,
     IEmployeeSearcher searcher,
     ExporterFactory exporterFactory)
 {
     this.employeeStorage = employeeStorage;
     this.employeeManager = employeeManager;
     this.searcher        = searcher;
     this.exporterFactory = exporterFactory;
 }
        /// <summary>
        /// A form in which the user can schedule and unschedule employees for a certain shift.
        /// </summary>
        /// <param name="dateAndMonth"></param>
        /// <param name="weekDay"></param>
        /// <param name="shiftTime"></param>
        /// <param name="date"></param>
        /// <param name="working"></param>
        /// <param name="editing"></param>
        /// <param name="oldShiftId"></param>
        public SchedulingWindow(string dateAndMonth, string weekDay, ShiftTime shiftTime, DateTime date, List <Employee> working, bool editing, int oldShiftId, int capacity, List <Employee> allEmployees, Department previousSelectedDepartment, Employee loggedInUser)
        {
            InitializeComponent();
            InitializeComboBoxShiftTime();
            LoadEmployees(working, allEmployees);
            this.date      = date;
            this.shiftTime = shiftTime;
            this.comboBoxShiftTime.SelectedItem = shiftTime;
            textBoxWeekDay.Text      = weekDay;
            textBoxCalendarDate.Text = dateAndMonth;
            this.isEditing           = editing;
            this.oldId    = oldShiftId;
            this.capacity = capacity;
            this.previousSelectedDepartment = previousSelectedDepartment;
            this.loggedInUser = loggedInUser;
            employeeStorage   = new EmployeeMySQL();

            numericUpDownCapacity.Value = capacity;
            AddEmployeeListToShift(working);
            LoadDepartments();
            CheckPermissions();
        }
        private void Login()
        {
            loginStorage    = new LoginMySQL();
            employeeStorage = new EmployeeMySQL();
            functionStorage = new FunctionMySQL();

            //Asks the loginStorage to check if the entered details match those we have stored.
            userId = loginStorage.Check(textBoxLoginUsername.Text, textBoxLoginPassword.Text);

            if (userId > 0)
            {
                this.loggedInUser             = employeeStorage.Get(userId);
                this.loggedInUser.Permissions = functionStorage.GetPermissions(loggedInUser.Function);
                this.DialogResult             = DialogResult.OK;
            }
            else if (userId < 0)
            {
                MessageBox.Show("Invalid Credentials");
            }
            else
            {
                MessageBox.Show("Your account has been disabled");
            }
        }
示例#6
0
 public ValuesController()
 {
     _employeeStore = new EmployeeStorage();
 }
 public WindowReportCosmetics(ReportLogicEmployee logic, IEmployeeStorage employeeStorage)
 {
     InitializeComponent();
     this.logic       = logic;
     _employeeStorage = employeeStorage;
 }
 public IdentityManager(IEmployeeStorage storage)
 {
     _storage = storage;
 }
示例#9
0
 public EmployeeService(IEmployeeStorage employeeStorage)
 {
     this.employeeStorage = employeeStorage;
 }
 public CacheEmployeeStorage(ICacheManager manager)
 {
     _innerStorage = new EmployeeStorage();
     _cacheManager = manager;
 }
示例#11
0
 public AddNewEmployee(IEmployeeStorage storage)
 {
     _storage = storage;
 }
示例#12
0
 public EmployeeLogic(IEmployeeStorage employeeStorage)
 {
     _employeeStorage = employeeStorage;
 }
        public EmployeeController(IEmployeeStorage storage)
        {
            this._storage = storage;

            //_db = new EmployeeContext();
        }
 public EmployeeController(IEmployeeStorage employeeStorage)
 {
     _employeeStorage = employeeStorage ?? new EmployeeStorage();
 }
 public EmployeeManager(IEmployeeStorage storage, IRemarkStorage remarkStorage, ICacheManager cManager)
 {
     _storage       = storage;
     _remarkStorage = remarkStorage;
     _cManager      = cManager;
 }
示例#16
0
 public EmployeeLogic(IEmployeeStorage EmployeeStorage)
 {
     this.EmployeeStorage = EmployeeStorage;
 }
示例#17
0
 public ReportLogicEmployee(IReceiptStorage receiptStorage, IDistributionStorage distributionStorage, IEmployeeStorage employeeStorage)
 {
     _receiptStorage      = receiptStorage;
     _distributionStorage = distributionStorage;
     _employeeStorage     = employeeStorage;
 }
 public EmployeeController(IEmployeeStorage storage)
 {
     _storage = storage ?? new EmployeeStorage();
 }
 public RequestMySQL()
 {
     connectionString = ConnectionString.Read();
     connection       = new MySqlConnection(connectionString);
     employeeStorage  = new EmployeeMySQL();
 }
示例#20
0
 public EmployeeLogic(IEmployeeStorage employeeStorage)
 {
     this.employeeStorage = employeeStorage;
 }
示例#21
0
 public EmployeeController(IEmployeeStorage employeeRepository)
 {
     this.employeeRepository = employeeRepository;
 }
 public EmployeeManager(IEmployeeStorage storage, IRemarkStorage remarkStorage)
 {
     _storage       = storage;
     _remarkStorage = remarkStorage;
 }
示例#23
0
 public IdentityManager(IEmployeeStorage storage)
 {
     _storage = storage;
 }
 public EmployeeManager(IEmployeeStorage storage, IRemarkStorage remarkStorage)
 {
     _storage = storage;
     _remarkStorage = remarkStorage;
 }
 public EmployeeControllerWithDependencyInjection(IEmployeeStorage empStore = null)
 {
     _empStore = empStore ?? new EmployeeStorage();
 }
示例#26
0
 public EmployeeController(IEmployeeStorage storage)
 {
     _storage = storage;
 }
 public EmployeeController(IEmployeeStorage employeeStorage = null)
 {
     _employeeStorage = (employeeStorage ?? new EmployeeStorage());
 }
示例#28
0
 public EmployeeController(IEmployeeStorage employeeStorage)
 {
     //_db = new EmployeeContext();
     this._employeeStorage = employeeStorage;
 }
        //private EmployeeContext _db;

        public EmployeeController(IEmployeeStorage employeeStorage = null)
        {
            _employeeStorage = employeeStorage ?? new EmployeeStorage();
            //_db = new EmployeeContext();
        }
示例#30
0
 public EmployeeController()
 {
     _employeeStore = new EmployeeStorage();
 }
 public EmployeeController(IEmployeeStorage employeeStorage)
 {
     _employeeStorage = employeeStorage;
 }
示例#32
0
 public ShowEmployee(IEmployeeStorage storage)
 {
     _storage = storage;
 }
示例#33
0
 public EmployeeManager(IEmployeeStorage storage)
 {
     _storage = storage;
 }
示例#34
0
 public EmployeeController(IEmployeeStorage employeeRepository)
 {
     _employeeStorage = employeeRepository ?? new EmployeeStorage();
 }