Esempio n. 1
0
        public static ArrayList GetEmpMultiFilterParams(ref string sqlStr, Hashtable hashTable, DBUtil dbUtil)
        {
            ArrayList listParms = new ArrayList();
            UtilService utilService = new UtilService();

            if (hashTable.Contains("@EmpName"))
            {
                sqlStr = utilService.validSearchFilter(sqlStr, "@EmpName");
                listParms.Add(new SqlParameter("@EmpName", SqlDbType.NVarChar, 40));
            }

            if (hashTable.Contains("@IdCard"))
            {
                sqlStr = utilService.validSearchFilter(sqlStr, "@IdCard");
                listParms.Add(new SqlParameter("@IdCard", SqlDbType.VarChar, 20));
            }

            if (hashTable.Contains("@DeptID"))
            {
                sqlStr = utilService.validSearchFilter(sqlStr, "@DeptID");
                listParms.Add(new SqlParameter("@DeptID", SqlDbType.VarChar, 800));
            }

            if (hashTable.Contains("@EmpTypeID"))
            {
                sqlStr = utilService.validSearchFilter(sqlStr, "@EmpTypeID");
                listParms.Add(new SqlParameter("@EmpTypeID", SqlDbType.VarChar, 800));
            }

            if (hashTable.Contains("@StatusKBN"))
            {
                sqlStr = utilService.validSearchFilter(sqlStr, "@StatusKBN");
                listParms.Add(new SqlParameter("@StatusKBN", SqlDbType.VarChar, 800));
            }

            if (hashTable.Contains("@EntryTimeStart"))
            {
                sqlStr = utilService.validSearchFilter(sqlStr, "@EntryTimeStart");
                listParms.Add(new SqlParameter("@EntryTimeStart", SqlDbType.DateTime));
            }
            if (hashTable.Contains("@EntryTimeEnd"))
            {
                sqlStr = utilService.validSearchFilter(sqlStr, "@EntryTimeEnd");
                listParms.Add(new SqlParameter("@EntryTimeEnd", SqlDbType.DateTime));
            }
            if (hashTable.Contains("@LeaveTimeStart"))
            {
                sqlStr = utilService.validSearchFilter(sqlStr, "@LeaveTimeStart");
                listParms.Add(new SqlParameter("@LeaveTimeStart", SqlDbType.DateTime));
            }
            if (hashTable.Contains("@LeaveTimeEnd"))
            {
                sqlStr = utilService.validSearchFilter(sqlStr, "@LeaveTimeEnd");
                listParms.Add(new SqlParameter("@LeaveTimeEnd", SqlDbType.DateTime));
            }

            return listParms;
        }
Esempio n. 2
0
 public PayrollDAO()
 {
     dbUtil = new DBUtil();
 }
Esempio n. 3
0
 public CusDAO()
 {
     dbUtil = new DBUtil();
 }
Esempio n. 4
0
 public ComdDAO()
 {
     dbUtil = new DBUtil();
 }
Esempio n. 5
0
 public EmployeeDAO()
 {
     dbUtil = new DBUtil();
 }