Example #1
0
        public static async Task <string[]> MainAsync()
        {
            RestClient.SetDomain("https://*****:*****@gmail.com",
                FName           = $"Name{random}",
                LName           = $"LName{random}",
                Password        = $"Password{random}",
                ConfirmPassword = $"Password{random}"
            });


            ThingDto dto = things.Get(1);

            dto.Household = households.Get(dto.HouseholdId);
            Console.WriteLine(JsonConvert.SerializeObject(dto));


            //      dto = complete thing, ready for use


            return("Oi");
        }
        public ThingCreatePage(MainWindow mainWindow)
        {
            if (thingRest == null)
            {
                thingRest = new ThingRest();
            }

            InitializeComponent();
            this.mainWindow = mainWindow;
        }
Example #3
0
        public ThingPage(MainWindow thingWindow)
        {
            if (thingRest == null)
            {
                thingRest = new ThingRest();
            }

            InitializeComponent();
            List <ThingDto> things = new List <ThingDto>();

            fillThingsList();
            this.mainWindow = thingWindow;
        }
Example #4
0
        public ThingUpdatePage(MainWindow mainWindow)
        {
            if (thingRest == null)
            {
                thingRest = new ThingRest();
            }

            InitializeComponent();
            this.mainWindow = mainWindow;

            currentThing              = thingRest.Get(mainWindow.currentId);
            nameTextBox.Text          = currentThing.Name;
            defaultPriceTextBox.Text  = currentThing.DefaultPrice.ToString();
            neededCheckBox.IsChecked  = currentThing.Needed;
            householdIdTextBlock.Text = currentThing.HouseholdId.ToString();
        }