Update vor Blazorise
This commit is contained in:
@@ -115,7 +115,14 @@ namespace BlazorApp.Controller
|
||||
public static List<Beruf> GetBerufsangebot()
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabledata("Select Beruf.* from dbo.FirmaBeruf INNER JOIN dbo.Firma ON dbo.FirmaBeruf.ID = dbo.Firma.ID INNER JOIN dbo.Beruf ON dbo.FirmaBeruf.ID = dbo.Beruf.ID WHERE(dbo.Beruf.aktiv = 1) AND(dbo.FirmaBeruf.aktiv = 1) AND(dbo.Firma.aktiv = 1) AND(dbo.Firma.aktuell = 1)", false, true);
|
||||
string sql = "";
|
||||
sql = "SELECT dbo.Beruf.ID, dbo.Beruf.bezeichnung, dbo.Beruf.lehrjahre, dbo.Beruf.anmerkung, dbo.Beruf.beschreibung, dbo.Beruf.klasseNr, dbo.Beruf.aktiv, dbo.Beruf.erstellt_am, dbo.Beruf.mutiert_am, dbo.Beruf.mutierer,";
|
||||
sql += "dbo.Beruf.mandantnr ";
|
||||
sql += "FROM dbo.FirmaBeruf INNER JOIN ";
|
||||
sql += "dbo.Firma ON dbo.FirmaBeruf.firmaID = dbo.Firma.ID INNER JOIN ";
|
||||
sql += "dbo.Beruf ON dbo.FirmaBeruf.berufID = dbo.Beruf.ID ";
|
||||
sql += "WHERE(dbo.Beruf.aktiv = 1) AND(dbo.FirmaBeruf.aktiv = 1) AND(dbo.Firma.aktiv = 1) AND(dbo.Firma.aktuell = 1)";
|
||||
dbh.Get_Tabledata(sql, false, true);
|
||||
return dbh.ConvertDataTable<Beruf>(dbh.dsdaten.Tables[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,13 @@ namespace BlazorApp.Controller
|
||||
dbh.Get_Tabledata("Select * from Firmaberuf where aktiv=1 and firmaid=" + ID.ToString(), false, true);
|
||||
return dbh.ConvertDataTable<Firmaberuf>(dbh.dsdaten.Tables[0]);
|
||||
}
|
||||
|
||||
public static List<Firmaberuf> GetAllAktiveByAnsprechpartnerID(int ID)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabledata("Select * from Firmaberuf where aktiv=1 and ansprechpartnerid=" + ID.ToString(), false, true);
|
||||
return dbh.ConvertDataTable<Firmaberuf>(dbh.dsdaten.Tables[0]);
|
||||
}
|
||||
public static List<Firmaberuf> GetLast()
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
|
||||
@@ -106,11 +106,32 @@ namespace BlazorApp.Controller
|
||||
|
||||
}
|
||||
|
||||
public static DataTable Klassenpruefung_Schueler(int KlasseID)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
DataTable spparams = new DataTable();
|
||||
spparams.Columns.Clear();
|
||||
spparams.Rows.Clear();
|
||||
spparams.Columns.Add("Paramname");
|
||||
spparams.Columns.Add("Paramvalue");
|
||||
|
||||
DataRow paramdata = spparams.NewRow();
|
||||
paramdata[0] = "Param1";
|
||||
paramdata[1] = KlasseID.ToString();
|
||||
|
||||
|
||||
return dbh.Get_Tabledata("chkklasse", true, false, spparams);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void DELETE(Klasse Klassedata)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabeldata_for_Update("delete from [Klasse] where id=" + Klassedata.ID.ToString(), false, true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -67,6 +67,41 @@ namespace BlazorApp.Controller
|
||||
|
||||
}
|
||||
|
||||
public static int Get_Anzahl(int SchuelerID)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabledata("Select count(*) from schuelerberuf where aktiv=1 and schuelerid=" + SchuelerID.ToString(), false, true);
|
||||
if (dbh.dsdaten.Tables[0].Rows.Count == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Convert.ToInt32(dbh.dsdaten.Tables[0].Rows[0][0]);
|
||||
}
|
||||
}
|
||||
|
||||
public static Boolean Has_Prio1(int SchuelerID)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabledata("Select count(*) from schuelerberuf where prioritaet=1 and aktiv=1 and schuelerid=" + SchuelerID.ToString(), false, true);
|
||||
if (dbh.dsdaten.Tables[0].Rows.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dbh.dsdaten.Tables[0].Rows[0][0].ToString() == "0")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int POST(SchuelerBeruf SchuelerBerufdata)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
|
||||
38
BlazorApp/Controller/Views/View_BerufsangebotController.cs
Normal file
38
BlazorApp/Controller/Views/View_BerufsangebotController.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BWPMModels;
|
||||
using BlazorApp.Helper;
|
||||
using Newtonsoft.Json;
|
||||
using System.Data;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace BlazorApp.Controller
|
||||
|
||||
{
|
||||
|
||||
public class View_BerufsangebotController : ControllerBase
|
||||
{
|
||||
public static List<View_Berufsangebot> GetAllData()
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabledata("Select * from View_Berufsangebot", false, true);
|
||||
return dbh.ConvertDataTable<View_Berufsangebot>(dbh.dsdaten.Tables[0]);
|
||||
}
|
||||
|
||||
public static List<View_Berufsangebot> GetByID(int ID)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabledata("Select * from View_Berufsangebot where id=" + ID.ToString(), false, true);
|
||||
return dbh.ConvertDataTable<View_Berufsangebot>(dbh.dsdaten.Tables[0]);
|
||||
}
|
||||
|
||||
public static List<View_Berufsangebot> GetByFirmaID(int ID)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabledata("Select * from View_Berufsangebot where firmaid=" + ID.ToString(), false, true);
|
||||
return dbh.ConvertDataTable<View_Berufsangebot>(dbh.dsdaten.Tables[0]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user