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:
parent
e61c7318b4
commit
9746653081
@ -628,7 +628,14 @@ namespace Fab2ApprovalSystem.Controllers
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ActionResult InsertD5D6CAItem(D5D6CorrectivetAction data)
|
public ActionResult InsertD5D6CAItem(D5D6CorrectivetAction data)
|
||||||
{
|
{
|
||||||
caDMO.InsertD5D6CorrectivetAction(data);
|
try
|
||||||
|
{
|
||||||
|
caDMO.InsertD5D6CorrectivetAction(data);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return Content(e.Message + " Please try again...");
|
||||||
|
}
|
||||||
if (data.ResponsibilityOwnerID != null && data.ResponsibilityOwnerID != 0)
|
if (data.ResponsibilityOwnerID != null && data.ResponsibilityOwnerID != 0)
|
||||||
{
|
{
|
||||||
//NotifyActionItemOwner(data.CANo, data.ECD, data.ResponsibilityOwnerID, "CorrectiveActionAIAssigned.txt");
|
//NotifyActionItemOwner(data.CANo, data.ECD, data.ResponsibilityOwnerID, "CorrectiveActionAIAssigned.txt");
|
||||||
@ -648,9 +655,14 @@ namespace Fab2ApprovalSystem.Controllers
|
|||||||
{
|
{
|
||||||
D5D6CorrectivetAction previousData = caDMO.GetD5D5CAItem(data.ID);
|
D5D6CorrectivetAction previousData = caDMO.GetD5D5CAItem(data.ID);
|
||||||
CorrectiveAction caData = caDMO.GetCAItem(data.CANo, (int)Session[GlobalVars.SESSION_USERID]);
|
CorrectiveAction caData = caDMO.GetCAItem(data.CANo, (int)Session[GlobalVars.SESSION_USERID]);
|
||||||
caDMO.UpdateD5D6CorrectivetAction(data);
|
try
|
||||||
|
{
|
||||||
|
caDMO.UpdateD5D6CorrectivetAction(data);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return Content(e.Message + " Please try again...");
|
||||||
|
}
|
||||||
if (data.ResponsibilityOwnerID != data.CurrentResponsibilityOwnerID && data.ResponsibilityOwnerID != 0)
|
if (data.ResponsibilityOwnerID != data.CurrentResponsibilityOwnerID && data.ResponsibilityOwnerID != 0)
|
||||||
{
|
{
|
||||||
NotifyActionItemOwner(data.CANo, data.ECD, data.ResponsibilityOwnerID, "CorrectiveActionAIAssigned.txt");
|
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");
|
NotifyActionItemCompletion(data.CANo, data.ECD, caData.QAID, "CorrectiveActionAICompleted.txt");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return Content("");
|
return Content("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1692,7 +1692,8 @@
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -4325,6 +4326,7 @@
|
|||||||
ResponsibilityOwnerID: $("#D5D6ResponsibilityOwnerIds").data("kendoDropDownList").value(),
|
ResponsibilityOwnerID: $("#D5D6ResponsibilityOwnerIds").data("kendoDropDownList").value(),
|
||||||
ImprovementID: d5d6ImprovementIDs + ','
|
ImprovementID: d5d6ImprovementIDs + ','
|
||||||
}
|
}
|
||||||
|
alert(objectData.Result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return objectData;
|
return objectData;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user