public PricingEveryday( int id, string searchGroupKey, PricingIdentity identity, List <FilterGroup> filterGroups, List <PricingEverydayValueDriver> valueDrivers, PricingEverydayKeyValueDriver keyValueDriver, List <PricingEverydayLinkedValueDriver> linkedValueDrivers, List <PricingMode> pricingModes, List <PricingEverydayPriceListGroup> priceListGroups, PricingKeyPriceListRule keyPriceListRule, List <PricingLinkedPriceListRule> linkedPriceListRules, List <PricingEverydayResult> results ) { Id = id; SearchGroupKey = searchGroupKey; Identity = identity; FilterGroups = filterGroups; ValueDrivers = valueDrivers; KeyValueDriver = keyValueDriver; LinkedValueDrivers = linkedValueDrivers; PricingModes = pricingModes; PriceListGroups = priceListGroups; KeyPriceListRule = keyPriceListRule; LinkedPriceListRules = linkedPriceListRules; Results = results; }
public PricingEveryday( int id, PricingIdentity identity ) { Id = id; Identity = identity; }
public Session <PricingEveryday> LoadPricingEveryDay(PricingIdentity identity, int selectedEntityId) { DTO.PricingIdentity id = identity.ToDto(); var ids = new DTO.PricingEveryday(selectedEntityId, id); var response = _pricingEverydayService.LoadPricingEveryday(new DTO.Session <DTO.PricingEveryday>() { Data = ids }); return(CreateDisplayResponse <PricingEveryday>(response)); }
public static DTO.PricingIdentity ToDto(this Display.PricingIdentity displayEntity) { var dto = new DTO.PricingIdentity( displayEntity.AnalyticsId, displayEntity.Name, displayEntity.Description, displayEntity.Notes, displayEntity.RefreshedText, displayEntity.CreatedText, displayEntity.EditedText, displayEntity.Refreshed, displayEntity.Created, displayEntity.Edited, displayEntity.Author, displayEntity.Editor, displayEntity.Owner, displayEntity.Shared, displayEntity.Active); return(dto); }
public static Display.PricingIdentity ToDisplayEntity(this DTO.PricingIdentity dto) { var displayEntity = new Display.PricingIdentity(); displayEntity.AnalyticsId = dto.AnalyticsId; displayEntity.Name = dto.Name; displayEntity.Description = dto.Description; displayEntity.Notes = dto.Notes; displayEntity.RefreshedText = dto.RefreshedText; displayEntity.CreatedText = dto.CreatedText; displayEntity.EditedText = dto.EditedText; displayEntity.Refreshed = dto.Refreshed; displayEntity.Created = dto.Created; displayEntity.Edited = dto.Edited; displayEntity.Author = dto.Author; displayEntity.Editor = dto.Editor; displayEntity.Owner = dto.Owner; displayEntity.Shared = dto.Shared; displayEntity.Active = dto.Active; return(displayEntity); }
public static DTO.PricingEveryday ToDto(this Display.PricingEveryday displayEntity) { DTO.PricingIdentity identity = displayEntity.Identity.ToDto(); var filterGroups = new List <DTO.FilterGroup>(); if (displayEntity.FilterGroups != null) { foreach (var filterGroup in displayEntity.FilterGroups) { filterGroups.Add(filterGroup.ToDto()); } } var valueDrivers = new List <DTO.PricingEverydayValueDriver>(); if (displayEntity.ValueDrivers != null) { foreach (var driver in displayEntity.ValueDrivers) { valueDrivers.Add(driver.ToDto()); } } DTO.PricingEverydayKeyValueDriver keyValueDriver = new DTO.PricingEverydayKeyValueDriver(); if (displayEntity.KeyValueDriver != null) { keyValueDriver = displayEntity.KeyValueDriver.ToDto(); } var linkedValueDrivers = new List <DTO.PricingEverydayLinkedValueDriver>(); if (displayEntity.LinkedValueDrivers != null) { foreach (var driver in displayEntity.LinkedValueDrivers) { linkedValueDrivers.Add(driver.ToDto()); } } var pricingModes = new List <DTO.PricingMode>(); if (displayEntity.PricingModes != null) { foreach (var mode in displayEntity.PricingModes) { pricingModes.Add(mode.ToDto()); } } var priceListGroups = new List <DTO.PricingEverydayPriceListGroup>(); if (displayEntity.PriceListGroups != null) { foreach (var priceListGroup in displayEntity.PriceListGroups) { priceListGroups.Add(priceListGroup.ToDto()); } } DTO.PricingKeyPriceListRule keyPriceListRule = new DTO.PricingKeyPriceListRule(); if (displayEntity.KeyPriceListRule != null) { keyPriceListRule = displayEntity.KeyPriceListRule.ToDto(); } var linkedPriceListRules = new List <DTO.PricingLinkedPriceListRule>(); if (displayEntity.LinkedPriceListRules != null) { foreach (var rule in displayEntity.LinkedPriceListRules) { linkedPriceListRules.Add(rule.ToDto()); } } var results = new List <DTO.PricingEverydayResult>(); if (displayEntity.Results != null) { foreach (var result in displayEntity.Results) { results.Add(result.ToDto()); } } DTO.PricingEveryday dto = new DTO.PricingEveryday( displayEntity.Id, displayEntity.SearchGroupKey, identity, filterGroups, valueDrivers, keyValueDriver, linkedValueDrivers, pricingModes, priceListGroups, keyPriceListRule, linkedPriceListRules, results); return(dto); }