public ActionResult Verify() { var m = new VerificationVm { CryptoAccountId = AccountId() }; return(View("Verify", m)); }
public ActionResult Verify(VerificationVm m) { if (ModelState.IsValid) { var save = new AccountVerifications().Create(m); if (save) { return(Json(new { status = 200, message = "Document Uploaded and Submited Successfull" }, JsonRequestBehavior.AllowGet)); } } IEnumerable <ModelError> errors = ModelState.Values.SelectMany(v => v.Errors).ToList(); return(Json(new { status = 400, errors = errors, message = "Check your entries" }, JsonRequestBehavior.AllowGet)); }
public ActionResult Verify(VerificationVm m) { if (ModelState.IsValid) { var save = new AccountVerifications().Create(m); if (save) { ViewBag.success = "Document submitted successfully, you will be notified via email when your has been approved"; //return Json(new { status = 200, message = "Document Uploaded and Submited Successfull" }, JsonRequestBehavior.AllowGet); } } return(View(m)); // IEnumerable<ModelError> errors = ModelState.Values.SelectMany(v => v.Errors).ToList(); // return Json(new { status = 400, errors = errors, message = "Check your entries" }, JsonRequestBehavior.AllowGet); }
public bool Create(VerificationVm m) { try { var save = context.CR_Verification.Add(new CR_Verification() { DocumentUrl = m.DocumentUrl, Status = VerificationStatus.PENDING.ToString(), VerificationType = m.VerificationType, CR_AccountId = m.CryptoAccountId }); context.SaveChanges(); savedAccountId = save.Id; return(true); } catch (Exception e) { return(true); } }