Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. public class ServiceFileUploadViewModel
  2. {
  3. public FileUpload File { get; set; }
  4. public IList<Service> AvalibleServices { get; set; }
  5. public IList<Service> SelectedServices { get; set; }
  6. public PostedServices PostedServices { get; set; }
  7. public HttpPostedFileBase FileUpload { get; set; }
  8.  
  9. }
  10. public class PostedServices
  11. {
  12. public int[] ServicesIds { get; set; }
  13. }
  14.  
  15. @model ServiceFileUploadViewModel
  16.  
  17.  
  18. @using (Html.BeginForm("_Upload", "ServiceCatalog", FormMethod.Post, new { enctype = "multipart/form-data" }))
  19.  
  20. {
  21. <div>
  22. <input type="file" name="file" />
  23. </div>
  24.  
  25. <div>
  26. Dokumenttyp
  27. </div>
  28. <div>
  29. @Html.EditorFor(m => m.File.DocumentType)
  30. </div>
  31.  
  32. <div>
  33. @Html.CheckBoxListFor(m => m.PostedServices.ServicesIds,
  34. m => m.AvalibleServices,
  35. entity => entity.Id,
  36. entity => entity.Name,
  37. m => m.SelectedServices,
  38. Position.Vertical)
  39. </div>
  40.  
  41. <div>
  42. <label>Visningsalternativ</label>
  43. </div>
  44. <div>
  45. @Html.RadioButtonFor(m => m.File.IsPrivate, "true", true) Interninformation
  46. </div>
  47. <div>
  48. @Html.RadioButtonFor(m => m.File.IsPrivate, "false", false) Kundinformation
  49. </div>
  50.  
  51. <input type="submit" value="Ladda upp" />
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement