public IEnumerable <LineDto> GetLines(string clientId) { lock (obj) { var a = lineManager.GetClientLines(clientId); return(a); } }
public double CalculateClientValue(string clientId) { lock (obj) { int numOfLines = lineManager.GetClientLines(clientId).Count(); int callsToCenter = crmManager.GetClient(clientId).CallsToCenter; return(callsToCenter * (-0.1) + numOfLines * 0.5); } }
public double GetPackageIncludesPrice(ClientDto item) { List <int> packageIds = _lineManager.GetClientLines(item.ClientId).Select(p => p.PackageId).ToList(); double packageIncludePriceSum = 0; foreach (var id in packageIds) { var packageIncludes = _packageManager.GetPackageIncludes(id); packageIncludePriceSum += packageIncludes.FixedPrice * (1 - (packageIncludes.DiscountPrecentage / 100)); } return(packageIncludePriceSum); }