コード例 #1
0
ファイル: AccountController.cs プロジェクト: kioltk/mvc
 public ActionResult Verification()
 {
     var newVerification = new VerificationNew()
     {
         info = GlobalRes.VerificationInfo,
         proof = GlobalRes.VerificationProof
     };
     return View(newVerification);
 }
コード例 #2
0
ファイル: AccountController.cs プロジェクト: kioltk/mvc
 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);
 }
コード例 #3
0
ファイル: DataBase.cs プロジェクト: kioltk/mvc
 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;
 }