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)
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user