示例#1
0
        public ActionResult Verify()
        {
            var m = new VerificationVm
            {
                CryptoAccountId = AccountId()
            };

            return(View("Verify", m));
        }
示例#2
0
        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));
        }
示例#3
0
        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);
        }
示例#4
0
 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);
     }
 }