Beispiel #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());
        }
 [HttpPost] //Dashboard data request
 public string FormTwo(Models.FormData formData)
 {
     if (formData.TextBoxStringData == "dashboards")
     {
         System.Diagnostics.Debug.WriteLine("rendering dashboard");
         return(SQLGetter.GetDashData());
     }
     if (formData.TextBoxStringData == "spreadsheets")
     {
         System.Diagnostics.Debug.WriteLine("rendering collections");
         return(SQLGetter.GetCollectionData());
     }
     if (formData.TextBoxStringData == "deployments")
     {
         System.Diagnostics.Debug.WriteLine("rendering deployments");
         return(SQLGetter.GetDeploymentData());
     }
     if (formData.TextBoxStringData == "reloadData")
     {
         SQLGetter.GetSCCM();
         SQLGetter.GetEPO();
         SQLGetter.GetSCSM();
         return("success");
     }
     return("");
 }
        [HttpPost] //Search request
        public string FormOne(Models.FormData formData)
        {
            System.Diagnostics.Debug.WriteLine("searching for: " + formData.TextBoxStringData);
            SQLGetter.Search(formData.TextBoxStringData);
            string ADInfo = ADGetter.parseData(formData.TextBoxStringData);

            return("<br><strong><span style='color:#2c86d4'>Active Directory</span></strong>" + ADInfo + "<strong><span style='color:#2c86d4'>System Center Configuration Manager</span></strong>" + SQLGetter.SCCMTableString + "<strong><span style='color:#2c86d4'>McAfee ePolicy Orchestrator</span></strong>" + SQLGetter.EPOTableString + "<strong><span style='color:#2c86d4'>System Center Service Manager</span></strong>" + SQLGetter.SCSMTableString);
        }
Beispiel #4
0
        public IActionResult Index(Models.FormData sm)
        {
            ViewBag.email    = sm.email;
            ViewBag.password = sm.password;
            //Console.WriteLine(sm.email + " " + sm.password);
            //tak debugowac
            Debug.WriteLine(sm.email + " " + sm.password);

            return(View());
        }
 public ActionResult RegisterForm(Models.FormData formData)
 {
     if (formData.isNew())
     {
         Session["Email"] = formData.Email;
         return(RedirectToAction("Index", "Registration"));
     }
     else
     {
         TempData["RegisterMessage"] = formData.Message;
         return(RedirectToAction("Index", "Auth"));
     }
 }
 public ActionResult LoginForm(Models.FormData formData)
 {
     if (formData.IsValid())
     {
         Session["Email"]     = formData.Email;
         Session["FirstName"] = formData.FirstName;
         return(RedirectToAction("StudentPage", "Student"));
     }
     else
     {
         TempData["LoginMessage"] = formData.Message;
         return(RedirectToAction("Index", "Auth"));
     }
 }
        public ActionResult TwilioMessageData(Models.FormData formData)
        {
            string accountSid = "AC6300bd895a5a9838a6812e7292d004a2";
            string authToken  = "316ec6e2de703f89efa8fcf9cd56e927";

            TwilioClient.Init(accountSid, authToken);

            var message = MessageResource.Create(
                body: formData.TextBoxStringData,
                from: new Twilio.Types.PhoneNumber("whatsapp:+14155238886"),
                to: new Twilio.Types.PhoneNumber("whatsapp:+17875257664")
                );


            return(View("~/Views/Home/Index.cshtml"));
        }
 public void FormFour(Models.FormData formData)
 {
     //Do something with formData
 }
 public void FormThree(Models.FormData formData)
 {
     //Do something with formData
 }