Exemplo n.º 1
0
        private void EmployeeMoneyForm_Load(object sender, EventArgs e)
        {
            employeeMoneyList = new EmployeeMoneyCollection(bdsMoney);
            bdsMoney.ResetBindings(true);

            ProcessPeriodMoneyEventArgs eventArgs = new ProcessPeriodMoneyEventArgs();
            EventUtility.fireEvent(LoadProcessPeriodMoneyEvent,this,eventArgs);

            IList list = eventArgs.PeriodMoneyList;
            if(list!=null && list.Count > 0)
            {
                foreach (EmployeeMoney employeeMoney in list)
                {
                    employeeMoneyList.Add(employeeMoney);
                }
            }
            bdsMoney.ResetBindings(false);
            dgvMoney.Refresh();
            dgvMoney.Invalidate();
        }
Exemplo n.º 2
0
        private void ClosedPeriodForm_Load(object sender, EventArgs e)
        {
            employeeMoneyList = new EmployeeMoneyCollection(bdsMoney);
            bdsMoney.ResetBindings(true);

            ClosedPeriodEventArgs eventArgs = new ClosedPeriodEventArgs();
            eventArgs.FromDate = DateTime.Now;
            eventArgs.ToDate = DateTime.Now;
            EventUtility.fireEvent(LoadClosedPeriodEvent,this,eventArgs);
            if(eventArgs.EmployeeMoneyList !=null && eventArgs.EmployeeMoneyList.Count > 0)
            {
                foreach (EmployeeMoney employeeMoney in eventArgs.EmployeeMoneyList)
                {
                    employeeMoneyList.Add(employeeMoney);
                }
                bdsMoney.ResetBindings(false);
                dgvMoney.Refresh();
                dgvMoney.Invalidate();
            }
        }