public static List <Order> getListByUserID(int id) { OrderTableGateway DataGateway = new OrderTableGateway(); DataTable TableData = DataGateway.Find(id); List <Order> tmp = new List <Order>(); foreach (DataRow row in TableData.Rows) { tmp.Add(map(row)); } return(tmp); }
public static Order GetByCarID(int id) { try { OrderTableGateway DataGateway = new OrderTableGateway(); DataTable TableData = DataGateway.FindByCarID(id); DataRow row = TableData.Rows[0]; return(map(row)); } catch { return(null); } }