public OrderToGrid(OrderFromHistory source, ILangSetter langSetter) { Number = source.Number; Date = source.Date; Email = source.Email; var culture = CultureInfo.GetCultures(CultureTypes.AllCultures).FirstOrDefault(c => c.Name == source.CultureName); if (culture == null) { Order = langSetter.Set("OrderToGrid_UnknownCurrency"); return; } var quantity = langSetter.Set("Profile_Quantity"); var price = langSetter.Set("Profile_Price"); var total = langSetter.Set("Profile_Total"); var order = source.ProductOrder.Aggregate(string.Empty, (current, p) => current + string.Format("<b>{0}</b> ({1} <b>{2}</b>: {3} <b>{4}</b>)" + " {5} <b>{6}</b>{7}", p.Name, quantity, p.Count, price, p.Price.ToString("C", culture), total, p.Total.ToString("C", culture), Environment.NewLine)); Order = order.Substring(0, order.Length - Environment.NewLine.Length); Total = string.Format("<b>{0}</b>", source.Total.ToString("C", culture)); }
protected Profile(IDbPersonRepository dbPersonRepository, IUserGroup userGroup, ILangSetter langSetter, IGridViewProfileManager<HttpSessionState> gridViewProfileManager, IImageService imageService) { _dbPersonRepository = dbPersonRepository; _userGroup = userGroup; _langSetter = langSetter; _gridViewProfileManager = gridViewProfileManager; _imageService = imageService; }
protected Basket(IDbOrderHistoryRepository dbOrderHistoryRepository, IMailSender mailSender, IUserGroup userGroup, ILangSetter langSetter, ICurrencyCultureService<HttpCookieCollection> currencyCultureService, IGridViewBasketManager<HttpSessionState> gridViewBasketManager) { _dbOrderHistoryRepository = dbOrderHistoryRepository; _mailSender = mailSender; _userGroup = userGroup; _langSetter = langSetter; _currencyCultureService = currencyCultureService; _gridViewBasketManager = gridViewBasketManager; }
protected ProductManagement(IDbProductRepository dbProductRepository, ICurrencyConverter currencyConverter, IUserGroup userGroup, ILangSetter langSetter, ICurrencyCultureService<HttpCookieCollection> currencyCultureService, IGridViewProductManagementManager<HttpSessionState> gridViewProductManagementManager) { _dbProductRepository = dbProductRepository; _currencyConverter = currencyConverter; _userGroup = userGroup; _langSetter = langSetter; _currencyCultureService = currencyCultureService; _gridViewProductManagementManager = gridViewProductManagementManager; }
protected ProductCatalog(IDbProductRepository dbProductRepository, IOrderRepository<HttpSessionState> orderRepository, IUserGroup userGroup, ILangSetter langSetter, IGridViewProductCatalogManager<HttpSessionState> gridViewProductCatalogManager, ICurrencyCultureService<HttpCookieCollection> currencyCultureService) { _dbProductRepository = dbProductRepository; _orderRepository = orderRepository; _userGroup = userGroup; _langSetter = langSetter; _gridViewProductCatalogManager = gridViewProductCatalogManager; _currencyCultureService = currencyCultureService; }
public MailService(ILangSetter langSetter) { _langSetter = langSetter; }
public StoreMaster(IUserGroup userGroup, ILangSetter langSetter) { _userGroup = userGroup; _langSetter = langSetter; }