public ActionResult Verification() { var newVerification = new VerificationNew() { info = GlobalRes.VerificationInfo, proof = GlobalRes.VerificationProof }; return View(newVerification); }
public ActionResult Verification(VerificationNew newVerification) { if (ModelState.IsValid) { newVerification.owner = DataBase.Account.Get(Request.Cookies["access_token"].Value).ID; if (DataBase.Verifications.create(newVerification)) return View("VerificationSended"); } return View("Verification", newVerification); }
public static bool create(VerificationNew newVerification) { var newDBVerification = new verifications() { info = newVerification.info, proof = newVerification.proof, photo = newVerification.photo, owner = newVerification.owner, status = "new", type = newVerification.type, date = Time.UNIXNow() }; try { context.verifications.InsertOnSubmit(newDBVerification); return Save(); } catch (Exception exp) { } return false; }