Ejemplo n.º 1
0
 public ActionResult BookingTypePartial(string id)
 {
     if (!String.IsNullOrWhiteSpace(id))
     {
         bool isGuid = Guid.TryParse(id, out Guid jobId);
         if (isGuid && jobId != Guid.Empty)
         {
             var repo  = new MetadataRepository();
             var model = new Models.ViewModels.BookingType()
             {
                 JobId        = id,
                 BookingTypes = repo.GetBookingTypes()
             };
             return(PartialView("BookingTypePartial", model));
         }
     }
     return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
 }