private void CreateJob(string isCreate)
 {
     if (isCreate == "True")
     {
         CarWashClientModel model = new CarWashClientModel()
         {
             IsPreSoak    = IsPreSoak,
             IsSoftWater  = IsSoftWater,
             IsDryAgent   = IsDryAgent,
             IsTyreShine  = IsTyreShine,
             IsRainShield = IsRainShield,
             WashMode     = mode,
             TotCost      = TotalCost,
         };
         if (_applicationService.CreateJob(model))
         {
             MessageBox.Show("Your car wash job created successfully", "Alert", MessageBoxButton.OK, MessageBoxImage.Information);
         }
         else
         {
             MessageBox.Show("Your car wash job hasn't created try again..", "Alert", MessageBoxButton.OK, MessageBoxImage.Information);
         }
     }
     else
     {
         var result = MessageBox.Show("Are you sure want to cancel!", "Alert", MessageBoxButton.YesNo, MessageBoxImage.Warning);
         if (MessageBoxResult.Yes == result)
         {
             RestValues();
         }
     }
 }
 public bool CreateJob(CarWashClientModel carWash)
 {
     try
     {
         var result = _carWashDomain.CreateJob(ConvertToDomain(carWash));
         return(result);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 private CarWashDomainModel ConvertToDomain(CarWashClientModel carWash)
 {
     return(new CarWashDomainModel
     {
         IsDryAgent = carWash.IsDryAgent,
         IsPreSoak = carWash.IsPreSoak,
         IsRainShield = carWash.IsRainShield,
         IsSoftWater = carWash.IsSoftWater,
         IsTyreShine = carWash.IsTyreShine,
         TotCost = carWash.TotCost,
         WashMode = carWash.WashMode
     });
 }
        private void MockValues()
        {
            signature = new CarWashClientModel()
            {
                IsPreSoak    = true,
                IsSoftWater  = true,
                IsDryAgent   = true,
                IsTyreShine  = true,
                IsRainShield = true,
                WashMode     = WashMode.Signature,
                TotCost      = 9,
            };

            express = new CarWashDomainModel()
            {
                IsPreSoak    = true,
                IsSoftWater  = true,
                IsDryAgent   = true,
                IsTyreShine  = false,
                IsRainShield = false,
                WashMode     = WashMode.Express,
                TotCost      = 3,
            };
        }