private async Task ExecuteRefreshPlace() { try { string placeid = SelectedPlace?.ID; var placeids = await _dbservicewms.GetPlaceIDs(-1, -1); DataListPlace.Clear(); foreach (var pl in placeids) { DataListPlace.Add(new PlaceIDViewModel { ID = pl.ID }); } foreach (var l in DataListPlace) { l.Initialize(_warehouse); } if (placeid != null) { SelectedPlace = DataListPlace.First(p => p.ID == placeid); } } catch (Exception e) { _warehouse.AddEvent(Database.Event.EnumSeverity.Error, Database.Event.EnumType.Exception, string.Format("{0}.{1}: {2}", this.GetType().Name, (new StackTrace()).GetFrame(0).GetMethod().Name, e.Message)); } }
protected void lwReviews_DataBinding(object sender, EventArgs e) { DataListPlace.DataBind(); }