Example #1
0
        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));
        }
Example #2
0
        private static PricingIdentity GetSamplePricingIdentity(string entityTypeName, int id)
        {
            PricingIdentity result = new PricingIdentity();
            string          name   = String.Format("{0} #{1}", entityTypeName, id);

            result.AnalyticName = "Analytic 5244";
            result.Name         = name;
            result.Description  = String.Format("Sample description for {0}", name);
            result.Notes        = String.Format("Here are are some sample notes that were entered for this item (\"{0}\").", name);
            result.Created      = DateTime.Now.AddDays(-8);
            result.Edited       = DateTime.Now.AddDays(-3);
            result.Owner        = name + " Owner";

            return(result);
        }
        private static PricingIdentity GetPricingIdentity(string name, string ownerName)
        {
            PricingIdentity result = new PricingIdentity();

            result.AnalyticName = "Analytic 5244";
            result.Name         = name;
            result.Description  = String.Format("Sample description for {0}", name);
            result.Notes        = String.Format("Here are are some sample notes that were entered for this item (\"{0}\").", name);
            result.Active       = true;
            result.Shared       = false;

            result.Created   = DateTime.Now.AddDays(-8);
            result.Edited    = DateTime.Now.AddDays(-3);
            result.Refreshed = DateTime.Now;
            result.Owner     = ownerName;
            result.Author    = ownerName;
            result.Editor    = ownerName;

            return(result);
        }