public AcceptanceWorkingViewModel(AcceptanceViewModel acceptanceViewModel) { _acceptanceViewModel = acceptanceViewModel; //var workings = RefreshWorking(); RefreshData(); //Source = new ObservableCollection<AcceptanceWorkingInfo>(workings); }
private static Place GetAcceptancePlace(AcceptanceViewModel viewModel) { //Получаем место прямо из EntityReference, чтобы лишний раз не лезть в базу if (viewModel.AcceptancePlace == null) { return(null); } using (var mgr = IoC.Instance.Resolve <IBaseManager <Place> >()) return(mgr.Get(viewModel.AcceptancePlace.Id, GetModeEnum.Partial)); //var nameField = viewModel.AcceptancePlace.Values.FirstOrDefault(i => i.Name == "PlaceName"); //return new Place { PlaceCode = viewModel.AcceptancePlace.Id.ToString(), PlaceName = nameField == null ? null : (string)nameField.Value}; }