diff --git a/.vs/Fab2ApprovalSystem/FileContentIndex/83f5db04-5f9f-4283-b1da-5f855eccbace.vsidx b/.vs/Fab2ApprovalSystem/FileContentIndex/83f5db04-5f9f-4283-b1da-5f855eccbace.vsidx deleted file mode 100644 index cf72868..0000000 Binary files a/.vs/Fab2ApprovalSystem/FileContentIndex/83f5db04-5f9f-4283-b1da-5f855eccbace.vsidx and /dev/null differ diff --git a/.vs/Fab2ApprovalSystem/FileContentIndex/ebbf2280-9117-4a7c-a9b9-e1e9b808657d.vsidx b/.vs/Fab2ApprovalSystem/FileContentIndex/ebbf2280-9117-4a7c-a9b9-e1e9b808657d.vsidx new file mode 100644 index 0000000..f07592f Binary files /dev/null and b/.vs/Fab2ApprovalSystem/FileContentIndex/ebbf2280-9117-4a7c-a9b9-e1e9b808657d.vsidx differ diff --git a/.vs/Fab2ApprovalSystem/v17/.suo b/.vs/Fab2ApprovalSystem/v17/.suo index 0f01e43..e3b9042 100644 Binary files a/.vs/Fab2ApprovalSystem/v17/.suo and b/.vs/Fab2ApprovalSystem/v17/.suo differ diff --git a/Fab2ApprovalSystem/Controllers/HomeController.cs b/Fab2ApprovalSystem/Controllers/HomeController.cs index c065426..00b4cf2 100644 --- a/Fab2ApprovalSystem/Controllers/HomeController.cs +++ b/Fab2ApprovalSystem/Controllers/HomeController.cs @@ -405,6 +405,9 @@ namespace Fab2ApprovalSystem.Controllers ldDMO.DeleteLotDisposition(issue.IssueID); else if (dType == GlobalVars.DocumentType.ECN) ecnDMO.DeleteDocument(issue.IssueID, int.Parse(Session[GlobalVars.SESSION_USERID].ToString()), "ECN"); + else if (dType == GlobalVars.DocumentType.CorrectiveAction) + ldDMO.DeleteCADocument(issue.IssueID, int.Parse(Session[GlobalVars.SESSION_USERID].ToString()), "Corrective Action"); + return Json(new[] { issue }.ToDataSourceResult(request, ModelState)); } diff --git a/Fab2ApprovalSystem/DMO/LotDispositionDMO.cs b/Fab2ApprovalSystem/DMO/LotDispositionDMO.cs index 1938dec..b737c97 100644 --- a/Fab2ApprovalSystem/DMO/LotDispositionDMO.cs +++ b/Fab2ApprovalSystem/DMO/LotDispositionDMO.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Configuration; using System.Data; @@ -489,6 +489,16 @@ namespace Fab2ApprovalSystem.DMO } + public void DeleteCADocument(int CANo, int userID, string caTypeString) + { + var parameters = new DynamicParameters(); + parameters.Add("@UserID", userID); + parameters.Add("@CANo", CANo); + parameters.Add("@CAType", caTypeString); + + this.db.Execute("_8DDeleteCADocument", parameters, commandType: CommandType.StoredProcedure); + } + /// /// /// @@ -1413,4 +1423,4 @@ namespace Fab2ApprovalSystem.DMO return fileName; } } -} \ No newline at end of file +} diff --git a/Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml b/Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml index 7752c4a..e0a8508 100644 --- a/Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml +++ b/Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml @@ -1,4 +1,4 @@ -@{ +@{ Layout = "_HomeLayout.cshtml"; } @@ -37,6 +37,7 @@ columns.Bound(l => l.PendingAIOwners).Width("100px").Title("Action Item Owners"); columns.Bound(l => l.D8DueDate).Format("{0:MM/dd/yy}").Width("100px"); columns.Bound(l => l.ClosedDate).Format("{0:MM/dd/yy}").Width("100px"); + columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"button delete"); }) @@ -68,14 +69,14 @@ .DataSource(dataSource => dataSource .Ajax() .Model(model => - { - model.Id(p => p.CANo); + { + model.Id(p => p.CANo); - //model.Field(p => p.TotalCost).Editable(false); - }) + //model.Field(p => p.TotalCost).Editable(false); + }) .PageSize(50) .Read(read => read.Action("GetCorrectiveActionList", "Home")) - //.Destroy(destroy => destroy.Action("DeleteItem", "Home")) + .Destroy(destroy => destroy.Action("DeleteItem", "Home")) ) ) @@ -93,5 +94,8 @@ return numStr; } - - \ No newline at end of file + function deleteRowCA(element) { + grid = $("#CAList").data("kendoGrid"); + grid.removeRow($(element).closest("tr")); + } +