public PaymentViewModel(PageService pageservice, Validator validator, DeclarationService declarationService) : base(pageservice) { this.validator = validator; this.declarationService = declarationService; Cost = declarationService.GetCost(); Init(); }
private async void init() { Hours = (int)Math.Round((DateTime.Now - Evac.DateTimeEvac).TotalHours); Points = new string('.', 45); ParkingCost = Evac.Parking.CostByHour * Hours; HasActive = await declarationService.SetupEvac(Evac.Id); FullCost = declarationService.GetCost(); if (HasActive) { NeedAutorize = !userService.IsAutorized; if (userService.IsAutorized) { HasActiveOther = userService.CurrentUser.Id != declarationService.ProfileId; HasActiveOwn = !HasActiveOther; } } }