Ejemplo n.º 1
0
 public PackageDto GetLinePackage(int lineId)
 {
     lock (obj)
     {
         var line = lineManager.GetLineDto(lineId);
         return(packageManager.GetPackageDto(line.PackageId));
     }
 }
Ejemplo n.º 2
0
 public double CalculateTotalMinutesWithFamily(int lineId)
 {
     lock (obj)
     {
         LineDto         line              = lineManager.GetLineDto(lineId);
         List <string>   lines             = lineManager.GetLineDtos().Where(l => l.ClientId == line.ClientId).Select(l => l.Number).ToList();
         List <CallsDto> calls             = callManager.GetCallsDtos(lineId).ToList();
         double          minutesWithFamily = 0;
         foreach (var item in calls)
         {
             foreach (var i in lines)
             {
                 if (item.DestinationNumber == i)
                 {
                     minutesWithFamily += item.Duration;
                 }
             }
         }
         return(minutesWithFamily);
     }
 }
Ejemplo n.º 3
0
 public LineDto GetLine(string number)
 {
     try
     {
         LineDto line;
         lock (obj)
         {
             lineManager = GetContainer().Resolve <ILineManager>();
             line        = lineManager.GetLineDto(number);
             return(line);
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
         return(null);
     }
 }