private static DeliveryProductMailerModel GetProductModel(ProductRow p, ModificationKind rowKind) { return(new DeliveryProductMailerModel() { Name = p.Name, Quantity = p.Quantity, Reference = p.Reference, Conditioning = p.GetConditioning(), RowKind = rowKind, Vat = p.Vat, ProductTotalVatPrice = p.TotalProductVatPrice, ProductTotalWholeSalePrice = p.TotalProductWholeSalePrice, ProductTotalOnSalePrice = p.TotalProductOnSalePrice, ProductWholeSalePrice = p.UnitWholeSalePrice, HasReturnable = p.HasReturnable, ReturnableName = p.ReturnableName, ReturnableQuantity = p.Quantity, ReturnableVat = p.ReturnableVat, ReturnableWholeSalePrice = p.ReturnableWholeSalePrice, ReturnableTotalVatPrice = p.TotalReturnableVatPrice, ReturnableTotalOnSalePrice = p.TotalReturnableOnSalePrice, ReturnableTotalWholeSalePrice = p.TotalReturnableWholeSalePrice, TotalVatPrice = p.TotalVatPrice, TotalOnSalePrice = p.TotalOnSalePrice, TotalWholeSalePrice = p.TotalWholeSalePrice }); }
private void HandleModificationState_OnStateChange(ModificationKind kind, object entity) { if (kind == ModificationKind.Add && entity is Entity.ClientUri) { StateHasChanged(); } }
private void HandleModificationState_OnStateChange(ModificationKind kind, object _) { if (kind == ModificationKind.Delete) { EditContext.Validate(); } }
private void HandleModificationState_OnStateChange(ModificationKind kind, object entity) { if (entity is T && (kind == ModificationKind.Add || kind == ModificationKind.Delete)) { StateHasChanged(); } }
private void HandleModificationState_OnStateChange(ModificationKind kind, object entity) { if (entity is Entity.ClientScope) { StateHasChanged(); } }
private void HandleModificationState_OnStateChange(ModificationKind kind, object entity) { if (entity is ApiClaim) { StateHasChanged(); } }
private protected AbstractModification(ModificationKind kind, bool readOnly) { if (!(this is TSelf)) { throw new InvalidOperationException("derived type must inherit TSymbol"); } Kind = kind; ReadOnly = readOnly; }
protected void OnStateChange(ModificationKind kind, object entity) { var isWebClient = _isWebClient; _isWebClient = Model.IsWebClient(); if (isWebClient != _isWebClient) { StateHasChanged(); } }
public TextModifiedEventArgs( ModificationKind kind, string modification, int offset, int length ) { _kind = kind; _modification = modification; _offset = offset; _length = length; }
private static DeliveryProductMailerModel GetProductModel(PreparedProduct p, ModificationKind rowKind) { var model = GetProductModel((ProductRow)p, rowKind); model.Batches = p.Batches?.Select(b => new BatchMailerModel { Number = b.Batch.Number, DLC = b.Batch.DLC, DDM = b.Batch.DDM }).ToList() ?? new List <BatchMailerModel>(); return(model); }
public static string ToEnumString(this ModificationKind kind) { switch (kind) { case ModificationKind.ToDeliver: return("à livrer"); case ModificationKind.Broken: return("cassé"); case ModificationKind.Improper: return("non conforme"); case ModificationKind.Missing: return("manquant"); case ModificationKind.Excess: return("en surplu"); default: return(""); } }
public static FindBelongingResult FindBelongingThing(SyntakTreeDecorator toFind, List <SyntakTreeDecorator> possibleMatches) { var toFindContentString = ContentString(toFind.node); var toFindFullString = toFind.node.ToFullString().Trim(); { var identical = possibleMatches.Find(n => n.node.ToFullString().Trim().Equals(toFindFullString)); if (identical != null) { return(new FindBelongingResult() { treeNode = identical, wasModified = false, howModified = ModificationKind.noModification }); } var equiv = possibleMatches.Find(n => n.node.IsEquivalentTo(toFind.node)); if (equiv != null) { return(new FindBelongingResult() { treeNode = equiv, wasModified = false, howModified = ModificationKind.noModification }); } } { var sameKind = possibleMatches.FindAll(n => n.node.Kind().Equals(toFind.node.Kind())); if (sameKind != null) { foreach (var s in sameKind) { bool?haveSameName = HaveSameName(toFind.node.Kind(), s.node, toFind.node); if (haveSameName == true || haveSameName == null) // same name, or no name { return(new FindBelongingResult() { treeNode = s, wasModified = !ContentString(s.node).Equals(toFindContentString), howModified = ModificationKind.contentChanged }); } } } if (sameKind.Count == 1) { var s = sameKind[0]; bool sameContent = ContentString(s.node).Equals(toFindContentString); ModificationKind how = ModificationKind.nameChanged; if (!sameContent) { how = how | ModificationKind.contentChanged; } return(new FindBelongingResult() { treeNode = s, wasModified = true, howModified = how }); } } return(null); }
public MethodModification(MethodDescriptor methodDescriptor, ModificationKind modificationKind) { this.MethodDescriptor = methodDescriptor; this.ModificationKind = modificationKind; }
public TextModifiedEventArgs() { _kind = ModificationKind.Significant; }
internal EventModification(TypeModification declaringType, UTF8String name, ITypeReference <ITypeDefOrRef> type, ModificationKind kind, bool readOnly) : base(declaringType, name, kind, readOnly) => Type = type;
internal PropertyModification(TypeModification declaringType, UTF8String name, PropertySignature signature, ModificationKind kind, bool readOnly) : base(declaringType, name, kind, readOnly) => Signature = signature;
private static IEnumerable <object> GetModifiedEntities(Dictionary <object, ModificationKind> modificationList, ModificationKind kind) { return(modificationList .Where(m => m.Value == kind) .Select(m => m.Key)); }
private protected MemberModification(TypeModification declaringType, UTF8String name, ModificationKind kind, bool readOnly) : base(kind, readOnly) { DeclaringType = declaringType; Name = name; }
private void HandleModificationState_OnStateChange(ModificationKind kind, object entity) { _disabled = false; StateHasChanged(); }
private static DeliveryReturnableMailerModel GetReturnableModel(ProductRow product, ModificationKind rowKind) { return(new DeliveryReturnableMailerModel() { Name = product.ReturnableName, Quantity = product.Quantity, RowKind = rowKind, Vat = product.ReturnableVat ?? 0, TotalVatPrice = product.TotalReturnableVatPrice ?? 0, TotalWholeSalePrice = product.TotalReturnableWholeSalePrice ?? 0, TotalOnSalePrice = product.TotalReturnableOnSalePrice ?? 0, WholeSalePrice = product.ReturnableWholeSalePrice ?? 0 }); }
public DeliveryProduct(ProductRow product, int quantity, ModificationKind kind) : base(product, quantity) { RowKind = kind; SetQuantity(quantity); }
private protected AccessibleModification(TypeModification declaringType, UTF8String name, ModificationKind kind, bool readOnly) : base(declaringType, name, kind, readOnly) { }