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

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

                return Dt;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
 public DataTable QueryProgramByCode(ArrayList ParameterList)
 {
     try
     {
         DBO.SYS_ProgramDBO Program = new SYS_ProgramDBO(ref USEDB);
         return Program.doQueryByCode(ParameterList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }