Added ability to delete Corrective Actions through the list page.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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));
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -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(@"<a href='javascript: void(0)' class='abutton delete' onclick='deleteRowCA(this)' title='button delete'>button delete</a>");
|
||||
|
||||
})
|
||||
|
||||
@ -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"))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
@ -93,5 +94,8 @@
|
||||
return numStr;
|
||||
}
|
||||
|
||||
|
||||
function deleteRowCA(element) {
|
||||
grid = $("#CAList").data("kendoGrid");
|
||||
grid.removeRow($(element).closest("tr"));
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user