Added exception catching to 8D D5D6D7 Corrective Action Update and Insert routines. Also changed textfield for results to a textbox. On the SQL side in the stored procedures for insert and update, changed the input variable types to accept 1000 characters for result field. Changed table field definition for result to VARCHAR(1000).

This commit is contained in:
ouellette 2023-05-25 16:04:28 -07:00
parent e61c7318b4
commit 9746653081
2 changed files with 19 additions and 7 deletions

View File

@ -627,8 +627,15 @@ namespace Fab2ApprovalSystem.Controllers
/// <param name="data"></param>
/// <returns></returns>
public ActionResult InsertD5D6CAItem(D5D6CorrectivetAction data)
{
try
{
caDMO.InsertD5D6CorrectivetAction(data);
}
catch(Exception e)
{
return Content(e.Message + " Please try again...");
}
if (data.ResponsibilityOwnerID != null && data.ResponsibilityOwnerID != 0)
{
//NotifyActionItemOwner(data.CANo, data.ECD, data.ResponsibilityOwnerID, "CorrectiveActionAIAssigned.txt");
@ -648,9 +655,14 @@ namespace Fab2ApprovalSystem.Controllers
{
D5D6CorrectivetAction previousData = caDMO.GetD5D5CAItem(data.ID);
CorrectiveAction caData = caDMO.GetCAItem(data.CANo, (int)Session[GlobalVars.SESSION_USERID]);
try
{
caDMO.UpdateD5D6CorrectivetAction(data);
}
catch(Exception e)
{
return Content(e.Message + " Please try again...");
}
if (data.ResponsibilityOwnerID != data.CurrentResponsibilityOwnerID && data.ResponsibilityOwnerID != 0)
{
NotifyActionItemOwner(data.CANo, data.ECD, data.ResponsibilityOwnerID, "CorrectiveActionAIAssigned.txt");
@ -663,8 +675,6 @@ namespace Fab2ApprovalSystem.Controllers
NotifyActionItemCompletion(data.CANo, data.ECD, caData.QAID, "CorrectiveActionAICompleted.txt");
}
return Content("");
}

View File

@ -1692,7 +1692,8 @@
</td>
<td>
@Html.TextBox("txtD5D6Result", null, new { @class = "k-textbox", style = "width:100%" })
@*@Html.TextBox("txtD5D6Result", null, new { @class = "k-textbox", style = "width:100%" })*@
@Html.TextArea("txtD5D6Result", "", 10, 40 , new { @class = "k-textbox", style = "width:100%" })
</td>
</tr>
<tr>
@ -4325,6 +4326,7 @@
ResponsibilityOwnerID: $("#D5D6ResponsibilityOwnerIds").data("kendoDropDownList").value(),
ImprovementID: d5d6ImprovementIDs + ','
}
alert(objectData.Result);
}
return objectData;