public IActionResult Create(string postername, string posterphone, string posteremail, string posterqq, string posterschool, string problemtype, string problemdetail, string location, string bookdate, string captchaText, string captchaToken, [FromServices] IServiceState serviceState)
        {
            if (!serviceState.AllowCreate)
            {
                return(RedirectToAction(nameof(ServiceNotAvailable)));
            }

            string _postername  = postername ?? "";
            string _posterphone = posterphone ?? "";
            string _posteremail = posteremail ?? "";
            string _posterqq    = posterqq ?? "";

            if (!IsCaptchaValidate(captchaText, captchaToken))
            {
                ViewData["CaptchaError"]  = true;
                ViewData["Name"]          = _postername;
                ViewData["Phone"]         = _posterphone;
                ViewData["Email"]         = _posteremail;
                ViewData["QQ"]            = _posterqq;
                ViewData["ProblemDetail"] = problemdetail;
                ViewData["School"]        = posterschool;
                ViewData["ProblemType"]   = problemtype;
                ViewData["Location"]      = location;
                ViewData["BookDate"]      = bookdate;
                ViewData["SchoolTypes"]   = db.SchoolTypes.OrderBy(type => type.Id);
                ViewData["ProblemTypes"]  = db.ProblemTypes.OrderBy(type => type.Id);
                ViewData["LocationTypes"] = db.LocationTypes.OrderBy(type => type.Id);
                return(View());
            }

            DateTime _reservationDate;
            DateTime now = DateTimeHelper.GetBeijingTime();

            SchoolType   _schoolType   = db.SchoolTypes.FirstOrDefault(item => item.Name == posterschool);
            ProblemType  _problemType  = db.ProblemTypes.FirstOrDefault(item => item.Name == problemtype);
            LocationType _locationType = db.LocationTypes.FirstOrDefault(item => item.Name == location);

            if (_schoolType != null && _problemType != null && _locationType != null &&
                DateTime.TryParse(bookdate, out _reservationDate) == true)
            {
                _reservationDate = new DateTime(_reservationDate.Year, _reservationDate.Month, _reservationDate.Day, 23, 59, 59);
                ReservationDetail detail = new ReservationDetail()
                {
                    PosterName          = _postername,
                    PosterPhone         = _posterphone,
                    PosterEmail         = _posteremail,
                    PosterQQ            = _posterqq,
                    PosterSchoolType    = _schoolType,
                    LocationType        = _locationType,
                    ProblemType         = _problemType,
                    Detail              = problemdetail,
                    ActionDate          = now,
                    CreateDate          = now,
                    ModifiedDate        = now,
                    ReservationDate     = _reservationDate,
                    State               = ReservationState.NewlyCreated,
                    LastUpdatedLanguage = cultureContext.Culture.Language
                };
                EntityEntry <ReservationDetail> entry = db.ReservationDetails.Add(detail);
                db.SaveChanges();
                smsService.SendCreationSuccessAsync(entry.Entity, cultureContext.Culture);
                smsService.SendReservationCreatedAsync(entry.Entity);
                TempData["id"]       = entry.Entity.Id.ToString();
                TempData["phone"]    = entry.Entity.GetShortenPhone();
                TempData["showhint"] = true;
                return(RedirectToAction(nameof(Detail)));
            }
            else
            {
            }
            return(View());
        }