public void UpdateTripsList(string name) { TripsList.Children.Clear(); using (TripContext db = new TripContext()) { var Trips = db.Trips.Where(t => t.Name == name).OrderByDescending(t => t.Id); foreach (Trip t in Trips) { tripRow tr = new tripRow(t.Id, t.FromWhere, t.Destination, t.Name, t.Date, t.State); TripsList.Children.Add(tr); } } }
public tripRow AddtripRow(string tripNumber, int cartonCount, string carrier, string trailer, System.DateTime trailerArrival, System.DateTime firstScanTime, System.DateTime osdCreated) { tripRow rowtripRow = ((tripRow)(this.NewRow())); object[] columnValuesArray = new object[] { tripNumber, cartonCount, carrier, trailer, trailerArrival, firstScanTime, osdCreated }; rowtripRow.ItemArray = columnValuesArray; this.Rows.Add(rowtripRow); return(rowtripRow); }
public tripRowChangeEvent(tripRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void RemovetripRow(tripRow row) { this.Rows.Remove(row); }
public void AddtripRow(tripRow row) { this.Rows.Add(row); }