コード例 #1
0
        public ActionResult Submit(Models.FormData formData)
        {
            // extra validation
            if (!ModelState.IsValid)
            {
                return(View("Index"));
            }


            // generate external reference from [Agency Code][Batch Number]-[Sequence Number]-[Date]-[Gift Suffix]

            // generate external reference data source, set to the Agency Code

            // generate source, a 9 digit code relating to the campaign that elicited the response



            _context.Add(formData);
            var id = formData;

            _context.SaveChanges();
            formData.Signature = DataHelper.SaveSignature(formData.FormDataId, formData.Signature);
            _context.Update(formData);
            _context.SaveChanges();

            return(Ok());
        }
コード例 #2
0
 public IActionResult Form(Form f)
 {
     if (ModelState.IsValid)
     {
         _context.Add(f);
         _context.SaveChanges();
     }
     return(View(f));
 }