private void InitPayrollItem() { // init payrollItem. payrollItems = new Hashtable(); PayrollDAO payrollDAO = new PayrollDAO(); DataSet resultSet = null; try { List<PayrollItem> prItems = payrollDAO.searchPayrollItemAll(); foreach (PayrollItem item in prItems) { PayrollItemFormEntity feitem = new PayrollItemFormEntity(); feitem.PayrollItem = item; payrollItems.Add(feitem.PayrollItem.ItemId, feitem); } } catch (DAOException) { ; } List<string> idList; foreach (PayrollItemFormEntity item in payrollItems.Values) { try { // empTypes. idList = payrollDAO.searchEmpTypeIdIdByPayrollItemId(item.PayrollItem.ItemId); item.EmpTypeId = idList.ToArray(); // calcflags. idList = payrollDAO.searchCalcFlagIdByPayrollItemId(item.PayrollItem.ItemId); item.CalcFlagId = idList.ToArray(); } catch (DAOException) { ; } } }
public PayrollImpl() { payrollDAO = new PayrollDAO(); }