Exemplo n.º 1
0
        public DataTable QuerySwitch(QueryType QT,
                                     ArrayList ParameterList
                                     )
        {
            VDS_ALO_DIS_PATTERN_DBO ALOM = new VDS_ALO_DIS_PATTERN_DBO(ref USEDB);
            DataTable Dt;

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

                return Dt;
            }
            catch (Exception ex)
            {
                throw GetNewException(ex);
            }
        }
Exemplo n.º 2
0
 public DataTable QueryMasterByALL()
 {
     try
     {
         VDS_ALO_DIS_PATTERN_DBO ALOM = new VDS_ALO_DIS_PATTERN_DBO(ref USEDB);
         return ALOM.doQueryAll();
     }
     catch (Exception ex)
     {
         throw GetNewException(ex);
     }
 }