/// <summary> /// Used for OLE attachment page creation /// </summary> /// <param name="id">Main application Id</param> public OLEAttachmentPage GetAttachmentPageModel(int id) { var att = databaseHelper.Get<ApplicationForm>(g => g.ApplicationFormId == id).Attachments; var model = new OLEAttachmentPage { ApplicationId = id, Certificate = CreateAttachmentBlockModel(id, AttachmentType.Certificate, att), Degree = CreateAttachmentBlockModel(id, AttachmentType.Degree, att), Guardian = CreateAttachmentBlockModel(id, AttachmentType.Guardian, att), EmploymentCertificates = CreateAttachmentBlockModel(id, AttachmentType.EmploymentCertificates, att), Health = CreateAttachmentBlockModel(id, AttachmentType.Health, att), Income = CreateAttachmentBlockModel(id, AttachmentType.Income, att), Refusal = CreateAttachmentBlockModel(id, AttachmentType.Refusal, att), Registration = CreateAttachmentBlockModel(id, AttachmentType.Registration, att), Supplemental = CreateAttachmentBlockModel(id, AttachmentType.Supplemental, att), Travel = CreateAttachmentBlockModel(id, AttachmentType.Travel, att) }; model.FormProgress = this.GetFormProgressPrefill(FormType.OPIStudyResidencePermit); model.FormProgress.Pages[3].IsCurrent = true; return model; }
public virtual ActionResult OPIStep4Save(OLEAttachmentPage model) { if (model == null || model.ApplicationId == 0) { return this.LoadOrCreateAndPrefillNewApplication(); } // TODO: Validate & save passed model into database return this.RedirectToRoutePermanent("ole_opi_step5", new { controller = "OLE", id = model.ApplicationId }); }
public virtual ActionResult OPIStep5Save(OLEAttachmentPage model) { if (model == null || model.ApplicationId == 0) { return this.LoadOrCreateAndPrefillNewApplication(); } if (this.PaymentLogic.IsApplicationPaid(model.ApplicationId)) { return this.RedirectToActionPermanent(MVC.Dashboard.ActionNames.Index2, MVC.Dashboard.Name); } return this.RedirectToRoutePermanent("ole_opi_step6", new { controller = "OLE", id = model.ApplicationId }); }
public virtual ActionResult OPIStep4AjaxSave(OLEAttachmentPage model) { OPIStep4Save(model); return this.JsonPublic(new { result = true }); }