public async Task <IActionResult> OnGetAsync()
        {
            string result = await DS.GetAsync("bot/GetScheduleEventForEdit/" + id);

            SEFE = JsonConvert.DeserializeObject <ScheduleEventForEdit>(result);



            return(Page());
        }
        public async Task <IActionResult> OnPostScheduleAsync()
        {
            ScheduleEventForEdit UpdatedSEFE = new ScheduleEventForEdit();

            ScheduleEvent SE = new ScheduleEvent();

            SE.ScheduleEventID       = int.Parse(Request.Form["ScheduleEventID"]);
            SE.MinutesToAddOnTrigger = int.Parse(Request.Form["MinutesToAddOnTrigger"]);
            string s = Request.Form["Ended"];

            if (s == "on")
            {
                SE.Ended = true;
            }
            else
            {
                SE.Ended = false;
            }

            SE.GameID                        = int.Parse(Request.Form["GameID"]);
            SE.NextTrigger                   = DateTime.Parse(Request.Form["NextTrigger"]);
            SE.Notes                         = Request.Form["Notes"];
            SE.NumberOfTimesToTrigger        = int.Parse(Request.Form["NumberOfTimesToTrigger"]);
            SE.NumberOfTimesTriggered        = int.Parse(Request.Form["NumberOfTimesTriggered"]);
            SE.ScheduelID                    = int.Parse(Request.Form["ScheduelID"]);
            UpdatedSEFE.SE                   = SE;
            UpdatedSEFE.IncludedChangeEvents = Request.Form["IDList"].ToString().Trim();

            //string response = await DS.PutAsyncString(UpdatedSEFE, "bot/UpdateScheduleEvent");
            // SimpleResponse SR = JsonConvert.DeserializeObject<SimpleResponse>(response);

            SimpleResponse SR = JsonConvert.DeserializeObject <SimpleResponse>(await DS.PutAsyncString(UpdatedSEFE, "bot/UpdateScheduleEvent"));

            SEFE = JsonConvert.DeserializeObject <ScheduleEventForEdit>(await DS.GetAsync("bot/GetScheduleEventForEdit/" + id));
            return(Page());
        }