public new IEnumerable ViewLocation(PXAdapter adapter) { if (this.Locations.Current != null && this.BAccountAccessor.Cache.GetStatus(this.BAccountAccessor.Current) != PXEntryStatus.Inserted) { LocationExtAddress current = this.Locations.Current; CompanyLocationMaint graph = PXGraph.CreateInstance <CompanyLocationMaint>(); graph.Location.Current = graph.Location.Search <Location.locationID>(current.LocationID, this.BAccountAccessor.Current.AcctCD); throw new PXRedirectRequiredException(graph, CR.Messages.LocationMaint); } return(adapter.Get()); }
public new IEnumerable NewLocation(PXAdapter adapter) { if (this.BAccountAccessor.Cache.GetStatus(this.BAccountAccessor.Current) != PXEntryStatus.Inserted) { CompanyLocationMaint graph = PXGraph.CreateInstance <CompanyLocationMaint>(); SelectedLocation loc = new SelectedLocation(); loc.BAccountID = this.BAccountAccessor.Current.BAccountID; loc = (SelectedLocation)graph.Location.Insert(loc); throw new PXRedirectRequiredException(graph, Messages.CompanyLocationMaint); } return(adapter.Get()); }