示例#1
0
 public IEnumerable <LineDto> GetLines(string clientId)
 {
     lock (obj)
     {
         var a = lineManager.GetClientLines(clientId);
         return(a);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
        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);
        }