private double WaterActivity(WaterActivity waterAct, WaterCharacter character)
        {
            switch (character)
            {
            case WaterCharacter.IsAgriculture: return(waterAct?.Agriculture ?? 0);

            case WaterCharacter.IsCommercial: return(waterAct?.Service ?? 0);

            case WaterCharacter.IsFactorial: return(waterAct?.Product ?? 0);

            case WaterCharacter.IsHouseHold: return(waterAct?.Drink ?? 0);

            default: return(0);
            }
        }
Exemplo n.º 2
0
 public PlumbingModel GetPlumbingInfo(PlumbingInfo info, WaterActivity waterActivity)
 {
     return(new PlumbingModel
     {
         Doing = info?.Doing == true,
         CubicMeterPerMonth = info?.PlumbingUsage?.CubicMeterPerMonth ?? 0,
         WaterBill = info?.PlumbingUsage?.WaterBill ?? 0,
         TurbidWater = info?.QualityProblem?.Problem?.TurbidWater == true,
         SaltWater = info?.QualityProblem?.Problem?.SaltWater == true,
         Smell = info?.QualityProblem?.Problem?.Smell == true,
         FilmOfOil = info?.QualityProblem?.Problem?.FilmOfOil == true,
         FogWater = info?.QualityProblem?.Problem?.FogWater == true,
         HardWater = info?.QualityProblem?.Problem?.HardWater == true,
         Agriculture = waterActivity?.Agriculture ?? 0,
         Service = waterActivity?.Service ?? 0,
         Product = waterActivity?.Product ?? 0,
         Drink = waterActivity?.Drink ?? 0,
         Plant = waterActivity?.Plant ?? 0
     });
 }