@model Fab2ApprovalSystem.Models.ECN @{ ViewBag.Title = "ECN Approval"; } @{ Layout = "_ECNLayout.cshtml"; } @using (Html.BeginForm()) { ViewBag.CanResubmit = "false"; @Html.AntiForgeryToken()
@if (ViewBag.IsApprover == "true" && Model.CancellationInProgress) { } else if (ViewBag.IsApprover == "true" && Model.ExpirationInProgress) { } else if ( (ViewBag.IsApprover == "true" && Model.TECNExtensionState && Model.CurrentStep > 2) || (ViewBag.IsApprover == "true" && Model.CurrentStep == 3 && Model.ConvertedFromNumber != null) ) { } else if (ViewBag.IsApprover == "true") { } @if (ViewBag.IsOriginator == "true") { } @if (Model.CurrentStep <= 2 && Model.CloseDate == null && !Model.ReSubmitted && Model.ConvertedFromNumber == null && Model.TECNExtensionState == false && (ViewBag.IsOriginator == "true")) { } @if (Model.CloseDate != null) { if (Model.IsTECN && !Model.CancellationInProgress && !Model.CancellationApproved && !Model.ExpirationInProgress && !Model.ExpirationProcessed && !Model.Converted && !Model.LockedForConversion && (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today)) { ViewBag.CanResubmit = "true"; } else if (Model.IsTECN && !Model.CancellationInProgress && !Model.CancellationApproved && !Model.ExpirationInProgress && !Model.ExpirationProcessed && Model.ConversionApprovalInProgress == false && (Model.ExpirationDate >= DateTime.Today || Model.ExtensionDate >= DateTime.Today)) { } else if (Model.IsEmergencyTECN && !Model.CancellationInProgress && !Model.CancellationApproved && !Model.ExpirationInProgress && !Model.ExpirationProcessed && !Model.Converted && (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today)) { ViewBag.CanResubmit = "true"; } }
Engineering Change Notice
@Html.TextBoxFor(model => model.ECNNumber, new { id = "txtECNNumber", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
@Html.TextBoxFor(model => model.SubmitedDate, new { id = "txSubmitDate", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" }) @if (Session[GlobalVars.IS_ADMIN] != null) { }
@if (Model.ConvertedFromNumber != null && Model.IsTECN) {
} @if (Model.ConvertedFromNumber != null && Model.IsECN) {
} @if (Model.ConvertedFromNumber != null && Model.IsTECN) {
} @if (Model.ConvertedToNumber != null && Model.IsEmergencyTECN) {
} @if (Model.ConvertedToNumber != null && Model.IsTECN) {
}
@*
*@
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox", style = "width:100%", disabled = "disabled" })
*(DO NOT USE Rev I, O, Q, S, X, and Z)
Revision Y is followed by AA. YY is followed by AAA
@(Html.Kendo().MultiSelect() .Name("DepartmentIDs") .BindTo(new SelectList(ViewBag.Departments, "DepartmentID", "DepartmentName")) .Value(ViewBag.Nothing) .HtmlAttributes(new { disabled = "disabled" }) )
ECN: Qualtiy and Dept. Specific
MRB: Quality, Production, Engineering, OPC
PCRB: Quality, Production, Engineering, Dept. Specific (scope of change)
@(Html.Kendo().MultiSelect() .Name("ModuleIDs") .BindTo(new SelectList(ViewBag.AffectedModules, "ModuleID", "ModuleName")) .Value(ViewBag.Nothing) .HtmlAttributes(new { disabled = "disabled" }) )
@(Html.Kendo().DropDownListFor(model => model.CategoryID) .DataValueField("CategoryID") .DataTextField("CategoryName") .BindTo(ViewBag.Categories) .HtmlAttributes(new { disabled = "disabled" }))
@Html.CheckBoxFor(model => model.IsDocEC, new { disabled = "disabled" })
ECN/TECN Detail
@Html.CheckBoxFor(model => model.IsECN, new { disabled = "disabled" })
@Html.CheckBoxFor(model => model.IsTECN, new { disabled = "disabled" })
@Html.CheckBoxFor(model => model.IsEmergencyTECN, new { disabled = "disabled" })
@(Html.Kendo().DatePickerFor(model => model.ExpirationDate) .Name("txtExpirationDate") .HtmlAttributes(new { disabled = "disabled", @type = "", style = "width: 11em;" }) .Format("MM/dd/yyyy") )
@if ( (ViewBag.IsOriginator == "true" && Model.IsTECN && Model.CloseDate != null && !Model.ExpirationProcessed && !Model.ExpirationInProgress && !Model.CancellationApproved && !Model.CancellationInProgress && Model.ConversionApprovalInProgress == false && (Model.ExpirationDate >= DateTime.Today || Model.ExtensionDate >= DateTime.Today)) || (Model.IsTECN && (bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated) && Model.CloseDate != null && !Model.ExpirationProcessed && !Model.ExpirationInProgress && !Model.CancellationApproved && !Model.CancellationInProgress && Model.ConversionApprovalInProgress == false && (Model.ExpirationDate >= DateTime.Today || Model.ExtensionDate >= DateTime.Today)) ) { @(Html.Kendo().DatePickerFor(model => model.ExtensionDate) .Name("txtExtensionDate") .HtmlAttributes(new { @type = "", style = "width: 11em;" }) .Format("MM/dd/yyyy") ) } else { @(Html.Kendo().DatePickerFor(model => model.ExtensionDate) .Name("txtExtensionDate") .HtmlAttributes(new { disabled = "disabled", @type = "", style = "width: 11em;" }) .Format("MM/dd/yyyy") ) }
@Html.TextBoxFor(model => model.CancellationApprovalDate, "{0:MM/dd/yyyy}", new { id = "txtCancellationApprovalDate", @class = "k-textbox", style = "width: 8em;", disabled = "disabled" })
@(Html.Kendo().DropDownList() .Name("NumberOfLotsAffected") .Items(i => { i.Add().Text("").Value(""); i.Add().Text("NA").Value("NA"); i.Add().Text("< 10").Value("< 10"); i.Add().Text("> 10").Value("> 10"); }) .HtmlAttributes(new { style = "width: 5em;", disabled = "disabled" }) )
@(Html.Kendo().DropDownList() .Name("RecipeChange") .Items(i => { i.Add().Text("").Value(""); i.Add().Text("No").Value("False"); i.Add().Text("Yes").Value("True"); }) .HtmlAttributes(new { style = "width: 5em;", disabled = "disabled" }) )
@(Html.Kendo().MultiSelect() .Name("ProductFamilyIDs") .BindTo(new SelectList(ViewBag.ProductFamilies, "ProductFamilyID", "ProductFamily")) .HtmlAttributes(new { disabled = "disabled", @class = "AffectedProductFamily" }) .Value(Model.ProductFamilyIDs) )
@if ( (Model.CloseDate != null && Model.IsECN) || ((Model.IsEmergencyTECN || Model.IsTECN) && (DateTime.Today > Model.ExpirationDate && DateTime.Today > Model.ExtensionDate)) ) { @(Html.Kendo().Upload() .Name("files") .Async(a => a .Save("AttachSave", "ECN", new { ecnNumber = Model.ECNNumber }) .AutoUpload(true) ) .ShowFileList(false) .Events(events => events .Success("onFileUploadSuccess") .Upload("checkFileType") ) ) @(Html.Kendo().Grid() .Name("Attachments") .Columns(columns => { columns.Bound(a => a.AttachmentID).Visible(false); columns.Bound(a => a.ECNNumber).Visible(false); columns.Bound(a => a.FileName).Template(@ @Html.ActionLink(@item.FileName.ToString(), null)); //.ClientTemplate("#=FileName#"); columns.Bound(a => a.FullName); columns.Bound(a => a.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}"); columns.Command(command => command.Custom("View").Click("DownloadAttachment")); }) .Sortable() .Scrollable() .HtmlAttributes(new { style = "height:157px; 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(50) .Read(read => read.Action("Attachment_Read", "ECN", new { ecnNumber = Model.ECNNumber })) //.Destroy(destroy => destroy.Action("Attachment_Destroy", "ECN")) ) ) } else { @*@(Html.Kendo().Upload() .Name("files") .Async(a => a .Save("AttachSave", "ECN", new { ecnNumber = Model.ECNNumber }) .AutoUpload(true) ) .ShowFileList(false) .Events(events => events .Success("onFileUploadSuccess") .Upload("checkFileType") ) )*@ @(Html.Kendo().Grid() .Name("Attachments") .Columns(columns => { columns.Bound(a => a.AttachmentID).Visible(false); columns.Bound(a => a.ECNNumber).Visible(false); columns.Bound(a => a.FileName).Template(@ @Html.ActionLink(@item.FileName.ToString(), null)); //.ClientTemplate("#=FileName#"); columns.Bound(a => a.FullName); columns.Bound(a => a.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}"); columns.Command(command => command.Custom("View").Click("DownloadAttachment")); }) .Sortable() .Scrollable() .HtmlAttributes(new { style = "height:157px; 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(50) .Read(read => read.Action("Attachment_Read", "ECN", new { ecnNumber = Model.ECNNumber })) .Destroy(destroy => destroy.Action("Attachment_Destroy", "ECN")) ) ) }
Description of Change    
@Html.TextAreaFor(model => model.DescriptionOfChange, 15, 30, new { id = "txtDescriptionOfChange", @class = "form-control", style = "font-size: 11px;width: 100%;", disabled = "disabled" })
Reason For Change   
@Html.TextAreaFor(model => model.ReasonForChange, 15, 30, new { id = "txtReasonForChange", @class = "form-control", style = "font-size: 11px;width: 100%;", disabled = "disabled" })
Training Notification
@*
@Html.CheckBoxFor(model => model.AcknowledgementRequired, new { disabled = "disabled" })
*@
@Html.CheckBoxFor(model => model.TrainingRequired, new { disabled = "disabled" })
@*
@(Html.Kendo().MultiSelect() .Name("AcknowledgementByIDs") .BindTo(new SelectList(ViewBag.AcknowledgementTrainingByIDs, "AcknowledgementTrainingByID", "AcknowledgementTrainingBy")) .Value(ViewBag.Nothing) .HtmlAttributes(new { disabled = "disabled" }) )
*@
@(Html.Kendo().MultiSelect() .Name("TrainingByIDs") .BindTo(new SelectList(ViewBag.AcknowledgementTrainingByIDs, "TrainingGroupID", "TrainingGroupName")) .Value(ViewBag.Nothing) .HtmlAttributes(new { disabled = "disabled" }) )
@*
@(Html.Kendo().MultiSelect() .Name("AreaIDs") .BindTo(new SelectList(ViewBag.AffectedAreas, "AreaID", "Area")) .Value(ViewBag.Nothing) .HtmlAttributes(new { disabled = "disabled" }) )
*@ @*
@(Html.Kendo().MultiSelect() .Name("TechnologyIDs") .BindTo(new SelectList(ViewBag.AffectedTechnologies, "TechnologyID", "Technology")) .Value(ViewBag.Nothing) .HtmlAttributes(new { disabled = "disabled" }) )
*@
Systems
@Html.CheckBoxFor(model => model.PCRBRequired, new { disabled = "disabled" })
@Html.TextBoxFor(model => model.PCRBNumber, new { id = "txtPCRBNumber", @class = "k-textbox", disabled = "disabled", @style = "max-width: 100%" })
@*
@Html.CheckBoxFor(model => model.TestProgramChangeRequired, new { disabled = "disabled" })
*@
@Html.CheckBoxFor(model => model.MetrologyChangeRequired, new { disabled = "disabled" })
@Html.CheckBoxFor(model => model.SPCChangeRequired, new { disabled = "disabled" })
@*
@Html.CheckBoxFor(model => model.NewPartFlowRequired, new { disabled = "disabled" })
*@
@Html.CheckBoxFor(model => model.FIChangeRequired, new { disabled = "disabled" })
@Html.CheckBoxFor(model => model.SPNChangeRequired, new { disabled = "disabled" })
@*
Implementation Details
@if (ViewBag.IsApprover == "true" && Model.CloseDate == null) {
@Html.TextAreaFor(model => model.ImplementationDetails, 15, 30, new { id = "txtImplementationDetails", @class = "form-control", style = "font-size: 11px;width: 100%;" })
} else {
@Html.TextAreaFor(model => model.ImplementationDetails, 15, 30, new { id = "txtImplementationDetails", @class = "form-control", style = "font-size: 11px;width: 100%;", disabled = "disabled" })
}
*@
Change Impact
@Html.RadioButtonFor(model => model.ImpactOnEnvironment, 1, new { disabled = "disabled" })
@Html.RadioButtonFor(model => model.ImpactOnEnvironment, 2, new { disabled = "disabled" })
@Html.RadioButtonFor(model => model.ImpactOnEnvironment, 3, new { disabled = "disabled" })
@Html.TextAreaFor(model => model.ImpactOnEnvironmentDescription, 5, 30, new { id = "txtImpactOnEnvironmentDescription", @class = "form-control", style = "font-size: 11px;width: 100%;", disabled = "disabled" })
@Html.RadioButtonFor(model => model.ImpactOnCapacity, 1, new { disabled = "disabled" })
@Html.RadioButtonFor(model => model.ImpactOnCapacity, 0, new { disabled = "disabled" })
@Html.TextAreaFor(model => model.ImpactOnCapacityDescription, 5, 30, new { id = "txtImpactOnCapacityDescription", @class = "form-control", style = "font-size: 11px;width: 100%;", disabled = "disabled" })
@Html.RadioButtonFor(model => model.MaterialConsumptionChangeRequired, 1, new { disabled = "disabled" })
@Html.RadioButtonFor(model => model.MaterialConsumptionChangeRequired, 0, new { disabled = "disabled" })
@Html.TextAreaFor(model => model.MaterialConsumptionChangeDescription, 5, 30, new { id = "txtMaterialConsumptionChangeDescription", @class = "form-control", style = "font-size: 11px;width: 100%;", disabled = "disabled" })
@*
Description Of Change
@Html.TextAreaFor(model => model.DescriptionOfChange, 5, 30, new { id = "txtDescriptionOfChange", @class = "form-control", style = "font-size: 11px;width: 100%;" })
*@ @*
Implementation
@Html.CheckBoxFor(model => model.NotAFlowChange, new { disabled = "disabled" })
@Html.CheckBoxFor(model => model.AttachECN_TECNToLots, new { disabled = "disabled" })
@Html.CheckBoxFor(model => model.SPNFlowChangeAtSingleStep, new { disabled = "disabled" })
@Html.CheckBoxFor(model => model.SPNFlowChangeAtMultipleSteps, new { disabled = "disabled" })
*@
@*@if (@Model.CurrentStep == 1) {
@if (ViewBag.IsApprover == "true") { }
@*} *@
@if (ViewBag.IsApprover == "true") { } else if ((ViewBag.IsOriginator == "true" || ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))) && Model.CloseDate == null) { }
@if (Session[GlobalVars.IS_ADMIN] != null) { if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated)) { @(Html.Kendo().Grid() .Name("ApproversList") .Columns(columns => { columns.Bound(a => a.UserID).Visible(false); columns.Bound(a => a.ApprovalID).Visible(false); columns.Bound(a => a.FullName); columns.Bound(a => a.RoleName); columns.Bound(a => a.SubRoleName); columns.Bound(a => a.Status); columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ; columns.Bound(a => a.CompletedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ; columns.Bound(a => a.Comments); columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).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.ApprovalID); }) .PageSize(20) .Read(read => read.Action("GetApproversList", "ECN", new { issueID = Model.ECNNumber, step = Model.CurrentStep, isTECN = Model.IsTECN, isEmergrncyTECN = Model.IsEmergencyTECN })) ) .Resizable(resize => resize.Columns(true)) ) } else { @(Html.Kendo().Grid() .Name("ApproversList") .Columns(columns => { columns.Bound(a => a.UserID).Visible(false); columns.Bound(a => a.ApprovalID).Visible(false); columns.Bound(a => a.FullName); columns.Bound(a => a.RoleName); columns.Bound(a => a.SubRoleName); columns.Bound(a => a.Status); columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ; columns.Bound(a => a.CompletedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ; columns.Bound(a => a.Comments); //columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).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.ApprovalID); }) .PageSize(20) .Read(read => read.Action("GetApproversList", "ECN", new { issueID = Model.ECNNumber, step = Model.CurrentStep, isTECN = Model.IsTECN, isEmergrncyTECN = Model.IsEmergencyTECN })) ) .Resizable(resize => resize.Columns(true)) ) } }
} @Html.Partial("_ECNReassignOriginator")