public ActionResult NewMeterPost()
 {
     MeterPostViewModel meterpost = new MeterPostViewModel();
     meterpost.Vehicles = vehicleRepo.Vehicles;
     meterpost.MeterPost = new MeterPost();
     return PartialView(meterpost);
 }
 public String SaveMeterPost(MeterPostViewModel meterModel)
 {
     MeterPost meterpost = meterModel.MeterPost;
     var identity = ((CustomPrincipal)HttpContext.User).CustomIdentity;
     meterpost.UserId = identity.UserId;
     //meterpost.CurrentMeter = Integer(meterModel.MeterPost.CurrentMeter);
     String message = "";
     if (ModelState.IsValid)
     {
         repository.SaveMeterPost(meterpost);
         message = "Rapporten har sparats!";
     }
     else
     {
         message = "Fel!";
     }
     return message;
 }