void InitPage(CrudAPI crudapi) { BusyIndicator = busyIndicator; layoutControl = layoutItems; if (LoadedRow == null) { frmRibbon.DisableButtons(new string[] { "Delete" }); editrow = CreateNew() as InvWarehouseClient; } layoutItems.DataContext = editrow; frmRibbon.OnItemClicked += frmRibbon_OnItemClicked; }
async private void setLocation(InvWarehouseClient master) { if (api.CompanyEntity.Location) { if (master != null) { editrow.locationSource = master.Locations ?? await master.LoadLocations(api); } else { editrow.locationSource = api.GetCache(typeof(Uniconta.DataModel.InvLocation)); } cmbLocation.ItemsSource = editrow.LocationSource; } }