Beispiel #1
0
        public IActionResult Select(string normal, string hard, string workSequences, string inputOrganization, string power, string current, string speed, string cos, string problem, string email)
        {
            string captchaResponse           = HttpContext.Request.Form["g-Recaptcha-Response"];
            ReCaptchaValidationResult result = ReCaptchaValidator.IsValid(captchaResponse);

            if (!result.Success)
            {
                return(RedirectToAction("Index"));
            }
            _emailService.SendSelect(normal, hard, workSequences, inputOrganization, power, current, speed, cos, problem, email);
            return(RedirectToAction("SuccessSelect"));
        }
Beispiel #2
0
        public async Task <IActionResult> Order(string name, string org, string post, string email, string phone, int lineId)
        {
            string captchaResponse           = HttpContext.Request.Form["g-Recaptcha-Response"];
            ReCaptchaValidationResult result = ReCaptchaValidator.IsValid(captchaResponse);

            if (!result.Success)
            {
                return(RedirectToAction("Index"));
            }
            ModelLine line = await _modelLineService.GetAsync(p => p.Id == lineId);

            _emailService.SendOrder(name, org, post, email, phone, line);
            return(RedirectToAction("SuccessOrder", new { name = line.Name }));
        }
        public async Task <IActionResult> SendConfigurationRefs(string email, string phone,
                                                                string teSys1FullRef, string teSys1CircuitBreakersRef, string teSys1CoilRef, string teSys1ContactorRef,
                                                                string teSys2FullRef, string teSys2CircuitBreakersRef, string teSys2CoilRef, string teSys2ContactorRef)
        {
            string captchaResponse           = HttpContext.Request.Form["g-Recaptcha-Response"];
            ReCaptchaValidationResult result = ReCaptchaValidator.IsValid(captchaResponse);

            if (!result.Success)
            {
                return(RedirectToAction("Index"));
            }
            _emailService.SendConfigurationRefs(email, phone,
                                                teSys1FullRef, teSys1CircuitBreakersRef, teSys1CoilRef, teSys1ContactorRef,
                                                teSys2FullRef, teSys2CircuitBreakersRef, teSys2CoilRef, teSys2ContactorRef);
            return(RedirectToAction("Success"));
        }