Ejemplo 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);
        }
Ejemplo n.º 2
0
 //public bool KeepAlive
 //{
 //    get { return false; }
 //}
 protected override bool DataStoreContainsDuplicates(SaveModeArgs obj)
 {
     return(VmData.Contains(obj.GetRow <UserGroup>()));
 }
Ejemplo n.º 3
0
 //public bool KeepAlive
 //{
 //    get { return false; }
 //}
 protected override bool DataStoreContainsDuplicates(SaveModeArgs obj)
 {
     return(VmData.Contains(obj.GetRow <ShippingMethod>()));
 }
Ejemplo 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();
        }