public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertAtLeastOne(this, QuoteItems.Meta.Product, QuoteItems.Meta.ProductFeature, QuoteItems.Meta.Deliverable); derivation.Validation.AssertExistsAtMostOne(this, QuoteItems.Meta.Product, QuoteItems.Meta.ProductFeature, QuoteItems.Meta.Deliverable); }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertAtLeastOne(this, OrderShipments.Meta.SalesOrderItem, OrderShipments.Meta.PurchaseOrderItem); derivation.Validation.AssertExistsAtMostOne(this, OrderShipments.Meta.SalesOrderItem, OrderShipments.Meta.PurchaseOrderItem); }
public void TestOnDerive(ObjectOnDerive method) { if (0 == this.Amount) { this.CurrentObjectState = new OrderObjectStates(this.Strategy.Session).Cancelled; } }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertExists(this, WorkEffortTypes.Meta.Description); derivation.Validation.AssertExists(this, WorkEffortTypes.Meta.WorkEffortTypeKind); }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertAtLeastOne(this, Fees.Meta.Amount, Fees.Meta.Percentage); derivation.Validation.AssertExistsAtMostOne(this, Fees.Meta.Amount, Fees.Meta.Percentage); }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertAtLeastOne(this, PayHistories.Meta.Amount, PayHistories.Meta.SalaryStep); derivation.Validation.AssertExistsAtMostOne(this, PayHistories.Meta.Amount, PayHistories.Meta.SalaryStep); }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertAtLeastOne(this, NonSerializedInventoryItems.Meta.Good, NonSerializedInventoryItems.Meta.Part); derivation.Validation.AssertExistsAtMostOne(this, NonSerializedInventoryItems.Meta.Good, NonSerializedInventoryItems.Meta.Part); this.AppsOnDeriveQuantityOnHand(derivation); this.AppsOnDeriveQuantityCommittedOut(derivation); this.AppsOnDeriveQuantityExpectedIn(derivation); this.AppsOnDeriveQuantityAvailableToPromise(derivation); if (this.ExistPreviousQuantityOnHand && this.QuantityOnHand > this.PreviousQuantityOnHand) { this.AppsReplenishSalesOrders(derivation); } if (this.ExistPreviousQuantityOnHand && this.QuantityOnHand < this.PreviousQuantityOnHand) { this.AppsDepleteSalesOrders(derivation); } this.AppsOnDeriveCurrentObjectState(derivation); this.AppsOnDeriveSku(derivation); this.AppsOnDeriveName(derivation); this.AppsOnDeriveUnitOfMeasure(derivation); if (this.ExistGood) { this.Good.DeriveAvailableToPromise(); } this.PreviousQuantityOnHand = this.QuantityOnHand; }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertAtLeastOne(this, RequestItems.Meta.Product, RequestItems.Meta.ProductFeature, RequestItems.Meta.Description, RequestItems.Meta.NeededSkill, RequestItems.Meta.Deliverable); derivation.Validation.AssertExistsAtMostOne(this, RequestItems.Meta.Product, RequestItems.Meta.ProductFeature, RequestItems.Meta.Description, RequestItems.Meta.NeededSkill, RequestItems.Meta.Deliverable); }
public void AppsOnDerive(ObjectOnDerive method) { if (this.ExistIsoCode) { this.EuMemberState = Countries.euMemberStates.Contains(this.IsoCode); IbanData ibanData; if (Countries.IbanDataByCountry.TryGetValue(this.IsoCode, out ibanData)) { this.IbanLength = ibanData.Lenght; this.IbanRegex = ibanData.RegexStructure; } else { this.RemoveIbanLength(); this.RemoveIbanRegex(); } } else { this.RemoveEuMemberState(); this.RemoveIbanLength(); this.RemoveIbanRegex(); } }
public void AppsOnDerive(ObjectOnDerive method) { this.Description = string.Format( "{0} {1} {2}", this.ExistCountryCode ? this.CountryCode : null, this.ExistAreaCode ? this.AreaCode : null, this.ExistContactNumber ? this.ContactNumber : null); }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; this.AppsOnDeriveFromParties(); this.AppsOnDeriveToParties(); this.AppsOnDeriveInvolvedParties(derivation); }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; this.SalesRepName = this.SalesRep.PartyName; this.AppsOnDeriveRevenue(); }
public void TestOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; this.Second = new SecondBuilder(this.Strategy.Session).Build(); this.IsDerived = true; }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; this.AppsOnDeriveCustomerShipmentItem(derivation); this.AppsOnDerivePurchaseShipmentItem(derivation); }
public void TestOnDerive(ObjectOnDerive method) { if (this.ExistDependee) { this.Counter = this.Dependee.Counter; this.Subcounter = this.Dependee.Subcounter; } }
public static void AppsOnDerive(this WorkEffort @this, ObjectOnDerive method) { if (@this.ExistCurrentObjectState && [email protected](@this.LastObjectState)) { var currentStatus = new WorkEffortStatusBuilder(@this.Strategy.Session).WithWorkEffortObjectState(@this.CurrentObjectState).Build(); @this.AddWorkEffortStatus(currentStatus); @this.CurrentWorkEffortStatus = currentStatus; } }
public void AppsOnDerive(ObjectOnDerive method) { this.Parties = new Party[] { this.Distributor, this.InternalOrganisation }; if (!this.ExistInternalOrganisation | !this.ExistDistributor) { this.Delete(); } }
public void AppsOnDerive(ObjectOnDerive method) { this.Parties = new Party[] { this.Child, this.Parent }; if (!this.ExistParent | !this.ExistChild) { this.Delete(); } }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertAtLeastOne(this, SerializedInventoryItems.Meta.Good, SerializedInventoryItems.Meta.Part); derivation.Validation.AssertExistsAtMostOne(this, SerializedInventoryItems.Meta.Good, SerializedInventoryItems.Meta.Part); this.AppsOnDeriveCurrentObjectState(derivation); }
public void AppsOnDerive(ObjectOnDerive method) { this.Parties = new Party[] { this.Contractor, this.SubContractor }; if (!this.ExistContractor || !this.ExistSubContractor) { this.Delete(); } }
public void BaseOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; if (!this.ExistUser) { this.Delete(); } }
public void AppsOnDerive(ObjectOnDerive method) { this.Parties = new Party[] { this.Client, this.InternalOrganisation }; if (!this.ExistInternalOrganisation || !this.ExistClient) { this.Delete(); } }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertAtLeastOne(this, SupplierOfferings.Meta.Part, SupplierOfferings.Meta.Product); derivation.Validation.AssertExistsAtMostOne(this, SupplierOfferings.Meta.Part, SupplierOfferings.Meta.Product); this.AppsOnDeriveInventoryItem(derivation); }
public static void AppsOnDerive(this PartSpecification partSpecification, ObjectOnDerive method) { if (partSpecification.ExistCurrentObjectState && !partSpecification.CurrentObjectState.Equals(partSpecification.PreviousObjectState)) { var currentStatus = new PartSpecificationStatusBuilder(partSpecification.Strategy.Session).WithPartSpecificationObjectState(partSpecification.CurrentObjectState).Build(); partSpecification.AddPartSpecificationStatus(currentStatus); partSpecification.CurrentPartSpecificationStatus = currentStatus; } }
public void AppsOnDerive(ObjectOnDerive method) { this.Parties = new[] { this.Prospect, this.InternalOrganisation }; if (!this.ExistInternalOrganisation | !this.ExistProspect) { this.Delete(); } }
public void AppsOnDerive(ObjectOnDerive method) { this.Parties = new Party[] { this.Professional, this.ProfessionalServicesProvider }; if (!this.ExistProfessional | !this.ExistProfessionalServicesProvider) { this.Delete(); } }
public void TestOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Log.AssertExists(this, Places.Meta.PostalCode); derivation.Log.AssertNonEmptyString(this, Places.Meta.PostalCode); derivation.Log.AssertExists(this, Places.Meta.City); derivation.Log.AssertNonEmptyString(this, Places.Meta.City); }
public void AppsOnDerive(ObjectOnDerive method) { this.AppsOnDeriveFromParties(); this.AppsOnDeriveToParties(); this.AppsOnDeriveInvolvedParties(); if (!this.ExistOriginator || this.Receivers.Count == 0) { this.Delete(); } }
public void AppsOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; if (this.ExistInternalOrganisationWherePaymentMethod && this.InternalOrganisationWherePaymentMethod.DoAccounting) { derivation.Validation.AssertExists(this, this.Meta.Creditor); derivation.Validation.AssertAtLeastOne(this, this.Meta.GeneralLedgerAccount, this.Meta.Journal); } derivation.Validation.AssertExistsAtMostOne(this, this.Meta.GeneralLedgerAccount, this.Meta.Journal); }
public void TestOnDerive(ObjectOnDerive method) { this.Counter = this.Counter + 1; if (this.ExistSubdependee) { this.Subcounter = this.Subdependee.Subcounter; } if (this.DeleteDependent.HasValue && this.DeleteDependent.Value) { this.DependentWhereDependee.Delete(); } }
public void RealTimeOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; // check if caller or callee only has 1 accepted call if (this.Caller.GetAllAcceptedCalls().Count > 1 || this.Callee.GetAllAcceptedCalls().Count > 1) { derivation.Validation.AddError(this, this.Meta.CurrentObjectState, "Only 1 Call can be in the Accepted State."); } if (!this.ExistStartDate && this.CurrentObjectState.IsAccepted) { this.StartDate = this.strategy.Session.Now(); } if (!this.ExistEndDate && this.CurrentObjectState.IsEnded) { this.EndDate = this.strategy.Session.Now(); } }
public static void CoreOnDerive(this Auditable @this, ObjectOnDerive method) { var user = @this.Strategy.Session.GetUser(); if (user != null) { var derivation = method.Derivation; var changeSet = derivation.ChangeSet; if (changeSet.Created.Contains(@this.Id)) { @this.CreationDate = @this.Strategy.Session.Now(); @this.CreatedBy = user; } if (changeSet.Associations.Contains(@this.Id)) { @this.LastModifiedDate = @this.Strategy.Session.Now(); @this.LastModifiedBy = user; } } }
public void BaseOnDerive(ObjectOnDerive method) { if (this.ExistIsoCode) { this.EuMemberState = Countries.EuMemberStates.Contains(this.IsoCode); if (Countries.IbanDataByCountry.TryGetValue(this.IsoCode, out var ibanData)) { this.IbanLength = ibanData.Length; this.IbanRegex = ibanData.RegexStructure; } else { this.RemoveIbanLength(); this.RemoveIbanRegex(); } } else { this.RemoveEuMemberState(); this.RemoveIbanLength(); this.RemoveIbanRegex(); } }
public static void BaseOnDerive(this Service @this, ObjectOnDerive method) => @this.BaseOnDeriveVirtualProductPriceComponent();
public void CustomOnDerive(ObjectOnDerive method) { this.Third = new ThirdBuilder(this.Strategy.Session).Build(); this.IsDerived = true; }
public static void CustomOnDerive(this DerivationCounted @this, ObjectOnDerive method) { @this.DerivationCount += 1; }
public void BaseOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; this.PartyName = this.Name; }
public void CustomOnDerive(ObjectOnDerive method) => this.Sync();
public static void BaseOnDerive(this Shipment @this, ObjectOnDerive method) { var session = @this.Strategy.Session; @this.AddSecurityToken(new SecurityTokens(session).DefaultSecurityToken); }
public static void AppsOnDerive(this Service @this, ObjectOnDerive method) { @this.AppsOnDeriveVirtualProductPriceComponent(); }
public void CustomOnDerive(ObjectOnDerive method) => this.Counter += 1;
public void CustomOnDerive(ObjectOnDerive method) { this.IsDerived = true; }
public void CoreOnDerive(ObjectOnDerive method) { }
public void BaseOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; derivation.Validation.AssertExists(this, this.Meta.Description); }
public void CustomOnDerive(ObjectOnDerive method) { this.Subcounter = this.Subcounter + 1; }
public void BaseOnDerive(ObjectOnDerive method) { }
public void BaseOnDerive(ObjectOnDerive method) { var derivation = method.Derivation; this.Parties = new Party[] { this.Contact, this.Organisation }; }