Update vor Clone

This commit is contained in:
2021-12-18 11:01:04 +01:00
parent 70148e63ce
commit c05d1ac4e2
612 changed files with 72932 additions and 2064 deletions

View File

@@ -27,6 +27,18 @@ namespace BlazorApp.Controller
return dbh.ConvertDataTable<AspNetUsers>(dbh.dsdaten.Tables[0]);
}
public static List<AspNetUsers> GetByUserName(string UserName)
{
dbhelper dbh = new dbhelper();
dbh.Get_Tabledata("Select * from AspNetUsers where UserName='" + UserName+"'", false, true);
return dbh.ConvertDataTable<AspNetUsers>(dbh.dsdaten.Tables[0]);
}
public static List<AspNetUsers> GetByEMail(string EMail)
{
dbhelper dbh = new dbhelper();
dbh.Get_Tabledata("Select * from AspNetUsers where EMail='" + EMail + "'", false, true);
return dbh.ConvertDataTable<AspNetUsers>(dbh.dsdaten.Tables[0]);
}
public static List<AspNetUsers> GetLast()
{
dbhelper dbh = new dbhelper();
@@ -50,7 +62,7 @@ namespace BlazorApp.Controller
public static void POST(AspNetUsers AspNetUsersdata)
{
dbhelper dbh = new dbhelper();
dbh.Get_Tabeldata_for_Update("Select top 1 * from [AspNetUsers] where id=-1", false, true);
dbh.Get_Tabeldata_for_Update("Select top 1 * from [AspNetUsers] where id='-1'", false, true);
DataRow dr = dbh.dsdaten.Tables[0].NewRow();
AspNetUsersdata.GetType().GetProperties().ToList().ForEach(f =>
{
@@ -59,7 +71,6 @@ namespace BlazorApp.Controller
if (f.PropertyType == typeof(DateTime))
{
dr[f.Name] = (DateTime)f.GetValue(AspNetUsersdata, null);
}
else
{
@@ -68,6 +79,7 @@ namespace BlazorApp.Controller
}
catch (Exception ex) { string s = ex.Message; }
});
dbh.dsdaten.Tables[0].Rows.Add(dr);
dbh.Update_Tabeldata();