Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ServiceFileUploadViewModel
- {
- public FileUpload File { get; set; }
- public IList<Service> AvalibleServices { get; set; }
- public IList<Service> SelectedServices { get; set; }
- public PostedServices PostedServices { get; set; }
- public HttpPostedFileBase FileUpload { get; set; }
- }
- public class PostedServices
- {
- public int[] ServicesIds { get; set; }
- }
- @model ServiceFileUploadViewModel
- @using (Html.BeginForm("_Upload", "ServiceCatalog", FormMethod.Post, new { enctype = "multipart/form-data" }))
- {
- <div>
- <input type="file" name="file" />
- </div>
- <div>
- Dokumenttyp
- </div>
- <div>
- @Html.EditorFor(m => m.File.DocumentType)
- </div>
- <div>
- @Html.CheckBoxListFor(m => m.PostedServices.ServicesIds,
- m => m.AvalibleServices,
- entity => entity.Id,
- entity => entity.Name,
- m => m.SelectedServices,
- Position.Vertical)
- </div>
- <div>
- <label>Visningsalternativ</label>
- </div>
- <div>
- @Html.RadioButtonFor(m => m.File.IsPrivate, "true", true) Interninformation
- </div>
- <div>
- @Html.RadioButtonFor(m => m.File.IsPrivate, "false", false) Kundinformation
- </div>
- <input type="submit" value="Ladda upp" />
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement