public DataTable QuerySwitch(QueryType QT, ArrayList ParameterList ) { DBO.VDM_MontherVendorDBO dbo = new VDM_MontherVendorDBO(ref USEDB); DataTable Dt; try { switch (QT) { case QueryType.ALL: Dt = dbo.doQueryAll(); break; case QueryType.CODE: Dt = new DataTable(); break; case QueryType.ID: Dt = dbo.doQueryByID(ParameterList); break; case QueryType.Custom: Dt = dbo.doQueryByFind(ParameterList); break; default: Dt = new DataTable(); break; } return Dt; } catch (Exception ex) { throw ex; } }
//public DataTable QueryMontherVendorByCode(ArrayList ParameterList) //{ // try // { // DBO.VDM_MontherVendorDBO dbo = new VDM_MontherVendorDBO(ref USEDB); // return dbo.doQueryByCode(ParameterList); // } // catch (Exception ex) // { // throw ex; // } //} public DataTable QueryMontherVendorByID(ArrayList ParameterList) { try { DBO.VDM_MontherVendorDBO dbo = new VDM_MontherVendorDBO(ref USEDB); return dbo.doQueryByID(ParameterList); } catch (Exception ex) { throw ex; } }