public async Task <IActionResult> Edit(string id, [Bind("ID,user_id,create_time,age,flexible_num")] FlexibleAbility flexibleAbility)
        {
            if (id != flexibleAbility.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(flexibleAbility);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!FlexibleAbilityExists(flexibleAbility.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(flexibleAbility));
        }
            public FlexibleList()
            {
                this.lastFlexible = new FlexibleAbility();

                this.list = new List <FlexibleAbility>();

                this.timelist = new List <string>();

                this.numlist = new List <string>();
            }
        public async Task <IActionResult> Create([Bind("ID,user_id,create_time,flexible_num")] FlexibleAbility flexibleAbility)
        {
            flexibleAbility.flexible_score = flexibleAbility.flexible_num * 4 + 60;



            flexibleAbility.create_time = DateTime.Now;
            _context.Add(flexibleAbility);
            await _context.SaveChangesAsync();

            Result res = new Result();

            res.num = flexibleAbility.flexible_score.ToString();

            JsonResult result = Json(res);

            return(result);
        }