@model Fab2ApprovalSystem.Models.LTHoldStep @Html.HiddenFor(model => model.LTWorkRequestID, new { id = "workRequestID" }) @Html.HiddenFor(model => model.ID, new { id = "holdStepID" }) @Html.HiddenFor(model => model.SWRNumber, new { id = "swrNumber" }) @Html.HiddenFor(model => model.Revision, new { id = "currentRevision" }) @Html.HiddenFor(model => model.currentStep, new { id = "currentStep" })
@(Html.Kendo().DropDownList() .Name("HoldStepAttachDocType") .DataTextField("Text") .DataValueField("Value") .BindTo(new List() { new SelectListItem() { Text = "Select", Value = "Select" }, new SelectListItem() { Text = "Instructions", Value = "Instructions" }, new SelectListItem() { Text = "Traveler", Value = "Traveler" }, new SelectListItem() { Text = "Other", Value = "Other" } }) .Value("1") .HtmlAttributes(new { style= "width:100px;" }) )
@if (@Model.currentStep != 3) { @(Html.Kendo().Upload() .Name("HoldStepAttachment") .Async(a => a .Save("HoldStepAttachSave", "LotTraveler") .AutoUpload(true) ) .ShowFileList(false) .Events(events => events.Success("SetDocType").Upload("UploadData") ) ) }
@if (@Model.currentStep != 3) { @(Html.Kendo().Grid() .Name("HoldStepAttachments") .Columns(columns => { columns.Bound(a => a.ID).Visible(false); columns.Bound(a => a.FileGUID).Visible(false); columns.Bound(a => a.LTHoldStepID).Visible(false); columns.Bound(a => a.FileName).Template(@ @Html.ActionLink(@item.FileName.ToString(), null)).Width("100px"); //.ClientTemplate("#=FileName#"); columns.Bound(a => a.DocType); columns.Bound(a => a.UploadedByName); columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}"); columns.Command(c => c.Destroy()); columns.Command(c => c.Custom("View").Click("DownloadAttachment")).Width("100px"); }) .Sortable() .Scrollable() .HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" }) .DataSource(dataSource => dataSource .Ajax() .ServerOperation(false) .Model(model => { model.Id(p => p.ID); }) .PageSize(50) .Read(read => read.Action("GetHoldStepAttachments", "LotTraveler", new { holdStepID = Model.ID })) .Destroy(destroy => destroy.Action("DeleteHoldStepAttachment", "LotTraveler")) ) ) } else { @(Html.Kendo().Grid() .Name("HoldStepAttachments") .Columns(columns => { columns.Bound(a => a.ID).Visible(false); columns.Bound(a => a.FileGUID).Visible(false); columns.Bound(a => a.LTHoldStepID).Visible(false); columns.Bound(a => a.FileName).Template(@ @Html.ActionLink(@item.FileName.ToString(), null)).Width("100px"); //.ClientTemplate("#=FileName#"); columns.Bound(a => a.DocType); columns.Bound(a => a.UploadedByName); columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}"); columns.Command(c => c.Custom("View").Click("DownloadAttachment")).Width("100px"); ; }) .Sortable() .Scrollable() .HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" }) .DataSource(dataSource => dataSource .Ajax() .ServerOperation(false) .Model(model => { model.Id(p => p.ID); }) .PageSize(50) .Read(read => read.Action("GetHoldStepAttachments", "LotTraveler", new { holdStepID = Model.ID })) ) ) }