Exemplo n.º 1
0
        public DataTable QuerySwitch(QueryType QT,
                                     ArrayList ParameterList,
                                     bool likeSearch,
                                     int RowCountLimit
                                     )
        {
            DBO.TRN_Pick_MainDBO dbo = new TRN_Pick_MainDBO(ref USEDB);
            DataTable Dt;

            try
            {
                switch (QT)
                {
                    case QueryType.ALL:
                        Dt = dbo.doQueryAll();
                        break;
                    case QueryType.CODE:
                        Dt = dbo.doQueryByCode(ParameterList);
                        break;
                    case QueryType.ID:
                        Dt = dbo.doQueryByID(ParameterList);
                        break;
                    case QueryType.Custom:
                        Dt = dbo.doQueryByFind(ParameterList,likeSearch, RowCountLimit);
                        break;
                    default:
                        Dt = new DataTable();
                        break;
                }

                return Dt;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        public DataTable QueryByFind(ArrayList ParameterList, bool likeSearch, int RowCountLimit)
        {
            try
            {

                DBO.TRN_Pick_MainDBO dbo = new TRN_Pick_MainDBO(ref USEDB);
                return dbo.doQueryByFind(ParameterList, likeSearch, RowCountLimit);

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }