Ejemplo n.º 1
0
        protected string GetPercentualValue(CategoryWithAmountModel category)
        {
            decimal total      = Categories.Sum(c => c.TotalAmount.Value);
            decimal percentage = 100 / total * category.TotalAmount.Value;

            return(percentage.ToString("0.##", CultureInfo.InvariantCulture));
        }
Ejemplo n.º 2
0
        protected decimal GetPercentualValue(CategoryWithAmountModel category)
        {
            decimal total = Categories.Sum(c => c.TotalAmount.Value);

            return(100 / total * category.TotalAmount.Value);
        }