public PackageDto GetLinePackage(int lineId) { lock (obj) { var line = lineManager.GetLineDto(lineId); return(packageManager.GetPackageDto(line.PackageId)); } }
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); } }
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); } }