@model Fab2ApprovalSystem.Models.Audit @{ ViewBag.Title = "Edit"; } @using (Html.BeginForm()) { @Html.AntiForgeryToken()
Audit
@Html.TextBoxFor(model => model.AuditNo, @Functions.ReturnAuditNoStringFormat(@Model.AuditNo), new { id = "txtAuditNo", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
@Html.TextBoxFor(model => model.AuditTitle, new { id = "txtAuditTitle", @class = "k-textbox", style = "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) )
@(Html.Kendo().DatePickerFor(model => model.AuditDate) .Name("txtAuditDate") .HtmlAttributes(new { @type = "text" }) )
@(Html.Kendo().MultiSelect() .Name("AuditorIDs") .BindTo(new SelectList(ViewBag.AuditorList, "AuditorID", "AuditorName")) .Value(ViewBag.Nothing) )
@Html.TextBoxFor(model => model.AuditFindingCategories, new { id = "txtAuditFindingCategories", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue;width:100%" })
@(Html.Kendo().MultiSelect() .Name("AuditedAreaIDs") .BindTo(new SelectList(ViewBag.AuditAreaList, "AuditedAreaID", "AuditedAreaName")) .Value(ViewBag.Nothing) )
@*
@(Html.Kendo().MultiSelect() .Name("AuditedStandardIDs") .BindTo(new SelectList(ViewBag.AuditStandardList, "ID", "Standard")) .Value(ViewBag.Nothing) )
*@
@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 = "AuditeesResult", @class = "k-textbox", style = "font-size: 10px;width: 100%;" })
*@
@(Html.Kendo().MultiSelect() .Name("AuditeesResult") //.BindTo(new SelectList(ViewBag.UserList, "TeamMemberID", "TeamMemberName")) .BindTo(new SelectList(ViewBag.UserList, "UserName", "UserName")) .Value(ViewBag.AuditeeNames) )
@if (ViewBag.Is8DQA == "true") {
@(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()) )
} else {
@(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" }) )
}
@Html.TextBoxFor(model => model.NoOf5SFindings, new { id = "txtNoOf5SFindings", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
@Html.TextBoxFor(model => model.NoOfOFIFindings, new { id = "txtNoOfOFIFindings", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
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("350px"); 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("150px"); columns.Bound(a => a.CANoDisp).ClientTemplate("#=buildCALinks(CANo, CANoDisp)#").Width("50px"); 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("Edit").Click("EditAuditFindings")).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.CurrentResponsibilityOwnerID).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}"); columns.Command(c => c.Custom("Add-Remove File").Click("UploadCAFindingsAttachment")).Width("150px"); columns.Command(c => c.Custom("Edit").Click("EditCAFindingsItem")).Width("70px"); columns.Command(c => c.Custom("Delete").Click("DeleteCAFindingsItem")).Width("70px"); }) //.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 })) ) )
*@ }