Tested and reconfigured ability to add files to the main corrective action form.
This commit is contained in:
@ -336,7 +336,7 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
|
||||
public ActionResult Attachment_Read([DataSourceRequest] DataSourceRequest request, int caNO)
|
||||
{
|
||||
return Json(caDMO.GetCAAttachmentsList(caNO, "").ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
|
||||
return Json(caDMO.GetCAAttachmentsList(caNO, "Main").ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -409,14 +409,14 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
/// <param name="D2Files"></param>
|
||||
/// <param name="caNo"></param>
|
||||
/// <returns></returns>
|
||||
public ActionResult D2FilesAttachSave(IEnumerable<HttpPostedFileBase> D2Files, int caNo)
|
||||
public ActionResult AttachSave(IEnumerable<HttpPostedFileBase> files, int caNo)
|
||||
{
|
||||
try
|
||||
{
|
||||
// The Name of the Upload component is "files"
|
||||
if (D2Files != null)
|
||||
if (files != null)
|
||||
{
|
||||
foreach (var file in D2Files)
|
||||
foreach (var file in files)
|
||||
{
|
||||
// Some browsers send file names with full path.
|
||||
// We are only interested in the file name.
|
||||
@ -443,8 +443,7 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
FileGUID = guid,
|
||||
FileName = fileName,
|
||||
UploadedByID = (int)Session[GlobalVars.SESSION_USERID],
|
||||
Section = Functions.CASectionMapper(GlobalVars.CASection.D2)
|
||||
|
||||
Section = Functions.CASectionMapper(GlobalVars.CASection.Main)
|
||||
};
|
||||
|
||||
|
||||
|
@ -412,6 +412,21 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
return Json(new[] { issue }.ToDataSourceResult(request, ModelState));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="ca"></param>
|
||||
/// <returns></returns>
|
||||
[AcceptVerbs(HttpVerbs.Post)]
|
||||
public ActionResult DeleteCAItem([DataSourceRequest] DataSourceRequest request, CorrectiveAction ca)
|
||||
{
|
||||
ldDMO.DeleteCADocument(ca.CANo, int.Parse(Session[GlobalVars.SESSION_USERID].ToString()), "Corrective Action");
|
||||
|
||||
|
||||
return Json(new[] { ca }.ToDataSourceResult(request, ModelState));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -726,7 +726,7 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
emailBody += "<h3>" + training.ECN + " - " + ecnTitle + "</h3>";
|
||||
|
||||
emailBody += "<table>";
|
||||
emailBody += "<tr><th>Name</th><th>Date Assigned</th></tr>";
|
||||
emailBody += "<tr><th>Name</th><th>Date Assigned</th><th>Out of Office</th></tr>";
|
||||
List<TrainingAssignment> openAssignments = trainingDMO.GetOpenAssignmentsByTrainingID(training.TrainingID);
|
||||
foreach (TrainingAssignment assignment in openAssignments)
|
||||
{
|
||||
@ -734,7 +734,14 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
|
||||
string DateAssigned = assignmentDate.HasValue ? assignmentDate.Value.ToString("MM/dd/yyyy") : "<not available>";
|
||||
|
||||
emailBody += "<tr><td>" + assignment.FullName + "</td><td>" + DateAssigned + "</td></tr>";
|
||||
emailBody += "<tr><td>" + assignment.FullName + "</td><td>" + DateAssigned + "</td>";
|
||||
|
||||
if (userDMO.GetUserByID(assignment.UserID).OOO)
|
||||
emailBody += "<td>X</td>";
|
||||
else
|
||||
emailBody += "<td></td>";
|
||||
|
||||
emailBody += "</tr>";
|
||||
|
||||
}
|
||||
emailBody += "</table>";
|
||||
|
Reference in New Issue
Block a user