Exemple #1
0
        public async Task <IActionResult> OnPostChangeEventAsync()
        {
            ODL = new ObjectDescriptionList();

            ChangeEvent CE = new ChangeEvent();

            CE.GameObjectID  = int.Parse(Request.Form["GameObjectID"]);
            ODL.GameObjectID = CE.GameObjectID;


            CE.ChangeEventType    = int.Parse(Request.Form["ChangeEventType"]);
            CE.ChangeText         = Request.Form["ChangeText"];
            CE.DescriptionID      = int.Parse(Request.Form["DescriptionID"]);
            CE.Enabled            = bool.Parse(Request.Form["Enabled"]);
            CE.EnabledChangedTo   = int.Parse(Request.Form["EnabledChangedTo"]);
            CE.ParentChangeTo     = int.Parse(Request.Form["ParentChangeTo"]);
            CE.ParentTypeChangeTo = int.Parse(Request.Form["ParentTypeChangeTo"]);
            CE.ShortDescription   = Request.Form["ShortDescription"];
            CE.StatusChangeTo     = int.Parse(Request.Form["StatusChangeTo"]);

            HttpResponseMessage result = await DS.PostAsync(CE, "bot/AddChangeEvent");

            string output = await result.Content.ReadAsStringAsync();

            SimpleResponse SR = JsonConvert.DeserializeObject <SimpleResponse>(output);

            if (SR.Response == "Saved")
            {
                Message = "Saved";
            }
            return(Page());
        }
Exemple #2
0
        public async Task <IActionResult> OnGetAsync()
        {
            string Response = await DS.GetAsync("bot/GetDescriptionsForObject/" + GameObjectID);

            ODL = JsonConvert.DeserializeObject <ObjectDescriptionList>(Response);


            return(Page());
        }