public static PlanCertificate ClearValues([NotNull] this PlanCertificate obj) { var ob = obj.MapTo <PlanCertificateDto>(); ob.Rn = 0; ob.CertificateQuality = ob.CertificateQuality.ClearValues(); ob.PersonalAccounts = null; ob.State = PlanCertificateState.NotСonfirm; return(ob.MapTo <PlanCertificate>()); }
public void Test2() { var pc = new PlanCertificate(); var pro = new PlanReceiptOrder(); var pa = new PlanReceiptOrderPersonalAccount(); //var openStateMachine = new StateMachine<PlanCertificateState, ITrigger>( // () => pc.State, // state => pc.State = state); // openStateMachine.Configure(PlanCertificateState.Close) // .Permit( // pro.WhenAnyValue(x => x.State) // .Where(state => state == PlanReceiptOrderState.Close) // .Select(_ => Unit.Default), // PlanCertificateState.Close) // .Permit( // pro.WhenAnyValue(x => x.State) // .Where(state => state == PlanReceiptOrderState.Confirm) // .Select(_ => Unit.Default), // PlanCertificateState.Confirm); }
public void InsertTest() { var filterFactory = Bootstrapper.IoC.GetExportedValue <IFilterViewModelFactory>(); var routableViewModelManager = Bootstrapper.IoC.GetExportedValue <IRoutableViewModelManager>(); var viewModel = routableViewModelManager.Get <IEditablePlanCertificateViewModel>(); var planCertificate = new PlanCertificate { CertificateQuality = this.GetCertificateQuality(filterFactory), CountByDocument = 1, CreationDate = new DateTime(2013, 2, 2), Note = "sd", StateDate = new DateTime(2013, 2, 2), PlanReceiptOrder = GetPlanReceiptOrder(filterFactory), Price = 1, UserCreator = GetUser(filterFactory), CountFact = 3, State = PlanCertificateState.Close }; viewModel.SetEditableObject(planCertificate, EditState.Insert); ((EditableContext <PlanCertificate>)viewModel).Wait(); }
public PlanCertificateSetGroupState(PlanCertificate planCertificate, PersonalAccount personalAccount) { Rn = planCertificate.Rn; PersonalAccount = personalAccount.Numb; }
/// <summary> /// Initializes a new instance of the <see cref="PlanCertificateSetStateSP"/> class. /// </summary> /// <param name="certificate"> /// The certificate. /// </param> /// <param name="state"> /// The state. /// </param> public PlanCertificateSetStateSP(PlanCertificate certificate, PlanCertificateState state) { Rn = certificate.Rn; State = state; }
public СonfirmStateFalling(PlanCertificate entity, IRepositoryFactory repositoryFactory, IPlanCertificateState strategy = null) : base(entity, repositoryFactory) { _strategy = strategy; _repositoryFactory = repositoryFactory; }
protected СonfirmStateBase(PlanCertificate entity, IRepositoryFactory repositoryFactory) : base(entity, repositoryFactory) { }
public NotСonfirmState(PlanCertificate entity, IRepositoryFactory repositoryFactory) : base(entity, repositoryFactory) { }
public СloseStateEmerge(PlanCertificate entity, IRepositoryFactory repositoryFactory) : base(entity, repositoryFactory) { _repositoryFactory = repositoryFactory; }
public EntityBase(PlanCertificate entity, IRepositoryFactory repositoryFactory) { _repository = repositoryFactory.Create <PlanCertificate>(); Entity = entity; }
public СloseStateBase(PlanCertificate entity, IRepositoryFactory repositoryFactory) : base(entity, repositoryFactory) { }