public PayrollEmployee()
 {
     InitializeComponent();
     _payrollBusiness  = new business.PayrollEmployee();
     _employeeBusiness = new business.Employee();
     _payroll          = new model.PayrollEmployee();
     _value            = 0.0;
 }
        public void LoadPayroll(string id)
        {
            _payroll = _payrollBusiness.Get(id);

            Employees.SelectedValue = _payroll.Employee.Id;

            FromPayment.SelectedDate = _payroll.From;
            ToPayment.SelectedDate   = _payroll.To;
            TotalHours.Text          = _payroll.TotalHours.ToString();
            Payment.Text             = _payroll.PaymentTotalHours.ToString("C");
            Deductions.Text          = _payroll.Deductions.ToString("C");
            DeductionsText.Text      = _payroll.DeductionsDetail;
            Reimbursements.Text      = _payroll.Reimbursements.ToString("C");
            ReimbursementsText.Text  = _payroll.ReimbursmentsDetail;
            TotalPayment.Text        = _payroll.TotalPayment.ToString("C");
        }
        private void Clear()
        {
            _payroll = new model.PayrollEmployee();

            Employees.SelectedItem = null;
            Rate.Text                = 0.ToString("C");
            WeeklyPayment.Text       = 0.ToString("C");
            FromPayment.SelectedDate = null;
            ToPayment.SelectedDate   = null;
            TotalHours.Text          = "0";
            Payment.Text             = 0.ToString("C");
            Deductions.Text          = 0.ToString("C");
            DeductionsText.Text      = string.Empty;
            Reimbursements.Text      = 0.ToString("C");
            ReimbursementsText.Text  = string.Empty;
            TotalPayment.Text        = 0.ToString("C");
            TotalHours.IsReadOnly    = false;
        }
 private void SendEmail(model.PayrollEmployee payroll)
 {
     PayrollMail.Send(new PrintPayrollEmployee(payroll), (IEmail <model.PayrollEmployee>)_payrollBusiness, payroll);
 }
        private static void PrintReport(model.PayrollEmployee payroll)
        {
            PrintPayrollEmployee print = new PrintPayrollEmployee(payroll);

            print.Print(true);
        }