public DataTable QueryGiftByALL() { try { DBO.MKT_SaleDBO dbo = new MKT_SaleDBO(ref USEDB); return dbo.doQueryAll(); } catch (Exception ex) { throw ex; } }
public DataTable QuerySwitch(QueryType QT, ArrayList ParameterList ) { DBO.MKT_SaleDBO dbo = new MKT_SaleDBO(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); break; case QueryType.QueryByPMA: Dt = dbo.doQueryPMAByFind(ParameterList); break; case QueryType.QueryByCATEGORY: Dt = dbo.doQueryCategoryByFind(ParameterList); break; case QueryType.QueryBySORT: Dt = dbo.doQuerySortOutByFind(ParameterList); break; case QueryType.QueryByITEM: Dt = dbo.doQueryItemByFind(ParameterList); break; default: Dt = new DataTable(); break; } return Dt; } catch (Exception ex) { throw ex; } }