Update 20210528 - mit LoginPopup

This commit is contained in:
2021-05-28 16:20:53 +02:00
parent 5dcd0d1046
commit a437ae0be4
172 changed files with 16125 additions and 103 deletions

View File

@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace sf1.Controllers
namespace App.Controllers
{
public class FormController : Controller
{

View File

@@ -5,9 +5,9 @@ using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using sf1.Models;
using App.Models;
namespace sf1.Controllers
namespace App.Controllers
{
public class HomeController : Controller
{

View File

@@ -0,0 +1,37 @@
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using APP.Models;
namespace APP.Controllers
{
public class LoginController : Controller
{
public IActionResult Index()
{
return View();
}
public IActionResult Login(LoginModel model)
{
App.Helper.HttpClientHelper httpcli = new App.Helper.HttpClientHelper();
string username = model.UserName;
string password = model.Password;
httpcli.CallService("user",username+','+password, "GET", null);
if (httpcli.Results.resultstatus==true && httpcli.Results.daten !="[]")
{
APP.Models.SessionClass.UserName = "AAA";
return Json(new { success = true });
}
else
{
return Json(new { error = "Kann nicht angemeldet werden!" });
};
return Json(new { error = "" });
}
}
}

View File

@@ -10,20 +10,18 @@ using Syncfusion.EJ2;
using BWPMModels;
using System.Collections;
using Syncfusion.EJ2.Base;
using sf1.Models;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using System.Reflection;
using App.Models;
namespace sf1.Controllers
namespace App.Controllers
{
public partial class UserController : Controller
{
private const string URL = "http://localhost/CoreWebAPI1/api/";
public IActionResult Index()
{
return View();
}
@@ -85,8 +83,6 @@ namespace sf1.Controllers
Helper.HttpClientHelper httpcli = new Helper.HttpClientHelper();
User u = new User();
u = value.value;
u.Teststring = "hallo";
u.aktiv = true;
httpcli.CallService("user", "", "POST", u);
if (httpcli.Results.resultstatuscode != "OK")
{
@@ -108,6 +104,8 @@ namespace sf1.Controllers
return Json(value);
}
}
}