@model Fab2ApprovalSystem.Models.Audit @{ ViewBag.Title = "ReadOnly"; } @using (Html.BeginForm()) { @*@Html.AntiForgeryToken()*@
Audit
@Html.TextBoxFor(model => model.AuditNo, "A" + "{0:00000}", new { id = "txtAuditNo", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
@Html.TextBoxFor(model => model.AuditTitle, new { id = "txtAuditTitle", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue; width=100%" })
@Html.TextBoxFor(model => model.AuditScore, new { id = "txtAuditScore", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
@(Html.Kendo().MultiSelect() .Name("AuditTypeIDs") .BindTo(new SelectList(ViewBag.AuditTypeList, "AuditTypeID", "AuditTypeName")) .Value(ViewBag.Nothing) .HtmlAttributes(new { style = "font-size:10px", Readonly = "Readonly" }) )
@(Html.Kendo().DatePickerFor(model => model.AuditDate) .Name("txtAuditDate") .HtmlAttributes(new { @type = "text", Readonly = "Readonly" }) )
@(Html.Kendo().MultiSelect() .Name("AuditorIDs") .BindTo(new SelectList(ViewBag.AuditorList, "AuditorID", "AuditorName")) .HtmlAttributes(new { style = "font-size:10px", Readonly = "Readonly" }) .Value(ViewBag.Nothing) )
@Html.TextBoxFor(model => model.AuditFindingCategories, new { id = "txtAuditFindingCategories", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
@(Html.Kendo().MultiSelect() .Name("AuditedAreaIDs") .BindTo(new SelectList(ViewBag.AuditAreaList, "AuditedAreaID", "AuditedAreaName")) .Value(ViewBag.Nothing) .HtmlAttributes(new { style = "font-size:10px", Readonly = "Readonly" }) )
@Html.TextBoxFor(model => model.NoOfMajorNonConformities, new { id = "txtNoOfMajorNonConformities", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
@Html.TextBoxFor(model => model.NoOfMinorNonConformities, new { id = "txtNoOfMinorNonConformities", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
@Html.TextAreaFor(model => model.Auditees, 3, 6, new { id = "txtAuditees", @class = "k-textbox", Readonly = "Readonly", style = "font-size: 10px;width: 100%;" })
@(Html.Kendo().DropDownList() .Name("AuditStatus") .DataTextField("Text") .DataValueField("Value") .BindTo(new List() { new SelectListItem() { Text = "Open", Value = "0" }, new SelectListItem() { Text = "Closed", Value = "1" }, new SelectListItem() { Text = "Cancelled", Value = "2" } } ) .Value(Model.AuditStatus.ToString()) .HtmlAttributes(new { Readonly = "Readonly" }) )
Documents Attachments
@*@(Html.Kendo().Upload() .Name("AuditReportFiles") .Async(a => a .Save("AuditReportAttachSave", "Audit", new { auditNo = Model.AuditNo }) .AutoUpload(true) ) .ShowFileList(false) .Events(events => events .Success("onFileUploadSuccess") .Upload("checkFileType") ) )*@ @(Html.Kendo().Grid() .Name("AuditReportAttachments") .Columns(columns => { columns.Bound(a => a.ID).Visible(false); columns.Bound(a => a.AuditNo).Visible(false); columns.Bound(a => a.FileGUID).Visible(false); columns.Bound(a => a.FileName); columns.Bound(a => a.UploadedByName); columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}"); columns.Command(command => command.Custom("View").Click("DownloadAttachment")); //columns.Command(command => command.Custom("Delete").Click("DeleteAttachment")); //columns.Command(command => command.Destroy()); }) .Sortable() .Scrollable() .HtmlAttributes(new { style = "height:200px; 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.ID); }) .PageSize(50) .Read(read => read.Action("AuditReportAttachment_Read", "Audit", new { auditNo = Model.AuditNo })) //.Destroy(destroy => destroy.Action("AuditReportAttachment_Destroy", "Audit")) ) )
Findings
@(Html.Kendo().Grid() .Name("AuditFindings") .Columns(columns => { columns.Bound(a => a.ID).Visible(false); columns.Bound(a => a.AuditNo).Visible(false); columns.Bound(a => a.CAOwner).Visible(false); columns.Bound(a => a.CANo).Visible(false); columns.Bound(a => a.AuditFindingCategoryID).Visible(false); columns.Bound(a => a.Title).Width("100px"); columns.Bound(a => a.Findings).Width("250px"); columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px"); columns.Bound(a => a.FindingType).Title("Type").Width("50px"); columns.Bound(a => a.ViolatedClause).Width("250px"); columns.Bound(a => a.FindingCategories).Title("Categories").Width("150px").Encoded(false).Width("300px"); columns.Bound(a => a.CANoDisp).ClientTemplate("#=buildCALinks(CANo, CANoDisp)#").Width("100px"); columns.Bound(a => a.CAStatus).Title("8D Status").Width("50px"); columns.Bound(a => a.CAOwner).Title("8D Owner").Width("50px"); columns.Command(command => command.Custom("View").Click("ViewAuditFindings")).Width("100px"); //columns.Command(command => command.Custom("Delete").Click("DeletetAuditFindings")).Width("100px"); }) .Sortable() .Scrollable() .HtmlAttributes(new { style = "height:200px; width:100%; font-size: 10px" }) .DataSource(dataSource => dataSource .Ajax() //.Batch(false) .ServerOperation(false) .Model(model => { model.Id(p => p.ID); }) .PageSize(20) .Read(read => read.Action("GetAuditFindingsList", "Audit", new { auditNo = Model.AuditNo })) ) .Resizable(resize => resize.Columns(true)) )
@*
@(Html.Kendo().Grid() .Name("CAFindings") .Columns(columns => { columns.Bound(a => a.ID).Visible(false); columns.Bound(a => a.ResponsibilityOwnerID).Visible(false); columns.Bound(a => a.CAFinding).Width("250px"); columns.Bound(a => a.CorrectiveAction).Width("250px"); columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px"); columns.Bound(a => a.Result).Width("100px"); columns.Bound(a => a.AttachmentLinks).ClientTemplate("#=buildLinks(AttachmentLinks, AuditNo)#").Width("100px"); columns.Bound(a => a.ResponsibilityOwnerName).Width("100px"); columns.Bound(a => a.ECD).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}"); columns.Bound(a => a.ImplementedDate).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}"); }) //.ToolBar(toolbar => toolbar.Create().Text("Add Item")) .Resizable(resize => resize.Columns(true)) .Sortable() .Scrollable() .HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px" }) .DataSource(dataSource => dataSource .Ajax() //.Batch(false) .ServerOperation(false) .Model(model => { model.Id(p => p.ID); model.Field(a => a.AuditNo).DefaultValue(Model.AuditNo); }) .PageSize(50) .Read(read => read.Action("GetCAFindingsList", "Audit", new { auditNo = Model.AuditNo })) ) )
*@ }