Пример #1
0
        public DashboardForm(LoginForm login, User user)
        {
            this.login = login;
            this.user  = user;
            InitializeComponent();
            username.Text = user.username;
            PayrollControllerInterface payrollController = new PayrollController();
            List <Payroll>             payrolls          = payrollController.fetchUserPayrolls(user);

            loadPayrollList(payrolls);
        }
Пример #2
0
        private void loadPayrollList()
        {
            PayrollControllerInterface payrollController = new PayrollController();
            List <Payslip>             payroll           = payrollController.fetchUserPayrolls(user);

            userPayrollListBox.Items.Clear();
            foreach (Payslip payslip in payroll)
            {
                userPayrollListBox.Items.Add(payslip.id + ".)" + payslip.startDatePeriod.ToString("MM/dd/yyyy") + "-" + payslip.endDatePeriod.ToString("MM/dd/yyyy"));
            }
        }