Jonathan Ouellette 580e90f6a2 initial add
2022-09-27 14:10:30 -07:00

61 lines
2.6 KiB
Plaintext

@model Fab2ApprovalSystem.Models.Attachment
@{
ViewBag.Title = "_DocumentAttachment";
}
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Attachment>()
.Name("Attachments")
.Columns(columns =>
{
columns.Bound(a => a.AttachmentID).Visible(false);
columns.Bound(l => l.IssueID).Visible(false);
columns.Bound(l => l.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>)
.ClientTemplate("<a href='/UserUploads/#=FileName#' target='_blank'>#=FileName#</a>")
.Title("Test");
columns.Bound(l => l.FullName);
columns.Bound(l => l.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}");
columns.Command(command => { command.Destroy(); });
})
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height:150px; width:100%; font-size: 10px" })
.DataSource(dataSource => dataSource
.Ajax()
//.Batch(false)
.ServerOperation(false)
.Events(events => events.Error("error_handler"))
.Model(model =>
{
model.Id(p => p.AttachmentID);
})
.PageSize(4)
.Read(read => read.Action("Attachment_Read", "LotDisposition"))
.Destroy(destroy => destroy.Action("Attachment_Destroy", "LotDisposition"))
)
)
<div>
@(Html.Kendo().Upload()
.Name("files")
.Async(a => a
.Save("AttachSave", "LotDisposition")
.AutoUpload(true)
)
.ShowFileList(false)
.Events(events => events
.Success("onSuccess")
)
)
</div>