37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using BWPMModels;
|
|
using BlazorApp.Helper;
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
namespace BlazorApp.Controller
|
|
{
|
|
public class SchulhausController
|
|
{
|
|
public static List<Schulhaus> GetAllData()
|
|
{
|
|
Helper.HttpClientHelper httpcli = new Helper.HttpClientHelper();
|
|
httpcli.CallService("Schulhaus", "", "GET", null);
|
|
return JsonConvert.DeserializeObject<List<Schulhaus>>(httpcli.Results.daten);
|
|
|
|
}
|
|
|
|
public static void savedata(Schulhaus Schulhausdata)
|
|
{
|
|
Helper.HttpClientHelper httpcli = new Helper.HttpClientHelper();
|
|
httpcli.CallService("Schulhaus", Schulhausdata.ID.ToString(), "PUT", Schulhausdata);
|
|
|
|
}
|
|
public static void InsertData(Schulhaus Schulhausdata)
|
|
{
|
|
Helper.HttpClientHelper httpcli = new Helper.HttpClientHelper();
|
|
httpcli.CallService("Schulhaus", "", "POST", Schulhausdata);
|
|
|
|
}
|
|
|
|
}
|
|
}
|