initial add
This commit is contained in:
@ -0,0 +1,60 @@
|
||||
@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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user