123456789101112131415161718192021 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ServiceDEMO
- {
- public partial class Service
- {
- public string PathImage => MainImagePath == null ? Environment.CurrentDirectory + @"\Услуги школы\picture.png" : Environment.CurrentDirectory + "\\" + MainImagePath;
- public double DurationInMinutes => TimeSpan.FromSeconds(DurationInSeconds).TotalMinutes;
- public string DefaultCost => Discount == 0 ? "" : Convert.ToDouble(Cost).ToString();
- public double DiscountCost => Discount == 0 ? Convert.ToDouble(Cost) : Convert.ToDouble(Cost) * Convert.ToDouble(1 - Discount);
- public string DiscountPercent => Discount == 0 ? "" : "^ скидка " + (Discount * 100).ToString() + "%";
- }
- }
|