Exemplo n.º 1
0
        private void DoSave(SaveModeArgs obj)
        {
            ViewService.ViewMode.Push(FormMode.SAVED);

            SaveOtherObjectsPriorToVmData(obj);

            SaveOtherObjectsPostVmData(obj);

            // viewService.HasPendingCommits = repository.HasPendingCommits();
            //container.RegisterInstance(SelectedItem, new ExternallyControlledLifetimeManager());
            //notify UI that new have a new row and to add it to our grid

            var msg = new VmOnSave(obj.FormState);

            msg.SetRow(obj.GetRow <T>());
            eventAggregator.GetEvent <VmOnSaveEvent>().Publish(msg);
        }
 //public bool KeepAlive
 //{
 //    get { return false; }
 //}
 protected override bool DataStoreContainsDuplicates(SaveModeArgs obj)
 {
     return(VmData.Contains(obj.GetRow <UserGroup>()));
 }
Exemplo n.º 3
0
 //public bool KeepAlive
 //{
 //    get { return false; }
 //}
 protected override bool DataStoreContainsDuplicates(SaveModeArgs obj)
 {
     return(VmData.Contains(obj.GetRow <ShippingMethod>()));
 }
Exemplo n.º 4
0
        //protected override void ValidateCollection(NotifyCollectionChangedEventArgs e)
        //{
        //    throw new NotImplementedException();
        //}

        protected override bool DataStoreContainsDuplicates(SaveModeArgs obj)
        {
            return VmData.Any(x => x.Login == obj.GetRow<UserBasicInfo>().Login);
            //return repository.DataStore == null ? false : repository.DataStore.Where(c => c.FullName == SelectedItem.FullName).Any();
        }