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)); }
protected decimal GetPercentualValue(CategoryWithAmountModel category) { decimal total = Categories.Sum(c => c.TotalAmount.Value); return(100 / total * category.TotalAmount.Value); }