示例#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));
        }
示例#2
0
        protected decimal GetPercentualValue(CategoryWithAmountModel category)
        {
            decimal total = Categories.Sum(c => c.TotalAmount.Value);

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