Update nach BlazorApp Berufe
This commit is contained in:
1 parent
a437ae0be4
commit
93e3957702
4853 files changed
+9820723
-2369
No files matched your search
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace App.Models
|
||||
{
|
||||
public class ICRUDModel<T> where T : class
|
||||
{
|
||||
public string action { get; set; }
|
||||
|
||||
public string table { get; set; }
|
||||
|
||||
public string keyColumn { get; set; }
|
||||
|
||||
public object key { get; set; }
|
||||
|
||||
public T value { get; set; }
|
||||
|
||||
public List<T> added { get; set; }
|
||||
|
||||
public List<T> changed { get; set; }
|
||||
|
||||
public List<T> deleted { get; set; }
|
||||
|
||||
public IDictionary<string, object> @params { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace App.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Models
|
||||
{
|
||||
public class LoginModel
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using BWPMModels;
|
||||
|
||||
|
||||
namespace App.Models
|
||||
{
|
||||
public class AppMenuItem
|
||||
{
|
||||
|
||||
public string id { get; set; }
|
||||
public string text { get; set; }
|
||||
public string parentId { get; set; }
|
||||
public string url { get; set; }
|
||||
|
||||
//public static List<AppMenuItem> MenuItems(string usertype)
|
||||
public static List<object> MenuItems(string usertype)
|
||||
{
|
||||
|
||||
|
||||
Helper.HttpClientHelper httpcli = new Helper.HttpClientHelper();
|
||||
httpcli.CallService("MenuItem", usertype, "GET", null);
|
||||
if (httpcli.Results.resultstatus == true)
|
||||
{
|
||||
List<object> mis = new List<object>();
|
||||
List<BWPMModels.MenuItem> menus = JsonConvert.DeserializeObject<List<BWPMModels.MenuItem>>(httpcli.Results.daten);
|
||||
//List<AppMenuItem> mis = new List<AppMenuItem>();
|
||||
|
||||
//mis.Add (new AppMenuItem { id = "1", text = "Text 1", parentId = "", url = "Home" });
|
||||
//mis.Add(new AppMenuItem { id = "2", text = "Text 2", parentId = "1", url = "Form" });
|
||||
//mis.Add(new AppMenuItem { id = "3", text = "Text3", parentId = "null", url = "" });
|
||||
//return mis;
|
||||
|
||||
foreach (BWPMModels.MenuItem item in menus)
|
||||
{
|
||||
mis.Add(new AppMenuItem { id = item.ID, text = item.text, parentId = item.parentId, url = item.url });
|
||||
}
|
||||
|
||||
return mis;
|
||||
}
|
||||
|
||||
//ViewBag.DataSource = users;
|
||||
|
||||
//menus.Add(new MenuItem { id = "1", text = "Text 1", parentId = "", url="Home" });
|
||||
//menus.Add(new MenuItem { id = "2", text = "Text 2", parentId = "1", url="Form"});
|
||||
//menus.Add(new MenuItem { id = "3", text = "Text3", parentId = "null",url="" });
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user