Update nach Anpassung

PADM
Stefan Hutter 4 years ago
parent 7e79695c18
commit adde479570

Binary file not shown.

@ -28,8 +28,8 @@
"C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {}, "C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {},
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {}, "C:\\Program Files\\dotnet\\library-packs": {},
"http://nuget.grapecity.com/nuget": {}, "E:\\Software-Projekte\\_NugetPackages": {},
"https://api.nuget.org/v3/index.json": {} "http://nuget.grapecity.com/nuget": {}
}, },
"frameworks": { "frameworks": {
"netcoreapp3.1": { "netcoreapp3.1": {

@ -35,8 +35,8 @@
"C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {}, "C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {},
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {}, "C:\\Program Files\\dotnet\\library-packs": {},
"http://nuget.grapecity.com/nuget": {}, "E:\\Software-Projekte\\_NugetPackages": {},
"https://api.nuget.org/v3/index.json": {} "http://nuget.grapecity.com/nuget": {}
}, },
"frameworks": { "frameworks": {
"netcoreapp3.1": { "netcoreapp3.1": {

@ -1,6 +1,6 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "5lKLlOD+6qMd+AiatDvYNY7hRK2l0HpmF7DFerbhpj+Si30ZlxMLXbQWIfwjNrAw7oBHHUlZ/yfQbdMlwcfDNw==", "dgSpecHash": "std4UYPs221hI7vR2vhPUbP+DIYsOyBLiOWEcs0m0l5U2Xi32ZS9gqOQx1tOV03BtaSlQBX2gXL9U+CUh2hJwQ==",
"success": true, "success": true,
"projectFilePath": "E:\\Software-Projekte\\DPM\\DPM2016\\CryptoTest\\CryptoTest.csproj", "projectFilePath": "E:\\Software-Projekte\\DPM\\DPM2016\\CryptoTest\\CryptoTest.csproj",
"expectedPackageFiles": [], "expectedPackageFiles": [],

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Binary file not shown.

@ -0,0 +1,160 @@
using DPMService.Models;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Data;
using SecuringWebApiUsingApiKey.Attributes;
using DPMService.Models;
using System.Security.Cryptography;
using System.IO;
using System.Text;
namespace DPMService.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class Service_View_PatController : ControllerBase
{
private string tblpraefix = "";
private string tblname = "";
private string apikey = "";
private string secretkey = "";
private string tablename = "Patient";
private void GetKeys()
{
apikey = get_headerinfo("ApiKey");
secretkey = get_headerinfo("SecKey");
dbhelper dbh = new dbhelper();
tblpraefix = dbh.Get_TablePraefix(apikey);
}
private string get_headerinfo(string headertype)
{
Microsoft.Extensions.Primitives.StringValues headerValues;
var headerinfo = string.Empty;
if (Request.Headers.TryGetValue(headertype, out headerValues))
{
headerinfo = headerValues.FirstOrDefault();
return headerinfo;
}
else
{ return ""; };
}
private string get_sql(string sql) {
string tmpsql = sql;
if (tblpraefix != "") tmpsql=tmpsql.Replace(tablename, tblpraefix + tablename);
if (secretkey != "") tmpsql=tmpsql.Replace("&seckey&", secretkey);
return tmpsql;
}
// GET: api/<Service_View_PatController>
[HttpGet]
public List<Service_View_Pat> Get()
{
dbhelper dbh = new dbhelper();
List<Service_View_Pat> list = new List<Service_View_Pat>();
return dbh.ConvertDataTable<Service_View_Pat>(dbh.Get_Tabledata("Select * from [Service_View_Pat]", false, true));
}
// GET api/<Service_View_PatController>/5
[HttpGet("{id}")]
public List<Service_View_Pat> Get(int id)
{
dbhelper dbh = new dbhelper();
List<Service_View_Pat> list = new List<Service_View_Pat>();
return dbh.ConvertDataTable<Service_View_Pat>(dbh.Get_Tabledata(string.Concat("Select * from [Service_View_Pat] where id=", id.ToString()), false, true));
}
[HttpGet]
[Route("search/{searchstring}")]
public List<Service_View_Pat> Get(string searchstring)
{
//Models.Crypto enc = new Models.Crypto();
dbhelper dbh = new dbhelper();
dbh.Get_Tabeldata_for_Update("Select top 1 * from PatChargeLog where id=-1", false, true);
DataRow dr = dbh.dsdaten.Tables[0].NewRow();
//dr[1] = namefilterenc;
dbh.dsdaten.Tables[0].Rows.Add(dr);
dbh.Update_Tabeldata();
dbh.dsdaten.Tables.Clear();
List<Patient> Details = new List<Patient>();
return dbh.ConvertDataTable<Service_View_Pat>(dbh.Get_Tabledata("Select * from [Service_View_Pat] where pat like '%" + searchstring + "%' order by pat", false, true));
}
// POST api/<Service_View_PatController>
[HttpPost]
public void Post([FromBody] Service_View_Pat Patient)
{
GetKeys();
dbhelper dbh = new dbhelper();
string sql = "Insert [Patient] (id,pat) values(" + Patient.ID.ToString() + ",dbo.encrypt('&seckey&','" + Patient.Pat + "'))";
dbh.Get_Tabledata(get_sql(sql), false, true);
}
[HttpPost("{id},{charge}")]
public void Post(string id, string charge)
{
dbhelper dbh = new dbhelper();
dbh.Get_Tabeldata_for_Update("Select top 1 * from [Patient] where id=-1", false, true);
DataRow dr = dbh.dsdaten.Tables[0].NewRow();
dr[1] = id;
dr[2] = charge.ToString();
dr[3] = DateTime.Now;
dr[4] = DateTime.Now;
dr[5] = 1;
dr[6] = true;
dbh.dsdaten.Tables[0].Rows.Add(dr);
dbh.Update_Tabeldata();
}
// PUT api/<Service_View_PatController>/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] Service_View_Pat Service_View_Pat)
{
dbhelper dbh = new dbhelper();
dbh.Get_Tabeldata_for_Update("Select top 1 * from Patient where id=" + id.ToString(), false, true);
DataRow dr = dbh.dsdaten.Tables[0].Rows[0];
Service_View_Pat.GetType().GetProperties().ToList().ForEach(f =>
{
try
{
if (f.PropertyType == typeof(DateTime))
{
dr[f.Name] = (DateTime)f.GetValue(Service_View_Pat, null);
}
else
{
dr[f.Name] = f.GetValue(Service_View_Pat, null);
}
}
catch (Exception ex) { string s = ex.Message; }
});
dbh.Update_Tabeldata();
}
// DELETE api/<Service_View_PatController>/5
[HttpDelete("{id}")]
public void Delete(int id)
{
dbhelper dbh = new dbhelper();
dbh.Get_Tabeldata_for_Update("Select top 1 * from [patient] where id=" + id, false, true);
DataRow dr = dbh.dsdaten.Tables[0].Rows[0];
dr["Aktiv"] = false;
dr["mutiert_am"] = DateTime.Now;
dbh.Update_Tabeldata();
}
}
}

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace DPMService.Models
{
public class Service_View_Pat
{
public int ID
{
get;
set;
}
public string Pat { get; set; } = "";
public Service_View_Pat()
{
}
}
}

@ -7,8 +7,7 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
//"DBConnection": "Server=shu00;Database=dpm_dentis;user=sa;password=*shu29;MultipleActiveResultSets=true", "DBConnection": "Server=shu00;Database=dpm_dentis;user=sa;password=*shu29;MultipleActiveResultSets=true"
"DBConnection": "Server=shu00;Database=dpm_mobile;user=sa;password=*shu29;MultipleActiveResultSets=true"
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"ApiKey": "BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9n,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9nX,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9ny", "ApiKey": "BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9n,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9nX,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9ny",

@ -7,8 +7,7 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
//"DBConnection": "Server=shu00;Database=dpm_dentis;user=sa;password=*shu29;MultipleActiveResultSets=true", "DBConnection": "Server=shu00;Database=dpm_dentis;user=sa;password=*shu29;MultipleActiveResultSets=true"
"DBConnection": "Server=shu00;Database=dpm_mobile;user=sa;password=*shu29;MultipleActiveResultSets=true"
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"ApiKey": "BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9n,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9nX,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9ny", "ApiKey": "BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9n,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9nX,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9ny",

@ -28,8 +28,8 @@
"C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {}, "C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {},
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {}, "C:\\Program Files\\dotnet\\library-packs": {},
"http://nuget.grapecity.com/nuget": {}, "E:\\Software-Projekte\\_NugetPackages": {},
"https://api.nuget.org/v3/index.json": {} "http://nuget.grapecity.com/nuget": {}
}, },
"frameworks": { "frameworks": {
"netcoreapp3.1": { "netcoreapp3.1": {

@ -1 +1 @@
5d2f54d90d3c73dff8703ca9db97497e623cfbbf 653db3b1fa3441e72cc838c21de0fb29425ae3c4

@ -5917,8 +5917,8 @@
"C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {}, "C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {},
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {}, "C:\\Program Files\\dotnet\\library-packs": {},
"http://nuget.grapecity.com/nuget": {}, "E:\\Software-Projekte\\_NugetPackages": {},
"https://api.nuget.org/v3/index.json": {} "http://nuget.grapecity.com/nuget": {}
}, },
"frameworks": { "frameworks": {
"netcoreapp3.1": { "netcoreapp3.1": {

@ -1,6 +1,6 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "ZZqSaGxdmNHxaESFJehR/kS0eWzEy/tsmbLLF1/X+vJp3aqgeLQYRnBk48arIgni9F9skp5uUv7zVBAwYcw/bA==", "dgSpecHash": "aKo8hPvHHJpB46Fc87nVRkm/U0yW6cgBpvaMCh8gjxsDtjwuhLA6cKHTWhx8B3nFkgwuPeo6ViA6HtzkTDvu6w==",
"success": true, "success": true,
"projectFilePath": "E:\\Software-Projekte\\DPM\\DPM2016\\WebAPI\\DPMService.csproj", "projectFilePath": "E:\\Software-Projekte\\DPM\\DPM2016\\WebAPI\\DPMService.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [

Loading…
Cancel
Save