Exemple #1
0
 public EmployeeImpl()
 {
     empDAO = new EmployeeDAO();
     deptDAO = new CompDAO();
 }
Exemple #2
0
        private void InitDBValueItem()
        {
            Company comp = null;
            Employee emp = null;
            dbItems = new Hashtable();

            CompDAO compDAO = new CompDAO();
            try
            {
                comp = compDAO.getCompany();
                // add comp info to dbitems.
                dbItems.Add("InsureRate_Indowment", comp.IndowRate);
                dbItems.Add("InsureRate_Medical", comp.Medicalrate);
                dbItems.Add("InsureRate_UnEmp", comp.UnEmpRate);
                dbItems.Add("InsureRate_Injury", comp.EmpInjuryRate);
                dbItems.Add("HouseRate", comp.HouseRate);
            }
            catch (Exception)
            {
                comp = null;
            }

            EmployeeDAO empDAO = new EmployeeDAO();
            try
            {
                emp = empDAO.searchEmpByEmpId(empId);
                // add enployee info to dbitems.
                dbItems.Add("TaxStart", comp.TaxStart);
            }
            catch (Exception)
            {
                emp = null;
            }

            try
            {
                if (emp != null)
                {
                    List<FixedAmountItem> items = empDAO.getEmpFixedAmountItem(emp.EmpID, bonus);
                    if (items != null)
                    {
                        foreach (FixedAmountItem item in items)
                        {
                            dbItems[item.PayrollItemId] = item.ItemValue;
                        }
                    }
                }
            }
            catch (Exception)
            {
                //
            }
        }