/// <summary> /// GetDestinationNotes /// Function of Get Destination Notes /// </summary> /// <param name="destID">Destination ID</param> /// <param name="session">Session object</param> /// <returns>List of Destination Notes</returns> public static List <DAL.SupplierRow> GetSuppliers(ISession session, String VersionNo = "") { try { SupplierTableAdapter ta = new SupplierTableAdapter(); ta.CurrentConnection = session; return(ta.GetData().Select().Cast <DAL.SupplierRow>().ToList()); } catch (Exception ex) { throw; } }
public SupplierDataTable getSuppliers() { SupplierDataTable data; using (SupplierTableAdapter supplierTableAdapter = new SupplierTableAdapter()) { try { data = supplierTableAdapter.GetData(); } catch (Exception exception) { throw new Exception(string.Concat("Could not get suppliers. ", exception.Message)); } } return(data); }