diff --git a/.vs/OSS/v16/.suo b/.vs/OSS/v16/.suo index d261b3e..fd0ad83 100644 Binary files a/.vs/OSS/v16/.suo and b/.vs/OSS/v16/.suo differ diff --git a/Controllers/NewCOIController.cs b/Controllers/NewCOIController.cs index 6125dd0..dd7fbb7 100644 --- a/Controllers/NewCOIController.cs +++ b/Controllers/NewCOIController.cs @@ -138,38 +138,38 @@ namespace OSS.Controllers } public ActionResult ValidateAttachments() { - // var ProjectCode = Session["ProjectCode"].ToString(); - // var checkApplicationForm = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "Application Form"); - // if (checkApplicationForm == null) - // { - // TempData["error"] = " Please upload Application form"; - // return RedirectToAction("AttachmentsNew"); - // } - // var checkAttachmentBank = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "Bank Statement"); - // if (checkAttachmentBank == null) - // { - // TempData["error"] = " Please upload Bank Statement"; - // return RedirectToAction("AttachmentsNew"); - // } + var ProjectCode = Session["ProjectCode"].ToString(); + var checkApplicationForm = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "Application Form"); + if (checkApplicationForm == null) + { + TempData["error"] = " Please upload Application form"; + return RedirectToAction("AttachmentsNew"); + } + var checkAttachmentBank = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "Bank Statement"); + if (checkAttachmentBank == null) + { + TempData["error"] = " Please upload Bank Statement"; + return RedirectToAction("AttachmentsNew"); + } - // var checkAttachmentBoard = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "Board Resolution"); - // if (checkAttachmentBoard == null) - // { - // TempData["error"] = " Please upload Board Resolution"; - // return RedirectToAction("AttachmentsNew"); - // } - // var checkAttachmentBusinesP = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "Business Plan"); - // if (checkAttachmentBusinesP == null) - // { - // TempData["error"] = " Please upload Business Plan"; - // return RedirectToAction("AttachmentsNew"); - // } - // var checkAttachmentInc = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "INCORPORATION"); - // if (checkAttachmentInc == null) - // { - // TempData["error"] = " Please upload Certificate of Incorporation"; - // return RedirectToAction("AttachmentsNew"); - // } + var checkAttachmentBoard = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "Board Resolution"); + if (checkAttachmentBoard == null) + { + TempData["error"] = " Please upload Board Resolution"; + return RedirectToAction("AttachmentsNew"); + } + var checkAttachmentBusinesP = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "Business Plan"); + if (checkAttachmentBusinesP == null) + { + TempData["error"] = " Please upload Business Plan"; + return RedirectToAction("AttachmentsNew"); + } + var checkAttachmentInc = myContext.AttachmentsList.SingleOrDefault(t => t.ProjectCode == ProjectCode && t.AttachmentName == "INCORPORATION"); + if (checkAttachmentInc == null) + { + TempData["error"] = " Please upload Certificate of Incorporation"; + return RedirectToAction("AttachmentsNew"); + } return RedirectToAction("PickUpOfficeNew"); } diff --git a/Views/NewCOI/ApplicationStatus.cshtml b/Views/NewCOI/ApplicationStatus.cshtml index ed61bed..0b783da 100644 --- a/Views/NewCOI/ApplicationStatus.cshtml +++ b/Views/NewCOI/ApplicationStatus.cshtml @@ -219,7 +219,7 @@ <% if(data.PaymentStatus == true) {%> " target="_blank" class="btn btn-outline-success btn-sm"> - Download + Receipt <% } else diff --git a/Views/NewCOI/AttachmentsNew.cshtml b/Views/NewCOI/AttachmentsNew.cshtml index 7e58e13..ffd74e1 100644 --- a/Views/NewCOI/AttachmentsNew.cshtml +++ b/Views/NewCOI/AttachmentsNew.cshtml @@ -67,7 +67,7 @@