Update 20231016
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
WebAPI/.vs/DPMService/v17/TestStore/0/000.testlog
Normal file
BIN
WebAPI/.vs/DPMService/v17/TestStore/0/000.testlog
Normal file
Binary file not shown.
BIN
WebAPI/.vs/DPMService/v17/TestStore/0/testlog.manifest
Normal file
BIN
WebAPI/.vs/DPMService/v17/TestStore/0/testlog.manifest
Normal file
Binary file not shown.
BIN
WebAPI/.vs/ProjectEvaluation/dpmservice.metadata.v6.1
Normal file
BIN
WebAPI/.vs/ProjectEvaluation/dpmservice.metadata.v6.1
Normal file
Binary file not shown.
BIN
WebAPI/.vs/ProjectEvaluation/dpmservice.projects.v6.1
Normal file
BIN
WebAPI/.vs/ProjectEvaluation/dpmservice.projects.v6.1
Normal file
Binary file not shown.
@@ -1,124 +1,113 @@
|
||||
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;
|
||||
|
||||
namespace DPMService.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
|
||||
public class PatChargeController : ControllerBase
|
||||
{
|
||||
|
||||
|
||||
|
||||
// GET: api/<PatChargeController>
|
||||
[HttpGet]
|
||||
public List<PatCharge> Get()
|
||||
{
|
||||
|
||||
dbhelper dbh = new dbhelper();
|
||||
//dbh.Get_Tabledata("Select * from [PatCharge]", false, true);
|
||||
|
||||
List<PatCharge> Details = new List<PatCharge>();
|
||||
return dbh.ConvertDataTable<PatCharge>(dbh.Get_Tabledata("Select * from [PatCharge]", false, true));
|
||||
}
|
||||
|
||||
|
||||
// GET api/<PatChargeController>/5
|
||||
[HttpGet("{id}")]
|
||||
public List<ViewPatCharche> Get(int id)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
List<PatCharge> Details = new List<PatCharge>();
|
||||
return dbh.ConvertDataTable<ViewPatCharche>(dbh.Get_Tabledata("Select * from [Service_View_Charge] where patid=" + id.ToString() +" order by datum desc, id desc", false, true));
|
||||
}
|
||||
|
||||
// POST api/<PatChargeController>
|
||||
[HttpPost]
|
||||
public void Post([FromBody] PatCharge PatCharge)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabeldata_for_Update("Select top 1 * from [PatCharge] where id=-1", false, true);
|
||||
DataRow dr = dbh.dsdaten.Tables[0].NewRow();
|
||||
PatCharge.GetType().GetProperties().ToList().ForEach(f =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (f.PropertyType == typeof(DateTime))
|
||||
{
|
||||
dr[f.Name] = (DateTime)f.GetValue(PatCharge, null);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
dr[f.Name] = f.GetValue(PatCharge, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { string s = ex.Message; }
|
||||
});
|
||||
dbh.dsdaten.Tables[0].Rows.Add(dr);
|
||||
dbh.Update_Tabeldata();
|
||||
}
|
||||
[HttpPost("{id}/{charge}")]
|
||||
public void Post(string id, string charge)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabeldata_for_Update("Select top 1 * from [PatCharge] 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/<PatChargeController>/5
|
||||
[HttpPut("{id}")]
|
||||
public void Put(int id, [FromBody] PatCharge PatCharge)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabeldata_for_Update("Select top 1 * from [PatCharge] where id=" + id.ToString(), false, true);
|
||||
DataRow dr = dbh.dsdaten.Tables[0].Rows[0];
|
||||
PatCharge.GetType().GetProperties().ToList().ForEach(f =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (f.PropertyType == typeof(DateTime))
|
||||
{
|
||||
dr[f.Name] = (DateTime)f.GetValue(PatCharge, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
dr[f.Name] = f.GetValue(PatCharge, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { string s = ex.Message; }
|
||||
});
|
||||
dbh.Update_Tabeldata();
|
||||
|
||||
}
|
||||
|
||||
// DELETE api/<PatChargeController>/5
|
||||
[HttpDelete("{id}")]
|
||||
public void Delete(int id)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabeldata_for_Update("Select top 1 * from [PatCharge] where id=" + id, false, true);
|
||||
DataRow dr = dbh.dsdaten.Tables[0].Rows[0];
|
||||
dr["Aktiv"] = false;
|
||||
dr["mutiert_am"] = DateTime.Now;
|
||||
dbh.Update_Tabeldata();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using DPMService.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace DPMService.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class PatChargeController : ControllerBase
|
||||
{
|
||||
// GET: api/<PatChargeController>
|
||||
[HttpGet]
|
||||
public List<PatCharge> Get()
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
//dbh.Get_Tabledata("Select * from [PatCharge]", false, true);
|
||||
|
||||
List<PatCharge> Details = new List<PatCharge>();
|
||||
return dbh.ConvertDataTable<PatCharge>(dbh.Get_Tabledata("Select * from [PatCharge]", false, true));
|
||||
}
|
||||
|
||||
// GET api/<PatChargeController>/5
|
||||
[HttpGet("{id}")]
|
||||
public List<ViewPatCharche> Get(int id)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
List<PatCharge> Details = new List<PatCharge>();
|
||||
return dbh.ConvertDataTable<ViewPatCharche>(dbh.Get_Tabledata("Select * from [Service_View_Charge] where patid=" + id.ToString() + " order by datum desc, id desc", false, true));
|
||||
}
|
||||
|
||||
// POST api/<PatChargeController>
|
||||
[HttpPost]
|
||||
public void Post([FromBody] PatCharge PatCharge)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabeldata_for_Update("Select top 1 * from [PatCharge] where id=-1", false, true);
|
||||
DataRow dr = dbh.dsdaten.Tables[0].NewRow();
|
||||
PatCharge.GetType().GetProperties().ToList().ForEach(f =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (f.PropertyType == typeof(DateTime))
|
||||
{
|
||||
dr[f.Name] = (DateTime)f.GetValue(PatCharge, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
dr[f.Name] = f.GetValue(PatCharge, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { string s = ex.Message; }
|
||||
});
|
||||
dbh.dsdaten.Tables[0].Rows.Add(dr);
|
||||
dbh.Update_Tabeldata();
|
||||
}
|
||||
|
||||
[HttpPost("{id}/{charge}")]
|
||||
public void Post(string id, string charge)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabeldata_for_Update("Select top 1 * from [PatCharge] 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/<PatChargeController>/5
|
||||
[HttpPut("{id}")]
|
||||
public void Put(int id, [FromBody] PatCharge PatCharge)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabeldata_for_Update("Select top 1 * from [PatCharge] where id=" + id.ToString(), false, true);
|
||||
DataRow dr = dbh.dsdaten.Tables[0].Rows[0];
|
||||
PatCharge.GetType().GetProperties().ToList().ForEach(f =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (f.PropertyType == typeof(DateTime))
|
||||
{
|
||||
dr[f.Name] = (DateTime)f.GetValue(PatCharge, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
dr[f.Name] = f.GetValue(PatCharge, null);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { string s = ex.Message; }
|
||||
});
|
||||
dbh.Update_Tabeldata();
|
||||
}
|
||||
|
||||
// DELETE api/<PatChargeController>/5
|
||||
[HttpDelete("{id}")]
|
||||
public void Delete(int id)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
dbh.Get_Tabeldata_for_Update("Select top 1 * from [PatCharge] where id=" + id, false, true);
|
||||
DataRow dr = dbh.dsdaten.Tables[0].Rows[0];
|
||||
dr["Aktiv"] = false;
|
||||
dr["mutiert_am"] = DateTime.Now;
|
||||
dbh.Update_Tabeldata();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,160 +1,151 @@
|
||||
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 PatientController : 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<Patient> Get()
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
List<Patient> Details = new List<Patient>();
|
||||
return dbh.ConvertDataTable<Patient>(dbh.Get_Tabledata("Select * from [Patient]", false, true));
|
||||
}
|
||||
|
||||
|
||||
// GET api/<Service_View_PatController>/5
|
||||
[HttpGet("{id}")]
|
||||
public List<Patient> Get(int id)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
List<Patient> Details = new List<Patient>();
|
||||
return dbh.ConvertDataTable<Patient>(dbh.Get_Tabledata("Select * from [Service_View_Pat] where id=" + id.ToString(), false, true));
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("search/{searchstring}")]
|
||||
public List<Patient> 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<Patient>(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] Patient 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] Patient 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using DPMService.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace DPMService.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class PatientController : 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<Patient> Get()
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
List<Patient> Details = new List<Patient>();
|
||||
return dbh.ConvertDataTable<Patient>(dbh.Get_Tabledata("Select * from [Patient]", false, true));
|
||||
}
|
||||
|
||||
// GET api/<Service_View_PatController>/5
|
||||
[HttpGet("{id}")]
|
||||
public List<Patient> Get(int id)
|
||||
{
|
||||
dbhelper dbh = new dbhelper();
|
||||
List<Patient> Details = new List<Patient>();
|
||||
return dbh.ConvertDataTable<Patient>(dbh.Get_Tabledata("Select * from [Service_View_Pat] where id=" + id.ToString(), false, true));
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("search/{searchstring}")]
|
||||
public List<Patient> 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<Patient>(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] Patient 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] Patient 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,160 +1,155 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using DPMService.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,244 +1,243 @@
|
||||
using APP.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Dal
|
||||
{
|
||||
public class DbHelper: IDbHelper
|
||||
{
|
||||
private SqlConnection _con;
|
||||
private SqlCommand _cmd;
|
||||
private SqlDataAdapter _adapter;
|
||||
private readonly int _connectDBTimeOut = 120;
|
||||
|
||||
private static string _connectionString = "";
|
||||
|
||||
public DbHelper()
|
||||
{
|
||||
_connectionString = AppSettings.Instance.GetConnection(Const.ConnectionString);
|
||||
}
|
||||
|
||||
public async Task<bool> ExecuteNonQuery(string query, List<SqlParameter> parameters, DbHelperEnum type)
|
||||
{
|
||||
using (var con = new SqlConnection(_connectionString))
|
||||
{
|
||||
using (var cmd = new SqlCommand(query, con))
|
||||
{
|
||||
await con.OpenAsync();
|
||||
cmd.Connection = con;
|
||||
cmd.CommandType = type == DbHelperEnum.StoredProcedure ? CommandType.StoredProcedure : CommandType.Text;
|
||||
cmd.CommandText = query;
|
||||
cmd.CommandTimeout = _connectDBTimeOut;
|
||||
|
||||
if (parameters != null)
|
||||
cmd.Parameters.AddRange(parameters.ToArray());
|
||||
|
||||
int result = await cmd.ExecuteNonQueryAsync().ConfigureAwait(false);
|
||||
con.Dispose();
|
||||
|
||||
if (con.State == ConnectionState.Open)
|
||||
con.Close();
|
||||
|
||||
return result > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async Task<T> ExecuteScalarFunction<T>(string query, List<SqlParameter> parameters, DbHelperEnum type, string outParams)
|
||||
{
|
||||
using (var con = new SqlConnection(_connectionString))
|
||||
{
|
||||
using (var cmd = new SqlCommand(query, con))
|
||||
{
|
||||
await con.OpenAsync();
|
||||
cmd.Connection = con;
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandType = type == DbHelperEnum.StoredProcedure ? CommandType.StoredProcedure : CommandType.Text;
|
||||
cmd.CommandText = query;
|
||||
cmd.CommandTimeout = _connectDBTimeOut;
|
||||
|
||||
if (parameters != null)
|
||||
cmd.Parameters.AddRange(parameters.ToArray());
|
||||
SqlParameter returnValue = cmd.Parameters.Add(new SqlParameter(outParams, 0));
|
||||
returnValue.Direction = ParameterDirection.Output;
|
||||
|
||||
await cmd.ExecuteNonQueryAsync();
|
||||
|
||||
con.Dispose();
|
||||
if (con.State == ConnectionState.Open) con.Close();
|
||||
|
||||
return (T)returnValue.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<T>> ExecuteToTableAsync<T>(string query, List<SqlParameter> parameters, DbHelperEnum type) where T : class
|
||||
{
|
||||
try
|
||||
{
|
||||
IEnumerable<T> result = new List<T>();
|
||||
|
||||
using (var con = new SqlConnection(_connectionString))
|
||||
{
|
||||
using (var cmd = new SqlCommand(query, con))
|
||||
{
|
||||
Console.WriteLine("Open connecting ......");
|
||||
var watch = System.Diagnostics.Stopwatch.StartNew();
|
||||
await con.OpenAsync();
|
||||
watch.Stop();
|
||||
Console.WriteLine(watch.ElapsedMilliseconds);
|
||||
Console.WriteLine("Open connected");
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandType = type == DbHelperEnum.StoredProcedure ? CommandType.StoredProcedure : CommandType.Text;
|
||||
cmd.CommandTimeout = _connectDBTimeOut;
|
||||
|
||||
if (parameters != null) cmd.Parameters.AddRange(parameters.ToArray());
|
||||
|
||||
using (SqlDataReader reader = await cmd.ExecuteReaderAsync())
|
||||
{
|
||||
if (reader.HasRows)
|
||||
{
|
||||
result = await Mapper<T>(reader);
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
|
||||
if (con.State == ConnectionState.Open) con.Close();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
#region Private func
|
||||
|
||||
public async Task<IList<T>> Mapper<T>(SqlDataReader reader, bool close = true) where T : class
|
||||
{
|
||||
try
|
||||
{
|
||||
IList<T> entities = new List<T>();
|
||||
|
||||
if (reader != null && reader.HasRows)
|
||||
{
|
||||
while (await reader.ReadAsync())
|
||||
{
|
||||
T item = default(T);
|
||||
if (item == null)
|
||||
item = Activator.CreateInstance<T>();
|
||||
Mapper(reader, item);
|
||||
entities.Add(item);
|
||||
}
|
||||
|
||||
if (close)
|
||||
{
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
|
||||
return entities;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
private bool Mapper<T>(IDataRecord reader, T entity) where T : class
|
||||
{
|
||||
Type type = typeof(T);
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
for (var i = 0; i < reader.FieldCount; i++)
|
||||
{
|
||||
var fieldName = reader.GetName(i);
|
||||
try
|
||||
{
|
||||
var propertyInfo = type.GetProperties().FirstOrDefault(info => info.Name.Equals(fieldName, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
if (propertyInfo != null)
|
||||
{
|
||||
var value = reader[i];
|
||||
if ((reader[i] != null) && (reader[i] != DBNull.Value))
|
||||
{
|
||||
propertyInfo.SetValue(entity, reader[i], null);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (propertyInfo.PropertyType == typeof(System.DateTime) ||
|
||||
propertyInfo.PropertyType == typeof(System.DateTime?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, System.DateTime.MinValue, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(string))
|
||||
{
|
||||
propertyInfo.SetValue(entity, string.Empty, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(bool) ||
|
||||
propertyInfo.PropertyType == typeof(bool?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, false, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(decimal) ||
|
||||
propertyInfo.PropertyType == typeof(decimal?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, decimal.Zero, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(double) ||
|
||||
propertyInfo.PropertyType == typeof(double?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, double.Parse("0"), null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(float) ||
|
||||
propertyInfo.PropertyType == typeof(float?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, 0, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(short) ||
|
||||
propertyInfo.PropertyType == typeof(short?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, short.Parse("0"), null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(long) ||
|
||||
propertyInfo.PropertyType == typeof(long?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, long.Parse("0"), null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(int) ||
|
||||
propertyInfo.PropertyType == typeof(int?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, int.Parse("0"), null);
|
||||
}
|
||||
else
|
||||
{
|
||||
propertyInfo.SetValue(entity, 0, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
using APP.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Dal
|
||||
{
|
||||
public class DbHelper : IDbHelper
|
||||
{
|
||||
private SqlConnection _con;
|
||||
private SqlCommand _cmd;
|
||||
private SqlDataAdapter _adapter;
|
||||
private readonly int _connectDBTimeOut = 120;
|
||||
|
||||
private static string _connectionString = "";
|
||||
|
||||
public DbHelper()
|
||||
{
|
||||
_connectionString = AppSettings.Instance.GetConnection(Const.ConnectionString);
|
||||
}
|
||||
|
||||
public async Task<bool> ExecuteNonQuery(string query, List<SqlParameter> parameters, DbHelperEnum type)
|
||||
{
|
||||
using (var con = new SqlConnection(_connectionString))
|
||||
{
|
||||
using (var cmd = new SqlCommand(query, con))
|
||||
{
|
||||
await con.OpenAsync();
|
||||
cmd.Connection = con;
|
||||
cmd.CommandType = type == DbHelperEnum.StoredProcedure ? CommandType.StoredProcedure : CommandType.Text;
|
||||
cmd.CommandText = query;
|
||||
cmd.CommandTimeout = _connectDBTimeOut;
|
||||
|
||||
if (parameters != null)
|
||||
cmd.Parameters.AddRange(parameters.ToArray());
|
||||
|
||||
int result = await cmd.ExecuteNonQueryAsync().ConfigureAwait(false);
|
||||
con.Dispose();
|
||||
|
||||
if (con.State == ConnectionState.Open)
|
||||
con.Close();
|
||||
|
||||
return result > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<T> ExecuteScalarFunction<T>(string query, List<SqlParameter> parameters, DbHelperEnum type, string outParams)
|
||||
{
|
||||
using (var con = new SqlConnection(_connectionString))
|
||||
{
|
||||
using (var cmd = new SqlCommand(query, con))
|
||||
{
|
||||
await con.OpenAsync();
|
||||
cmd.Connection = con;
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandType = type == DbHelperEnum.StoredProcedure ? CommandType.StoredProcedure : CommandType.Text;
|
||||
cmd.CommandText = query;
|
||||
cmd.CommandTimeout = _connectDBTimeOut;
|
||||
|
||||
if (parameters != null)
|
||||
cmd.Parameters.AddRange(parameters.ToArray());
|
||||
SqlParameter returnValue = cmd.Parameters.Add(new SqlParameter(outParams, 0));
|
||||
returnValue.Direction = ParameterDirection.Output;
|
||||
|
||||
await cmd.ExecuteNonQueryAsync();
|
||||
|
||||
con.Dispose();
|
||||
if (con.State == ConnectionState.Open) con.Close();
|
||||
|
||||
return (T)returnValue.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<T>> ExecuteToTableAsync<T>(string query, List<SqlParameter> parameters, DbHelperEnum type) where T : class
|
||||
{
|
||||
try
|
||||
{
|
||||
IEnumerable<T> result = new List<T>();
|
||||
|
||||
using (var con = new SqlConnection(_connectionString))
|
||||
{
|
||||
using (var cmd = new SqlCommand(query, con))
|
||||
{
|
||||
Console.WriteLine("Open connecting ......");
|
||||
var watch = System.Diagnostics.Stopwatch.StartNew();
|
||||
await con.OpenAsync();
|
||||
watch.Stop();
|
||||
Console.WriteLine(watch.ElapsedMilliseconds);
|
||||
Console.WriteLine("Open connected");
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandType = type == DbHelperEnum.StoredProcedure ? CommandType.StoredProcedure : CommandType.Text;
|
||||
cmd.CommandTimeout = _connectDBTimeOut;
|
||||
|
||||
if (parameters != null) cmd.Parameters.AddRange(parameters.ToArray());
|
||||
|
||||
using (SqlDataReader reader = await cmd.ExecuteReaderAsync())
|
||||
{
|
||||
if (reader.HasRows)
|
||||
{
|
||||
result = await Mapper<T>(reader);
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
|
||||
if (con.State == ConnectionState.Open) con.Close();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
#region Private func
|
||||
|
||||
public async Task<IList<T>> Mapper<T>(SqlDataReader reader, bool close = true) where T : class
|
||||
{
|
||||
try
|
||||
{
|
||||
IList<T> entities = new List<T>();
|
||||
|
||||
if (reader != null && reader.HasRows)
|
||||
{
|
||||
while (await reader.ReadAsync())
|
||||
{
|
||||
T item = default(T);
|
||||
if (item == null)
|
||||
item = Activator.CreateInstance<T>();
|
||||
Mapper(reader, item);
|
||||
entities.Add(item);
|
||||
}
|
||||
|
||||
if (close)
|
||||
{
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
|
||||
return entities;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
private bool Mapper<T>(IDataRecord reader, T entity) where T : class
|
||||
{
|
||||
Type type = typeof(T);
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
for (var i = 0; i < reader.FieldCount; i++)
|
||||
{
|
||||
var fieldName = reader.GetName(i);
|
||||
try
|
||||
{
|
||||
var propertyInfo = type.GetProperties().FirstOrDefault(info => info.Name.Equals(fieldName, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
if (propertyInfo != null)
|
||||
{
|
||||
var value = reader[i];
|
||||
if ((reader[i] != null) && (reader[i] != DBNull.Value))
|
||||
{
|
||||
propertyInfo.SetValue(entity, reader[i], null);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (propertyInfo.PropertyType == typeof(System.DateTime) ||
|
||||
propertyInfo.PropertyType == typeof(System.DateTime?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, System.DateTime.MinValue, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(string))
|
||||
{
|
||||
propertyInfo.SetValue(entity, string.Empty, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(bool) ||
|
||||
propertyInfo.PropertyType == typeof(bool?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, false, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(decimal) ||
|
||||
propertyInfo.PropertyType == typeof(decimal?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, decimal.Zero, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(double) ||
|
||||
propertyInfo.PropertyType == typeof(double?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, double.Parse("0"), null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(float) ||
|
||||
propertyInfo.PropertyType == typeof(float?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, 0, null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(short) ||
|
||||
propertyInfo.PropertyType == typeof(short?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, short.Parse("0"), null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(long) ||
|
||||
propertyInfo.PropertyType == typeof(long?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, long.Parse("0"), null);
|
||||
}
|
||||
else if (propertyInfo.PropertyType == typeof(int) ||
|
||||
propertyInfo.PropertyType == typeof(int?))
|
||||
{
|
||||
propertyInfo.SetValue(entity, int.Parse("0"), null);
|
||||
}
|
||||
else
|
||||
{
|
||||
propertyInfo.SetValue(entity, 0, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private func
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
|
||||
using BWPMModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Dal
|
||||
{
|
||||
public interface IAccountDAL
|
||||
{
|
||||
Task<UserModel> GetById(int id);
|
||||
Task<UserModel> GetByEmail(string email);
|
||||
}
|
||||
}
|
||||
|
||||
using BWPMModels;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Dal
|
||||
{
|
||||
public interface IAccountDAL
|
||||
{
|
||||
Task<UserModel> GetById(int id);
|
||||
Task<UserModel> GetByEmail(string email);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
using APP.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Dal
|
||||
{
|
||||
public interface IDbHelper
|
||||
{
|
||||
Task<bool> ExecuteNonQuery(string query, List<SqlParameter> parameters, DbHelperEnum type);
|
||||
|
||||
Task<T> ExecuteScalarFunction<T>(string query, List<SqlParameter> parameters, DbHelperEnum type, string outParams);
|
||||
|
||||
Task<IEnumerable<T>> ExecuteToTableAsync<T>(string query, List<SqlParameter> parameters, DbHelperEnum type) where T : class;
|
||||
}
|
||||
}
|
||||
using APP.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Dal
|
||||
{
|
||||
public interface IDbHelper
|
||||
{
|
||||
Task<bool> ExecuteNonQuery(string query, List<SqlParameter> parameters, DbHelperEnum type);
|
||||
|
||||
Task<T> ExecuteScalarFunction<T>(string query, List<SqlParameter> parameters, DbHelperEnum type, string outParams);
|
||||
|
||||
Task<IEnumerable<T>> ExecuteToTableAsync<T>(string query, List<SqlParameter> parameters, DbHelperEnum type) where T : class;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SecuringWebApiUsingApiKey.Middleware
|
||||
{
|
||||
public class ApiKeyMiddleware
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
private const string APIKEYNAME = "ApiKey";
|
||||
public ApiKeyMiddleware(RequestDelegate next)
|
||||
{
|
||||
_next = next;
|
||||
}
|
||||
public async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
var appSettings = context.RequestServices.GetRequiredService<IConfiguration>();
|
||||
string apiCheck = appSettings.GetValue<string>("ApiCheck");
|
||||
if (apiCheck== "e913aab4-c2c5-4e33-ad24-d25848f748e7")
|
||||
{
|
||||
await _next(context);
|
||||
return;
|
||||
|
||||
}
|
||||
if (!context.Request.Headers.TryGetValue(APIKEYNAME, out var extractedApiKey))
|
||||
{
|
||||
context.Response.StatusCode = 401;
|
||||
await context.Response.WriteAsync("Api Key was not provided. (Using ApiKeyMiddleware) ");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var apiKey = appSettings.GetValue<string>(APIKEYNAME);
|
||||
string[] keys = apiKey.Split(",");
|
||||
|
||||
bool tokenok = false;
|
||||
for (int i = 0;i<keys.Length;i++)
|
||||
if (keys[i]==extractedApiKey)
|
||||
{
|
||||
tokenok = true;
|
||||
break;
|
||||
}
|
||||
|
||||
//if (!apiKey.Equals(extractedApiKey))
|
||||
if(!tokenok)
|
||||
{
|
||||
context.Response.StatusCode = 401;
|
||||
await context.Response.WriteAsync
|
||||
("Unauthorized client. (Using ApiKeyMiddleware)");
|
||||
return;
|
||||
}
|
||||
|
||||
await _next(context);
|
||||
}
|
||||
}
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SecuringWebApiUsingApiKey.Middleware
|
||||
{
|
||||
public class ApiKeyMiddleware
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
private const string APIKEYNAME = "ApiKey";
|
||||
public ApiKeyMiddleware(RequestDelegate next)
|
||||
{
|
||||
_next = next;
|
||||
}
|
||||
public async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
var appSettings = context.RequestServices.GetRequiredService<IConfiguration>();
|
||||
string apiCheck = appSettings.GetValue<string>("ApiCheck");
|
||||
if (apiCheck == "e913aab4-c2c5-4e33-ad24-d25848f748e7")
|
||||
{
|
||||
await _next(context);
|
||||
return;
|
||||
|
||||
}
|
||||
if (!context.Request.Headers.TryGetValue(APIKEYNAME, out var extractedApiKey))
|
||||
{
|
||||
context.Response.StatusCode = 401;
|
||||
await context.Response.WriteAsync("Api Key was not provided. (Using ApiKeyMiddleware) ");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var apiKey = appSettings.GetValue<string>(APIKEYNAME);
|
||||
string[] keys = apiKey.Split(",");
|
||||
|
||||
bool tokenok = false;
|
||||
for (int i = 0; i < keys.Length; i++)
|
||||
if (keys[i] == extractedApiKey)
|
||||
{
|
||||
tokenok = true;
|
||||
break;
|
||||
}
|
||||
|
||||
//if (!apiKey.Equals(extractedApiKey))
|
||||
if (!tokenok)
|
||||
{
|
||||
context.Response.StatusCode = 401;
|
||||
await context.Response.WriteAsync
|
||||
("Unauthorized client. (Using ApiKeyMiddleware)");
|
||||
return;
|
||||
}
|
||||
|
||||
await _next(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,127 +1,124 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DPMService.Models
|
||||
{
|
||||
public class Crypto
|
||||
{
|
||||
|
||||
//public static void Main()
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
|
||||
// string original = "Here is some data to encrypt!";
|
||||
|
||||
// // Create a new instance of the RijndaelManaged
|
||||
// // class. This generates a new key and initialization
|
||||
// // vector (IV).
|
||||
// using (RijndaelManaged myRijndael = new RijndaelManaged())
|
||||
// {
|
||||
|
||||
// myRijndael.GenerateKey();
|
||||
// myRijndael.GenerateIV();
|
||||
// // Encrypt the string to an array of bytes.
|
||||
// byte[] encrypted = EncryptStringToBytes(original, myRijndael.Key, myRijndael.IV);
|
||||
|
||||
// // Decrypt the bytes to a string.
|
||||
// string roundtrip = DecryptStringFromBytes(encrypted, myRijndael.Key, myRijndael.IV);
|
||||
|
||||
// //Display the original data and the decrypted data.
|
||||
// Console.WriteLine("Original: {0}", original);
|
||||
// Console.WriteLine("Round Trip: {0}", roundtrip);
|
||||
// }
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// Console.WriteLine("Error: {0}", e.Message);
|
||||
// }
|
||||
//}
|
||||
public byte[] EncryptStringToBytes(string plainText, byte[] Key, byte[] IV)
|
||||
{
|
||||
// Check arguments.
|
||||
if (plainText == null || plainText.Length <= 0)
|
||||
throw new ArgumentNullException("plainText");
|
||||
if (Key == null || Key.Length <= 0)
|
||||
throw new ArgumentNullException("Key");
|
||||
if (IV == null || IV.Length <= 0)
|
||||
throw new ArgumentNullException("IV");
|
||||
byte[] encrypted;
|
||||
// Create an RijndaelManaged object
|
||||
// with the specified key and IV.
|
||||
using (RijndaelManaged rijAlg = new RijndaelManaged())
|
||||
{
|
||||
rijAlg.Key = Key;
|
||||
rijAlg.IV = IV;
|
||||
|
||||
|
||||
// Create an encryptor to perform the stream transform.
|
||||
ICryptoTransform encryptor = rijAlg.CreateEncryptor(rijAlg.Key, rijAlg.IV);
|
||||
|
||||
// Create the streams used for encryption.
|
||||
using (MemoryStream msEncrypt = new MemoryStream())
|
||||
{
|
||||
using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
|
||||
{
|
||||
using (StreamWriter swEncrypt = new StreamWriter(csEncrypt))
|
||||
{
|
||||
|
||||
//Write all data to the stream.
|
||||
swEncrypt.Write(plainText);
|
||||
}
|
||||
encrypted = msEncrypt.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Return the encrypted bytes from the memory stream.
|
||||
return encrypted;
|
||||
}
|
||||
|
||||
public string DecryptStringFromBytes(byte[] cipherText, byte[] Key, byte[] IV)
|
||||
{
|
||||
// Check arguments.
|
||||
if (cipherText == null || cipherText.Length <= 0)
|
||||
throw new ArgumentNullException("cipherText");
|
||||
if (Key == null || Key.Length <= 0)
|
||||
throw new ArgumentNullException("Key");
|
||||
if (IV == null || IV.Length <= 0)
|
||||
throw new ArgumentNullException("IV");
|
||||
|
||||
// Declare the string used to hold
|
||||
// the decrypted text.
|
||||
string plaintext = null;
|
||||
|
||||
// Create an RijndaelManaged object
|
||||
// with the specified key and IV.
|
||||
using (RijndaelManaged rijAlg = new RijndaelManaged())
|
||||
{
|
||||
rijAlg.Key = Key;
|
||||
rijAlg.IV = IV;
|
||||
|
||||
// Create a decryptor to perform the stream transform.
|
||||
ICryptoTransform decryptor = rijAlg.CreateDecryptor(rijAlg.Key, rijAlg.IV);
|
||||
|
||||
// Create the streams used for decryption.
|
||||
using (MemoryStream msDecrypt = new MemoryStream(cipherText))
|
||||
{
|
||||
using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
|
||||
{
|
||||
using (StreamReader srDecrypt = new StreamReader(csDecrypt))
|
||||
{
|
||||
// Read the decrypted bytes from the decrypting stream
|
||||
// and place them in a string.
|
||||
plaintext = srDecrypt.ReadToEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return plaintext;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace DPMService.Models
|
||||
{
|
||||
public class Crypto
|
||||
{
|
||||
|
||||
//public static void Main()
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
|
||||
// string original = "Here is some data to encrypt!";
|
||||
|
||||
// // Create a new instance of the RijndaelManaged
|
||||
// // class. This generates a new key and initialization
|
||||
// // vector (IV).
|
||||
// using (RijndaelManaged myRijndael = new RijndaelManaged())
|
||||
// {
|
||||
|
||||
// myRijndael.GenerateKey();
|
||||
// myRijndael.GenerateIV();
|
||||
// // Encrypt the string to an array of bytes.
|
||||
// byte[] encrypted = EncryptStringToBytes(original, myRijndael.Key, myRijndael.IV);
|
||||
|
||||
// // Decrypt the bytes to a string.
|
||||
// string roundtrip = DecryptStringFromBytes(encrypted, myRijndael.Key, myRijndael.IV);
|
||||
|
||||
// //Display the original data and the decrypted data.
|
||||
// Console.WriteLine("Original: {0}", original);
|
||||
// Console.WriteLine("Round Trip: {0}", roundtrip);
|
||||
// }
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// Console.WriteLine("Error: {0}", e.Message);
|
||||
// }
|
||||
//}
|
||||
public byte[] EncryptStringToBytes(string plainText, byte[] Key, byte[] IV)
|
||||
{
|
||||
// Check arguments.
|
||||
if (plainText == null || plainText.Length <= 0)
|
||||
throw new ArgumentNullException("plainText");
|
||||
if (Key == null || Key.Length <= 0)
|
||||
throw new ArgumentNullException("Key");
|
||||
if (IV == null || IV.Length <= 0)
|
||||
throw new ArgumentNullException("IV");
|
||||
byte[] encrypted;
|
||||
// Create an RijndaelManaged object
|
||||
// with the specified key and IV.
|
||||
using (RijndaelManaged rijAlg = new RijndaelManaged())
|
||||
{
|
||||
rijAlg.Key = Key;
|
||||
rijAlg.IV = IV;
|
||||
|
||||
|
||||
// Create an encryptor to perform the stream transform.
|
||||
ICryptoTransform encryptor = rijAlg.CreateEncryptor(rijAlg.Key, rijAlg.IV);
|
||||
|
||||
// Create the streams used for encryption.
|
||||
using (MemoryStream msEncrypt = new MemoryStream())
|
||||
{
|
||||
using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
|
||||
{
|
||||
using (StreamWriter swEncrypt = new StreamWriter(csEncrypt))
|
||||
{
|
||||
|
||||
//Write all data to the stream.
|
||||
swEncrypt.Write(plainText);
|
||||
}
|
||||
encrypted = msEncrypt.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Return the encrypted bytes from the memory stream.
|
||||
return encrypted;
|
||||
}
|
||||
|
||||
public string DecryptStringFromBytes(byte[] cipherText, byte[] Key, byte[] IV)
|
||||
{
|
||||
// Check arguments.
|
||||
if (cipherText == null || cipherText.Length <= 0)
|
||||
throw new ArgumentNullException("cipherText");
|
||||
if (Key == null || Key.Length <= 0)
|
||||
throw new ArgumentNullException("Key");
|
||||
if (IV == null || IV.Length <= 0)
|
||||
throw new ArgumentNullException("IV");
|
||||
|
||||
// Declare the string used to hold
|
||||
// the decrypted text.
|
||||
string plaintext = null;
|
||||
|
||||
// Create an RijndaelManaged object
|
||||
// with the specified key and IV.
|
||||
using (RijndaelManaged rijAlg = new RijndaelManaged())
|
||||
{
|
||||
rijAlg.Key = Key;
|
||||
rijAlg.IV = IV;
|
||||
|
||||
// Create a decryptor to perform the stream transform.
|
||||
ICryptoTransform decryptor = rijAlg.CreateDecryptor(rijAlg.Key, rijAlg.IV);
|
||||
|
||||
// Create the streams used for decryption.
|
||||
using (MemoryStream msDecrypt = new MemoryStream(cipherText))
|
||||
{
|
||||
using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
|
||||
{
|
||||
using (StreamReader srDecrypt = new StreamReader(csDecrypt))
|
||||
{
|
||||
// Read the decrypted bytes from the decrypting stream
|
||||
// and place them in a string.
|
||||
plaintext = srDecrypt.ReadToEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return plaintext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,48 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BWPMService.Models
|
||||
{
|
||||
public class ForgotPasswordInputModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
}
|
||||
|
||||
public class LoginInputModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[Display(Name = "Remember me?")]
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
|
||||
public class RegisterInputModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Password")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm password")]
|
||||
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
}
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace BWPMService.Models
|
||||
{
|
||||
public class ForgotPasswordInputModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
}
|
||||
|
||||
public class LoginInputModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[Display(Name = "Remember me?")]
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
|
||||
public class RegisterInputModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Password")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm password")]
|
||||
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,39 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DPMService.Models
|
||||
{
|
||||
public class PatCharge
|
||||
{
|
||||
public int ID { get; set; } = 0;
|
||||
|
||||
public int? PatientID { get; set; } = 0;
|
||||
|
||||
public string CharcheCode { get; set; } = "";
|
||||
|
||||
public DateTime? erstellt_am { get; set; } = DateTime.Now;
|
||||
|
||||
public DateTime? mutiert_am { get; set; } = DateTime.Now;
|
||||
|
||||
public string mutierer { get; set; } = "";
|
||||
|
||||
public bool aktiv { get; set; } = true;
|
||||
|
||||
}
|
||||
|
||||
public class ViewPatCharche
|
||||
{
|
||||
public int id { get; set; } = 0;
|
||||
|
||||
public int? patid { get; set; } = 0;
|
||||
|
||||
public string charge { get; set; } = "";
|
||||
public string datum { get; set; } = "";
|
||||
|
||||
public bool aktiv { get; set; } = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
using System;
|
||||
|
||||
namespace DPMService.Models
|
||||
{
|
||||
public class PatCharge
|
||||
{
|
||||
public int ID { get; set; } = 0;
|
||||
|
||||
public int? PatientID { get; set; } = 0;
|
||||
|
||||
public string CharcheCode { get; set; } = "";
|
||||
|
||||
public DateTime? erstellt_am { get; set; } = DateTime.Now;
|
||||
|
||||
public DateTime? mutiert_am { get; set; } = DateTime.Now;
|
||||
|
||||
public string mutierer { get; set; } = "";
|
||||
|
||||
public bool aktiv { get; set; } = true;
|
||||
|
||||
}
|
||||
|
||||
public class ViewPatCharche
|
||||
{
|
||||
public int id { get; set; } = 0;
|
||||
|
||||
public int? patid { get; set; } = 0;
|
||||
|
||||
public string charge { get; set; } = "";
|
||||
public string datum { get; set; } = "";
|
||||
|
||||
public bool aktiv { get; set; } = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DPMService.Models
|
||||
|
||||
{
|
||||
public class Patient
|
||||
{
|
||||
public int ID { get; set; } = 0;
|
||||
|
||||
public string Pat { get; set; } = "";
|
||||
|
||||
public DateTime? TransferDateiTime { get; set; } = DateTime.Now;
|
||||
|
||||
public int? Transferdirection { get; set; } = 0;
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
|
||||
namespace DPMService.Models
|
||||
|
||||
{
|
||||
public class Patient
|
||||
{
|
||||
public int ID { get; set; } = 0;
|
||||
|
||||
public string Pat { get; set; } = "";
|
||||
|
||||
public DateTime? TransferDateiTime { get; set; } = DateTime.Now;
|
||||
|
||||
public int? Transferdirection { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class privat
|
||||
{
|
||||
public string ahvnr { get; set; } = "";
|
||||
public bool? aktiv { get; set; } = true;
|
||||
public bool? behandler { get; set; } = true;
|
||||
public string bemerkung { get; set; } = "";
|
||||
public string beruf { get; set; } = "";
|
||||
public bool? betreibung { get; set; } = true;
|
||||
public string briefanrede { get; set; } = "";
|
||||
public string coadresse { get; set; } = "";
|
||||
public bool? dhpat { get; set; } = true;
|
||||
public int? dhrecall { get; set; } = 0;
|
||||
public string dhrecallbemerkung { get; set; } = "";
|
||||
public float? dhrecallfixmonat { get; set; } = 0;
|
||||
public bool? dhrecalltelefon { get; set; } = true;
|
||||
public int? dhrecalltyp { get; set; } = 0;
|
||||
public string E_Mail { get; set; } = "";
|
||||
public DateTime? erstellt_am { get; set; } = DateTime.Now;
|
||||
public int? estyp { get; set; } = 0;
|
||||
public string faxg { get; set; } = "";
|
||||
public string faxp { get; set; } = "";
|
||||
public string fsnr { get; set; } = "";
|
||||
public bool? garant { get; set; } = true;
|
||||
public DateTime? gebdat { get; set; } = DateTime.Now;
|
||||
public int? geschlecht { get; set; } = 0;
|
||||
public bool? gesvertreter { get; set; } = true;
|
||||
public string GLN { get; set; } = "";
|
||||
public DateTime? gueltigab { get; set; } = DateTime.Now;
|
||||
public DateTime? gueltigbis { get; set; } = DateTime.Now;
|
||||
public bool? hausarzt { get; set; } = true;
|
||||
public string ivnr { get; set; } = "";
|
||||
public string Kanton { get; set; } = "";
|
||||
public string kknr { get; set; } = "";
|
||||
public string korranrede { get; set; } = "";
|
||||
public string korrcoadresse { get; set; } = "";
|
||||
public string korrname { get; set; } = "";
|
||||
public string korrort { get; set; } = "";
|
||||
public string korrplz { get; set; } = "";
|
||||
public string korrstrasse { get; set; } = "";
|
||||
public string korrtitel { get; set; } = "";
|
||||
public string korrvorname { get; set; } = "";
|
||||
public bool? Mail_Kommunikation { get; set; } = true;
|
||||
public int? mandant { get; set; } = 0;
|
||||
public int? mutierer { get; set; } = 0;
|
||||
public DateTime? mutiert_am { get; set; } = DateTime.Now;
|
||||
public string name { get; set; } = "";
|
||||
public string natel { get; set; } = "";
|
||||
public bool? nichtannehmen { get; set; } = true;
|
||||
public bool? nichtaufbieten { get; set; } = true;
|
||||
public int? nranrede { get; set; } = 0;
|
||||
public int? nrarbeitgeber { get; set; } = 0;
|
||||
public int? nrbehandler { get; set; } = 0;
|
||||
public int? nrdh { get; set; } = 0;
|
||||
public int? nrfs { get; set; } = 0;
|
||||
public int? nrgarant { get; set; } = 0;
|
||||
public int? nrgesvertreter { get; set; } = 0;
|
||||
public int? nrhausarzt { get; set; } = 0;
|
||||
public int? nriv { get; set; } = 0;
|
||||
public int? nrkk { get; set; } = 0;
|
||||
public int nrprivat { get; set; } = 0; public int? nrrgtyp { get; set; } = 0;
|
||||
public int? nrtitel { get; set; } = 0;
|
||||
public int? nrvs { get; set; } = 0;
|
||||
public int? nrzahnarzt { get; set; } = 0;
|
||||
public string ort { get; set; } = "";
|
||||
public bool? patient { get; set; } = true;
|
||||
public string plz { get; set; } = "";
|
||||
public float? rabatt { get; set; } = 0;
|
||||
public string sprache { get; set; } = "";
|
||||
public int? status { get; set; } = 0; public string strasse { get; set; } = "";
|
||||
public int? taxpunkttyp { get; set; } = 0;
|
||||
public string telg { get; set; } = "";
|
||||
public string telp { get; set; } = "";
|
||||
public string vorname { get; set; } = ""; public string vsnr { get; set; } = "";
|
||||
public string web { get; set; } = "";
|
||||
public bool? zahnarzt { get; set; } = true; public int? zazrecall { get; set; } = 0; public string zazrecallbemerkung { get; set; } = "";
|
||||
public float? zazrecallfixmonat { get; set; } = 0;
|
||||
public bool? zazrecalltelefon { get; set; } = true; public int? zazrecalltyp { get; set; } = 0; public string ZSR { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,18 @@
|
||||
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()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace DPMService.Models
|
||||
|
||||
{
|
||||
public class Service_View_Pat
|
||||
{
|
||||
public int ID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Pat { get; set; } = "";
|
||||
|
||||
public Service_View_Pat()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,14 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BWPMModels
|
||||
{
|
||||
public class UserModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string PassWord { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string Email { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public string Avatar { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
|
||||
namespace BWPMModels
|
||||
{
|
||||
public class UserModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string PassWord { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string Email { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public string Avatar { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,279 +1,281 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DPMService.Models
|
||||
{
|
||||
public class dbhelper
|
||||
{
|
||||
//SqlConnection con;
|
||||
string connectionstring;
|
||||
public DataSet dsdaten = new DataSet();
|
||||
private SqlDataAdapter dadaten;
|
||||
public dbhelper()
|
||||
{
|
||||
var configuation = GetConfiguration();
|
||||
connectionstring = configuation.GetSection("ConnectionStrings").GetSection("DBConnection").Value;
|
||||
}
|
||||
|
||||
|
||||
public static DataTable ObjectToDataTable(object o)
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
List<PropertyInfo> properties = o.GetType().GetProperties().ToList();
|
||||
|
||||
foreach (PropertyInfo prop in properties)
|
||||
|
||||
dt.Columns.Add(prop.Name, prop.PropertyType);
|
||||
|
||||
dt.TableName = o.GetType().Name;
|
||||
|
||||
return dt;
|
||||
}
|
||||
public IConfigurationRoot GetConfiguration()
|
||||
{
|
||||
var builder = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
public DataTable Get_Tabledata(string Tablename, bool StoredProc = false, bool is_SQL_String = false)
|
||||
{
|
||||
SqlConnection sqlconnect = new SqlConnection();
|
||||
DataSet ds = new DataSet();
|
||||
ds.Tables.Clear();
|
||||
sqlconnect.ConnectionString = this.connectionstring;
|
||||
sqlconnect.Open();
|
||||
SqlDataAdapter da = new SqlDataAdapter("", sqlconnect);
|
||||
SqlCommand sqlcmd = new SqlCommand();
|
||||
sqlcmd.Connection = sqlconnect;
|
||||
if (StoredProc == true)
|
||||
{
|
||||
sqlcmd.CommandType = CommandType.StoredProcedure;
|
||||
if (Tablename.IndexOf("@@Mandantnr@@") > 0)
|
||||
Tablename = Tablename.Replace("@@Mandantnr@@", "");
|
||||
sqlcmd.CommandText = Tablename;
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlcmd.CommandType = CommandType.Text;
|
||||
sqlcmd.CommandText = "Select * from " + Tablename;
|
||||
}
|
||||
if (is_SQL_String == true)
|
||||
sqlcmd.CommandText = Tablename;
|
||||
da.SelectCommand = sqlcmd;
|
||||
da.Fill(dsdaten, "Daten");
|
||||
sqlconnect.Close();
|
||||
return dsdaten.Tables[0];
|
||||
}
|
||||
|
||||
public void Get_Tabeldata_for_Update(string Tablename, bool StoredProc = false, bool is_SQL_String = false)
|
||||
{
|
||||
dsdaten.Clear();
|
||||
dsdaten.Tables.Clear();
|
||||
dadaten = new SqlDataAdapter(Tablename, this.connectionstring);
|
||||
dadaten.Fill(dsdaten, Tablename);
|
||||
}
|
||||
public void Update_Tabeldata()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder(dadaten);
|
||||
dadaten.Update(dsdaten, dsdaten.Tables[0].TableName);
|
||||
}
|
||||
|
||||
public string Get_TablePraefix(string apikey)
|
||||
{
|
||||
Get_Tabledata("select tablepraefix from patchargeapi where apikey='" + apikey + "'", false, true);
|
||||
if (this.dsdaten.Tables[0].Rows.Count == 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Dictionary<string, List<object>> DatatableToDictionary(DataTable dataTable)
|
||||
{
|
||||
var dict = new Dictionary<string, List<object>>();
|
||||
foreach (DataColumn dataColumn in dataTable.Columns)
|
||||
{
|
||||
var columnValueList = new List<object>();
|
||||
|
||||
foreach (DataRow dataRow in dataTable.Rows)
|
||||
{
|
||||
columnValueList.Add(dataRow[dataColumn.ColumnName]);
|
||||
}
|
||||
|
||||
dict.Add(dataColumn.ColumnName, columnValueList);
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
#region "Converters"
|
||||
|
||||
public List<T> ConvertDataTable<T>(DataTable dt)
|
||||
{
|
||||
List<T> data = new List<T>();
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
T item = GetItem<T>(row);
|
||||
data.Add(item);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
private T GetItem<T>(DataRow dr)
|
||||
{
|
||||
Type temp = typeof(T);
|
||||
T obj = Activator.CreateInstance<T>();
|
||||
|
||||
foreach (DataColumn column in dr.Table.Columns)
|
||||
{
|
||||
foreach (PropertyInfo pro in temp.GetProperties())
|
||||
{
|
||||
if (pro.Name == column.ColumnName)
|
||||
pro.SetValue(obj, dr[column.ColumnName], null/* TODO Change to default(_) if this is not a reference type */);
|
||||
else
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetEntities<T>(DataTable dt)
|
||||
{
|
||||
if (dt == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<T> returnValue = new List<T>();
|
||||
List<string> typeProperties = new List<string>();
|
||||
|
||||
T typeInstance = Activator.CreateInstance<T>();
|
||||
|
||||
foreach (DataColumn column in dt.Columns)
|
||||
{
|
||||
var prop = typeInstance.GetType().GetProperty(column.ColumnName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
|
||||
if (prop != null)
|
||||
{
|
||||
typeProperties.Add(column.ColumnName);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
T entity = Activator.CreateInstance<T>();
|
||||
|
||||
foreach (var propertyName in typeProperties)
|
||||
{
|
||||
|
||||
if (row[propertyName] != DBNull.Value)
|
||||
{
|
||||
string str = row[propertyName].GetType().FullName;
|
||||
|
||||
if (entity.GetType().GetProperty(propertyName).PropertyType == typeof(System.String))
|
||||
{
|
||||
object Val = row[propertyName].ToString();
|
||||
entity.GetType().GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public).SetValue(entity, Val, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public, null, null, null);
|
||||
}
|
||||
else if (entity.GetType().GetProperty(propertyName).PropertyType == typeof(System.Guid))
|
||||
{
|
||||
object Val = Guid.Parse(row[propertyName].ToString());
|
||||
entity.GetType().GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public).SetValue(entity, Val, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public, null, null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.GetType().GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public).SetValue(entity, row[propertyName], BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public, null, null, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.GetType().GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public).SetValue(entity, null, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public, null, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
returnValue.Add(entity);
|
||||
}
|
||||
|
||||
return returnValue.AsEnumerable();
|
||||
}
|
||||
public string DataTableToJSONWithStringBuilder(DataTable table)
|
||||
{
|
||||
var JSONString = new StringBuilder();
|
||||
if (table.Rows.Count > 0)
|
||||
{
|
||||
JSONString.Append("[");
|
||||
for (int i = 0; i < table.Rows.Count; i++)
|
||||
{
|
||||
JSONString.Append("{");
|
||||
for (int j = 0; j < table.Columns.Count; j++)
|
||||
{
|
||||
if (j < table.Columns.Count - 1)
|
||||
{
|
||||
JSONString.Append("\"" + table.Columns[j].ColumnName.ToString() + "\":" + "\"" + table.Rows[i][j].ToString() + "\",");
|
||||
}
|
||||
else if (j == table.Columns.Count - 1)
|
||||
{
|
||||
JSONString.Append("\"" + table.Columns[j].ColumnName.ToString() + "\":" + "\"" + table.Rows[i][j].ToString() + "\"");
|
||||
}
|
||||
}
|
||||
if (i == table.Rows.Count - 1)
|
||||
{
|
||||
JSONString.Append("}");
|
||||
}
|
||||
else
|
||||
{
|
||||
JSONString.Append("},");
|
||||
}
|
||||
}
|
||||
JSONString.Append("]");
|
||||
}
|
||||
return JSONString.ToString();
|
||||
}
|
||||
public string ConvertDataTableToString(DataTable table)
|
||||
{
|
||||
int iColumnCount = table.Columns.Count;
|
||||
int iRowCount = table.Rows.Count;
|
||||
int iTempRowCount = 0;
|
||||
string strColumName = table.Columns[0].ColumnName;
|
||||
string strOut = "{";
|
||||
foreach (DataRow row in table.Rows)
|
||||
{
|
||||
strOut = strOut + "{";
|
||||
foreach (DataColumn col in table.Columns)
|
||||
{
|
||||
string val = row.Field<string>(col.ColumnName);
|
||||
strOut = strOut + col.ColumnName + ":" + val;
|
||||
|
||||
if (col.Ordinal != iColumnCount - 1)
|
||||
{
|
||||
strOut = strOut + ",";
|
||||
}
|
||||
}
|
||||
strOut = strOut + "}";
|
||||
iTempRowCount++;
|
||||
|
||||
if (iTempRowCount != iRowCount)
|
||||
{
|
||||
strOut = strOut + ",";
|
||||
}
|
||||
}
|
||||
strOut = strOut + "}";
|
||||
return strOut;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace DPMService.Models
|
||||
{
|
||||
public class dbhelper
|
||||
{
|
||||
//SqlConnection con;
|
||||
private string connectionstring;
|
||||
|
||||
public DataSet dsdaten = new DataSet();
|
||||
private SqlDataAdapter dadaten;
|
||||
|
||||
public dbhelper()
|
||||
{
|
||||
var configuation = GetConfiguration();
|
||||
connectionstring = configuation.GetSection("ConnectionStrings").GetSection("DBConnection").Value;
|
||||
}
|
||||
|
||||
public static DataTable ObjectToDataTable(object o)
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
List<PropertyInfo> properties = o.GetType().GetProperties().ToList();
|
||||
|
||||
foreach (PropertyInfo prop in properties)
|
||||
|
||||
dt.Columns.Add(prop.Name, prop.PropertyType);
|
||||
|
||||
dt.TableName = o.GetType().Name;
|
||||
|
||||
return dt;
|
||||
}
|
||||
|
||||
public IConfigurationRoot GetConfiguration()
|
||||
{
|
||||
var builder = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
public DataTable Get_Tabledata(string Tablename, bool StoredProc = false, bool is_SQL_String = false)
|
||||
{
|
||||
SqlConnection sqlconnect = new SqlConnection();
|
||||
DataSet ds = new DataSet();
|
||||
ds.Tables.Clear();
|
||||
sqlconnect.ConnectionString = this.connectionstring;
|
||||
sqlconnect.Open();
|
||||
SqlDataAdapter da = new SqlDataAdapter("", sqlconnect);
|
||||
SqlCommand sqlcmd = new SqlCommand();
|
||||
sqlcmd.Connection = sqlconnect;
|
||||
if (StoredProc == true)
|
||||
{
|
||||
sqlcmd.CommandType = CommandType.StoredProcedure;
|
||||
if (Tablename.IndexOf("@@Mandantnr@@") > 0)
|
||||
Tablename = Tablename.Replace("@@Mandantnr@@", "");
|
||||
sqlcmd.CommandText = Tablename;
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlcmd.CommandType = CommandType.Text;
|
||||
sqlcmd.CommandText = "Select * from " + Tablename;
|
||||
}
|
||||
if (is_SQL_String == true)
|
||||
sqlcmd.CommandText = Tablename;
|
||||
da.SelectCommand = sqlcmd;
|
||||
da.Fill(dsdaten, "Daten");
|
||||
sqlconnect.Close();
|
||||
return dsdaten.Tables[0];
|
||||
}
|
||||
|
||||
public void Get_Tabeldata_for_Update(string Tablename, bool StoredProc = false, bool is_SQL_String = false)
|
||||
{
|
||||
dsdaten.Clear();
|
||||
dsdaten.Tables.Clear();
|
||||
dadaten = new SqlDataAdapter(Tablename, this.connectionstring);
|
||||
dadaten.Fill(dsdaten, Tablename);
|
||||
}
|
||||
|
||||
public void Update_Tabeldata()
|
||||
{
|
||||
SqlCommandBuilder cb = new SqlCommandBuilder(dadaten);
|
||||
dadaten.Update(dsdaten, dsdaten.Tables[0].TableName);
|
||||
}
|
||||
|
||||
public string Get_TablePraefix(string apikey)
|
||||
{
|
||||
Get_Tabledata("select tablepraefix from patchargeapi where apikey='" + apikey + "'", false, true);
|
||||
if (this.dsdaten.Tables[0].Rows.Count == 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, List<object>> DatatableToDictionary(DataTable dataTable)
|
||||
{
|
||||
var dict = new Dictionary<string, List<object>>();
|
||||
foreach (DataColumn dataColumn in dataTable.Columns)
|
||||
{
|
||||
var columnValueList = new List<object>();
|
||||
|
||||
foreach (DataRow dataRow in dataTable.Rows)
|
||||
{
|
||||
columnValueList.Add(dataRow[dataColumn.ColumnName]);
|
||||
}
|
||||
|
||||
dict.Add(dataColumn.ColumnName, columnValueList);
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
|
||||
#region "Converters"
|
||||
|
||||
public List<T> ConvertDataTable<T>(DataTable dt)
|
||||
{
|
||||
List<T> data = new List<T>();
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
T item = GetItem<T>(row);
|
||||
data.Add(item);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
private T GetItem<T>(DataRow dr)
|
||||
{
|
||||
Type temp = typeof(T);
|
||||
T obj = Activator.CreateInstance<T>();
|
||||
|
||||
foreach (DataColumn column in dr.Table.Columns)
|
||||
{
|
||||
foreach (PropertyInfo pro in temp.GetProperties())
|
||||
{
|
||||
if (pro.Name == column.ColumnName)
|
||||
pro.SetValue(obj, dr[column.ColumnName], null/* TODO Change to default(_) if this is not a reference type */);
|
||||
else
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetEntities<T>(DataTable dt)
|
||||
{
|
||||
if (dt == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<T> returnValue = new List<T>();
|
||||
List<string> typeProperties = new List<string>();
|
||||
|
||||
T typeInstance = Activator.CreateInstance<T>();
|
||||
|
||||
foreach (DataColumn column in dt.Columns)
|
||||
{
|
||||
var prop = typeInstance.GetType().GetProperty(column.ColumnName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
|
||||
if (prop != null)
|
||||
{
|
||||
typeProperties.Add(column.ColumnName);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
T entity = Activator.CreateInstance<T>();
|
||||
|
||||
foreach (var propertyName in typeProperties)
|
||||
{
|
||||
if (row[propertyName] != DBNull.Value)
|
||||
{
|
||||
string str = row[propertyName].GetType().FullName;
|
||||
|
||||
if (entity.GetType().GetProperty(propertyName).PropertyType == typeof(System.String))
|
||||
{
|
||||
object Val = row[propertyName].ToString();
|
||||
entity.GetType().GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public).SetValue(entity, Val, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public, null, null, null);
|
||||
}
|
||||
else if (entity.GetType().GetProperty(propertyName).PropertyType == typeof(System.Guid))
|
||||
{
|
||||
object Val = Guid.Parse(row[propertyName].ToString());
|
||||
entity.GetType().GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public).SetValue(entity, Val, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public, null, null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.GetType().GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public).SetValue(entity, row[propertyName], BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public, null, null, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.GetType().GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public).SetValue(entity, null, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public, null, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
returnValue.Add(entity);
|
||||
}
|
||||
|
||||
return returnValue.AsEnumerable();
|
||||
}
|
||||
|
||||
public string DataTableToJSONWithStringBuilder(DataTable table)
|
||||
{
|
||||
var JSONString = new StringBuilder();
|
||||
if (table.Rows.Count > 0)
|
||||
{
|
||||
JSONString.Append("[");
|
||||
for (int i = 0; i < table.Rows.Count; i++)
|
||||
{
|
||||
JSONString.Append("{");
|
||||
for (int j = 0; j < table.Columns.Count; j++)
|
||||
{
|
||||
if (j < table.Columns.Count - 1)
|
||||
{
|
||||
JSONString.Append("\"" + table.Columns[j].ColumnName.ToString() + "\":" + "\"" + table.Rows[i][j].ToString() + "\",");
|
||||
}
|
||||
else if (j == table.Columns.Count - 1)
|
||||
{
|
||||
JSONString.Append("\"" + table.Columns[j].ColumnName.ToString() + "\":" + "\"" + table.Rows[i][j].ToString() + "\"");
|
||||
}
|
||||
}
|
||||
if (i == table.Rows.Count - 1)
|
||||
{
|
||||
JSONString.Append("}");
|
||||
}
|
||||
else
|
||||
{
|
||||
JSONString.Append("},");
|
||||
}
|
||||
}
|
||||
JSONString.Append("]");
|
||||
}
|
||||
return JSONString.ToString();
|
||||
}
|
||||
|
||||
public string ConvertDataTableToString(DataTable table)
|
||||
{
|
||||
int iColumnCount = table.Columns.Count;
|
||||
int iRowCount = table.Rows.Count;
|
||||
int iTempRowCount = 0;
|
||||
string strColumName = table.Columns[0].ColumnName;
|
||||
string strOut = "{";
|
||||
foreach (DataRow row in table.Rows)
|
||||
{
|
||||
strOut = strOut + "{";
|
||||
foreach (DataColumn col in table.Columns)
|
||||
{
|
||||
string val = row.Field<string>(col.ColumnName);
|
||||
strOut = strOut + col.ColumnName + ":" + val;
|
||||
|
||||
if (col.Ordinal != iColumnCount - 1)
|
||||
{
|
||||
strOut = strOut + ",";
|
||||
}
|
||||
}
|
||||
strOut = strOut + "}";
|
||||
iTempRowCount++;
|
||||
|
||||
if (iTempRowCount != iRowCount)
|
||||
{
|
||||
strOut = strOut + ",";
|
||||
}
|
||||
}
|
||||
strOut = strOut + "}";
|
||||
return strOut;
|
||||
}
|
||||
|
||||
#endregion "Converters"
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,20 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CoreWebAPI1
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
}
|
||||
}
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace CoreWebAPI1
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,60 +1,51 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SecuringWebApiUsingApiKey.Middleware;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CoreWebAPI1
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddControllers();
|
||||
services.AddSwaggerGen();
|
||||
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment() || env.IsProduction())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
app.UseDeveloperExceptionPage();
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
app.UseMiddleware<ApiKeyMiddleware>();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
});
|
||||
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("./v1/swagger.json", "My API V1");
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using SecuringWebApiUsingApiKey.Middleware;
|
||||
|
||||
namespace CoreWebAPI1
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddControllers();
|
||||
services.AddSwaggerGen();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment() || env.IsProduction())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
app.UseDeveloperExceptionPage();
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
app.UseMiddleware<ApiKeyMiddleware>();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
});
|
||||
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("./v1/swagger.json", "My API V1");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,142 +1,139 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace APP.Utils
|
||||
{
|
||||
public class AppSettings
|
||||
{
|
||||
private static AppSettings _instance;
|
||||
private static readonly object ObjLocked = new object();
|
||||
private IConfiguration _configuration;
|
||||
|
||||
protected AppSettings()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetConfiguration(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
}
|
||||
|
||||
public static AppSettings Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _instance)
|
||||
{
|
||||
lock (ObjLocked)
|
||||
{
|
||||
if (null == _instance)
|
||||
_instance = new AppSettings();
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetBool(string key, bool defaultValue = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _configuration.GetSection("StringValue").GetChildren().FirstOrDefault(x => x.Key == key).Value.ToBool();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetConnection(string key, string defaultValue = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
return _configuration.GetConnectionString(key);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public int GetInt32(string key, int defaultValue = 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _configuration.GetSection("StringValue").GetChildren().FirstOrDefault(x => x.Key == key).Value.ToInt();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public long GetInt64(string key, long defaultValue = 0L)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _configuration.GetSection("StringValue").GetChildren().FirstOrDefault(x => x.Key == key).Value.ToLong();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetString(string key, string defaultValue = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
var value = _configuration.GetSection("StringValue").GetChildren().FirstOrDefault(x => x.Key == key)?.Value;
|
||||
return string.IsNullOrEmpty(value) ? defaultValue : value;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public T Get<T>(string key = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
return _configuration.Get<T>();
|
||||
else
|
||||
return _configuration.GetSection(key).Get<T>();
|
||||
}
|
||||
|
||||
public T Get<T>(string key, T defaultValue)
|
||||
{
|
||||
if (_configuration.GetSection(key) == null)
|
||||
return defaultValue;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
return _configuration.Get<T>();
|
||||
else
|
||||
return _configuration.GetSection(key).Get<T>();
|
||||
}
|
||||
|
||||
public static T GetObject<T>(string key = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
return Instance._configuration.Get<T>();
|
||||
else
|
||||
{
|
||||
var section = Instance._configuration.GetSection(key);
|
||||
return section.Get<T>();
|
||||
}
|
||||
}
|
||||
|
||||
public static T GetObject<T>(string key, T defaultValue)
|
||||
{
|
||||
if (Instance._configuration.GetSection(key) == null)
|
||||
return defaultValue;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
return Instance._configuration.Get<T>();
|
||||
else
|
||||
return Instance._configuration.GetSection(key).Get<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Linq;
|
||||
|
||||
namespace APP.Utils
|
||||
{
|
||||
public class AppSettings
|
||||
{
|
||||
private static AppSettings _instance;
|
||||
private static readonly object ObjLocked = new object();
|
||||
private IConfiguration _configuration;
|
||||
|
||||
protected AppSettings()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetConfiguration(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
}
|
||||
|
||||
public static AppSettings Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _instance)
|
||||
{
|
||||
lock (ObjLocked)
|
||||
{
|
||||
if (null == _instance)
|
||||
_instance = new AppSettings();
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetBool(string key, bool defaultValue = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _configuration.GetSection("StringValue").GetChildren().FirstOrDefault(x => x.Key == key).Value.ToBool();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetConnection(string key, string defaultValue = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
return _configuration.GetConnectionString(key);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public int GetInt32(string key, int defaultValue = 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _configuration.GetSection("StringValue").GetChildren().FirstOrDefault(x => x.Key == key).Value.ToInt();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public long GetInt64(string key, long defaultValue = 0L)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _configuration.GetSection("StringValue").GetChildren().FirstOrDefault(x => x.Key == key).Value.ToLong();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetString(string key, string defaultValue = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
var value = _configuration.GetSection("StringValue").GetChildren().FirstOrDefault(x => x.Key == key)?.Value;
|
||||
return string.IsNullOrEmpty(value) ? defaultValue : value;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public T Get<T>(string key = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
return _configuration.Get<T>();
|
||||
else
|
||||
return _configuration.GetSection(key).Get<T>();
|
||||
}
|
||||
|
||||
public T Get<T>(string key, T defaultValue)
|
||||
{
|
||||
if (_configuration.GetSection(key) == null)
|
||||
return defaultValue;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
return _configuration.Get<T>();
|
||||
else
|
||||
return _configuration.GetSection(key).Get<T>();
|
||||
}
|
||||
|
||||
public static T GetObject<T>(string key = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
return Instance._configuration.Get<T>();
|
||||
else
|
||||
{
|
||||
var section = Instance._configuration.GetSection(key);
|
||||
return section.Get<T>();
|
||||
}
|
||||
}
|
||||
|
||||
public static T GetObject<T>(string key, T defaultValue)
|
||||
{
|
||||
if (Instance._configuration.GetSection(key) == null)
|
||||
return defaultValue;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
return Instance._configuration.Get<T>();
|
||||
else
|
||||
return Instance._configuration.GetSection(key).Get<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Utils
|
||||
{
|
||||
public class Const
|
||||
{
|
||||
public const string ConnectionString = "ConnectionString";
|
||||
}
|
||||
}
|
||||
namespace APP.Utils
|
||||
{
|
||||
public class Const
|
||||
{
|
||||
public const string ConnectionString = "ConnectionString";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,288 +1,287 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace APP.Utils
|
||||
{
|
||||
public static class Extensions
|
||||
{
|
||||
public static int ToInt(this object obj, int defaultValue = default(int))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
int result;
|
||||
return !int.TryParse(obj.ToString(), out result) ? defaultValue : result;
|
||||
}
|
||||
|
||||
public static long ToLong(this object obj, long defaultValue = default(long))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
long result;
|
||||
if (!long.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static double ToDouble(this object obj, double defaultValue = default(double))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
double result;
|
||||
if (!double.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static decimal ToDecimal(this object obj, decimal defaultValue = default(decimal))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
decimal result;
|
||||
if (!decimal.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static short ToShort(this object obj, short defaultValue = default(short))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
short result;
|
||||
if (!short.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static byte ToByte(this object obj, byte defaultValue = default(byte))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
byte result;
|
||||
if (!byte.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string ToStringEx(this object obj, string defaultValue = default(string))
|
||||
{
|
||||
if (obj == null || obj.Equals(System.DBNull.Value))
|
||||
return defaultValue;
|
||||
|
||||
return obj.ToString().Trim();
|
||||
}
|
||||
|
||||
public static DateTime AsDateTime(this object obj, DateTime defaultValue = default(DateTime))
|
||||
{
|
||||
if (obj == null || string.IsNullOrEmpty(obj.ToString()))
|
||||
return defaultValue;
|
||||
|
||||
DateTime result;
|
||||
if (!DateTime.TryParse(string.Format("{0:yyyy-MM-dd HH:mm:ss.fff}", obj), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static DateTime AsDateTimeVn(this object obj, DateTime defaultValue = default(DateTime))
|
||||
{
|
||||
if (obj == null || string.IsNullOrEmpty(obj.ToString()))
|
||||
return defaultValue;
|
||||
try
|
||||
{
|
||||
return DateTime.ParseExact(obj.ToString().Replace('_','/'), "dd/MM/yyyy", CultureInfo.CurrentCulture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static DateTime AsDateTimeVnFull(this object obj, DateTime defaultValue = default(DateTime))
|
||||
{
|
||||
if (obj == null || string.IsNullOrEmpty(obj.ToString()))
|
||||
return defaultValue;
|
||||
try
|
||||
{
|
||||
return DateTime.ParseExact(obj.ToString().Replace('_', '/'), "dd/MM/yyyy HH:mm", CultureInfo.CurrentCulture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ToBool(this object obj, bool defaultValue = default(bool))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
return new List<string>() { "yes", "y", "true", "1" }.Contains(obj.ToString().ToLower());
|
||||
}
|
||||
|
||||
public static byte[] ToByteArray(this string s)
|
||||
{
|
||||
if (string.IsNullOrEmpty(s))
|
||||
return null;
|
||||
|
||||
return Convert.FromBase64String(s);
|
||||
}
|
||||
|
||||
public static string JoinExt<T>(this string s, string separator, IEnumerable<T> values)
|
||||
{
|
||||
if (string.IsNullOrEmpty(s))
|
||||
return null;
|
||||
|
||||
return string.Format("{0}{1}{0}", separator, string.Join(separator, values));
|
||||
}
|
||||
|
||||
public static string Base64String(this object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return null;
|
||||
return Convert.ToBase64String((byte[])obj);
|
||||
}
|
||||
|
||||
public static System.Guid ToGuid(this object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new System.Guid(obj.ToString());
|
||||
}
|
||||
catch
|
||||
{
|
||||
return System.Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static string ToGuidString(this object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Guid.NewGuid().ToString();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static DataTable ToDataTable<T>(this IList<T> data)
|
||||
{
|
||||
PropertyDescriptorCollection props =
|
||||
TypeDescriptor.GetProperties(typeof(T));
|
||||
DataTable table = new DataTable();
|
||||
for (int i = 0; i < props.Count; i++)
|
||||
{
|
||||
PropertyDescriptor prop = props[i];
|
||||
table.Columns.Add(prop.Name, prop.PropertyType);
|
||||
}
|
||||
object[] values = new object[props.Count];
|
||||
foreach (T item in data)
|
||||
{
|
||||
for (int i = 0; i < values.Length; i++)
|
||||
{
|
||||
values[i] = props[i].GetValue(item);
|
||||
}
|
||||
table.Rows.Add(values);
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
public static string FaceBookSubstring(this string str, string startString, string endString)
|
||||
{
|
||||
if (str.Contains(startString))
|
||||
{
|
||||
int iStart = str.IndexOf(startString, StringComparison.Ordinal) + startString.Length;
|
||||
int iEnd = str.IndexOf(endString, iStart, StringComparison.Ordinal);
|
||||
return str.Substring(iStart, (iEnd - iStart));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static T GetAttribute<T>(this MemberInfo member, bool isRequired)
|
||||
where T : Attribute
|
||||
{
|
||||
var attribute = member.GetCustomAttributes(typeof(T), false).SingleOrDefault();
|
||||
|
||||
if (attribute == null && isRequired)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"The {0} attribute must be defined on member {1}",
|
||||
typeof(T).Name,
|
||||
member.Name));
|
||||
}
|
||||
|
||||
return (T)attribute;
|
||||
}
|
||||
|
||||
public static string FormatExt(this string instance, Dictionary<string, string> dicts)
|
||||
{
|
||||
if (string.IsNullOrEmpty(instance)) return instance;
|
||||
|
||||
if (dicts == null || dicts.Count <= 0) return instance;
|
||||
|
||||
string output = instance;
|
||||
//string strRegex = @"(?<ext>{.+?})";
|
||||
string strRegex = @"(?<ext>{(?<name>.+?)})";
|
||||
|
||||
RegexOptions options = RegexOptions.IgnoreCase | RegexOptions.Singleline;
|
||||
|
||||
output = Regex.Replace(instance, strRegex, (_match) =>
|
||||
{
|
||||
string group = _match.Groups["ext"].Value.ToLower();
|
||||
string name = _match.Groups["name"].Value.ToLower();
|
||||
string value = dicts[name];
|
||||
return _match.Value.Replace(group, value);
|
||||
}, options);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
public static bool HasState(this long me, long validState)
|
||||
{
|
||||
return (me & validState) == validState;
|
||||
}
|
||||
|
||||
public static long TurnOnState(this long me, long validState) { return me | validState; }
|
||||
|
||||
public static long TurnOffState(this long me, long validState) { return me & ~validState; }
|
||||
|
||||
public static string GetExtensionFile(this string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Regex reg = new Regex(@"\.[0-9a-z]+$");
|
||||
Match match = reg.Match(fileName);
|
||||
if (match.Success)
|
||||
{
|
||||
return match.Groups[0].Value;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace APP.Utils
|
||||
{
|
||||
public static class Extensions
|
||||
{
|
||||
public static int ToInt(this object obj, int defaultValue = default(int))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
int result;
|
||||
return !int.TryParse(obj.ToString(), out result) ? defaultValue : result;
|
||||
}
|
||||
|
||||
public static long ToLong(this object obj, long defaultValue = default(long))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
long result;
|
||||
if (!long.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static double ToDouble(this object obj, double defaultValue = default(double))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
double result;
|
||||
if (!double.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static decimal ToDecimal(this object obj, decimal defaultValue = default(decimal))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
decimal result;
|
||||
if (!decimal.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static short ToShort(this object obj, short defaultValue = default(short))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
short result;
|
||||
if (!short.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static byte ToByte(this object obj, byte defaultValue = default(byte))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
byte result;
|
||||
if (!byte.TryParse(obj.ToString(), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string ToStringEx(this object obj, string defaultValue = default(string))
|
||||
{
|
||||
if (obj == null || obj.Equals(System.DBNull.Value))
|
||||
return defaultValue;
|
||||
|
||||
return obj.ToString().Trim();
|
||||
}
|
||||
|
||||
public static DateTime AsDateTime(this object obj, DateTime defaultValue = default(DateTime))
|
||||
{
|
||||
if (obj == null || string.IsNullOrEmpty(obj.ToString()))
|
||||
return defaultValue;
|
||||
|
||||
DateTime result;
|
||||
if (!DateTime.TryParse(string.Format("{0:yyyy-MM-dd HH:mm:ss.fff}", obj), out result))
|
||||
return defaultValue;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static DateTime AsDateTimeVn(this object obj, DateTime defaultValue = default(DateTime))
|
||||
{
|
||||
if (obj == null || string.IsNullOrEmpty(obj.ToString()))
|
||||
return defaultValue;
|
||||
try
|
||||
{
|
||||
return DateTime.ParseExact(obj.ToString().Replace('_', '/'), "dd/MM/yyyy", CultureInfo.CurrentCulture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static DateTime AsDateTimeVnFull(this object obj, DateTime defaultValue = default(DateTime))
|
||||
{
|
||||
if (obj == null || string.IsNullOrEmpty(obj.ToString()))
|
||||
return defaultValue;
|
||||
try
|
||||
{
|
||||
return DateTime.ParseExact(obj.ToString().Replace('_', '/'), "dd/MM/yyyy HH:mm", CultureInfo.CurrentCulture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ToBool(this object obj, bool defaultValue = default(bool))
|
||||
{
|
||||
if (obj == null)
|
||||
return defaultValue;
|
||||
|
||||
return new List<string>() { "yes", "y", "true", "1" }.Contains(obj.ToString().ToLower());
|
||||
}
|
||||
|
||||
public static byte[] ToByteArray(this string s)
|
||||
{
|
||||
if (string.IsNullOrEmpty(s))
|
||||
return null;
|
||||
|
||||
return Convert.FromBase64String(s);
|
||||
}
|
||||
|
||||
public static string JoinExt<T>(this string s, string separator, IEnumerable<T> values)
|
||||
{
|
||||
if (string.IsNullOrEmpty(s))
|
||||
return null;
|
||||
|
||||
return string.Format("{0}{1}{0}", separator, string.Join(separator, values));
|
||||
}
|
||||
|
||||
public static string Base64String(this object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return null;
|
||||
return Convert.ToBase64String((byte[])obj);
|
||||
}
|
||||
|
||||
public static System.Guid ToGuid(this object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new System.Guid(obj.ToString());
|
||||
}
|
||||
catch
|
||||
{
|
||||
return System.Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static string ToGuidString(this object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Guid.NewGuid().ToString();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static DataTable ToDataTable<T>(this IList<T> data)
|
||||
{
|
||||
PropertyDescriptorCollection props =
|
||||
TypeDescriptor.GetProperties(typeof(T));
|
||||
DataTable table = new DataTable();
|
||||
for (int i = 0; i < props.Count; i++)
|
||||
{
|
||||
PropertyDescriptor prop = props[i];
|
||||
table.Columns.Add(prop.Name, prop.PropertyType);
|
||||
}
|
||||
object[] values = new object[props.Count];
|
||||
foreach (T item in data)
|
||||
{
|
||||
for (int i = 0; i < values.Length; i++)
|
||||
{
|
||||
values[i] = props[i].GetValue(item);
|
||||
}
|
||||
table.Rows.Add(values);
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
public static string FaceBookSubstring(this string str, string startString, string endString)
|
||||
{
|
||||
if (str.Contains(startString))
|
||||
{
|
||||
int iStart = str.IndexOf(startString, StringComparison.Ordinal) + startString.Length;
|
||||
int iEnd = str.IndexOf(endString, iStart, StringComparison.Ordinal);
|
||||
return str.Substring(iStart, (iEnd - iStart));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static T GetAttribute<T>(this MemberInfo member, bool isRequired)
|
||||
where T : Attribute
|
||||
{
|
||||
var attribute = member.GetCustomAttributes(typeof(T), false).SingleOrDefault();
|
||||
|
||||
if (attribute == null && isRequired)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"The {0} attribute must be defined on member {1}",
|
||||
typeof(T).Name,
|
||||
member.Name));
|
||||
}
|
||||
|
||||
return (T)attribute;
|
||||
}
|
||||
|
||||
public static string FormatExt(this string instance, Dictionary<string, string> dicts)
|
||||
{
|
||||
if (string.IsNullOrEmpty(instance)) return instance;
|
||||
|
||||
if (dicts == null || dicts.Count <= 0) return instance;
|
||||
|
||||
string output = instance;
|
||||
//string strRegex = @"(?<ext>{.+?})";
|
||||
string strRegex = @"(?<ext>{(?<name>.+?)})";
|
||||
|
||||
RegexOptions options = RegexOptions.IgnoreCase | RegexOptions.Singleline;
|
||||
|
||||
output = Regex.Replace(instance, strRegex, (_match) =>
|
||||
{
|
||||
string group = _match.Groups["ext"].Value.ToLower();
|
||||
string name = _match.Groups["name"].Value.ToLower();
|
||||
string value = dicts[name];
|
||||
return _match.Value.Replace(group, value);
|
||||
}, options);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
public static bool HasState(this long me, long validState)
|
||||
{
|
||||
return (me & validState) == validState;
|
||||
}
|
||||
|
||||
public static long TurnOnState(this long me, long validState) { return me | validState; }
|
||||
|
||||
public static long TurnOffState(this long me, long validState) { return me & ~validState; }
|
||||
|
||||
public static string GetExtensionFile(this string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Regex reg = new Regex(@"\.[0-9a-z]+$");
|
||||
Match match = reg.Match(fileName);
|
||||
if (match.Success)
|
||||
{
|
||||
return match.Groups[0].Value;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Utils
|
||||
{
|
||||
public class Utils
|
||||
{
|
||||
public static string GetMd5x2(string str)
|
||||
{
|
||||
MD5CryptoServiceProvider provider = new MD5CryptoServiceProvider();
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(str);
|
||||
bytes = provider.ComputeHash(bytes);
|
||||
StringBuilder builder = new StringBuilder();
|
||||
foreach (byte num in bytes)
|
||||
{
|
||||
builder.Append(num.ToString("x2").ToLower());
|
||||
}
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace APP.Utils
|
||||
{
|
||||
public class Utils
|
||||
{
|
||||
public static string GetMd5x2(string str)
|
||||
{
|
||||
MD5CryptoServiceProvider provider = new MD5CryptoServiceProvider();
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(str);
|
||||
bytes = provider.ComputeHash(bytes);
|
||||
StringBuilder builder = new StringBuilder();
|
||||
foreach (byte num in bytes)
|
||||
{
|
||||
builder.Append(num.ToString("x2").ToLower());
|
||||
}
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APP.Utils
|
||||
{
|
||||
public enum DbHelperEnum
|
||||
{
|
||||
[Description("Store procedure")]
|
||||
StoredProcedure = 1,
|
||||
|
||||
[Description("Command line")]
|
||||
Text = 2
|
||||
}
|
||||
}
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APP.Utils
|
||||
{
|
||||
public enum DbHelperEnum
|
||||
{
|
||||
[Description("Store procedure")]
|
||||
StoredProcedure = 1,
|
||||
|
||||
[Description("Command line")]
|
||||
Text = 2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"DBConnection": "Server=shu00;Database=dpm_dentis;user=sa;password=*shu29;MultipleActiveResultSets=true"
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ApiKey": "BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9n,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9nX,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9ny",
|
||||
"ApiCheck": "e913aab4-c2c5-4e33-ad24-d25848f748e7"
|
||||
}
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"DBConnection": "Server=shu00;Database=dpm_dentis;user=sa;password=*shu29;MultipleActiveResultSets=true"
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ApiKey": "BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9n,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9nX,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9ny",
|
||||
"ApiCheck": "e913aab4-c2c5-4e33-ad24-d25848f748e7"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"DBConnection": "Server=shu00;Database=dpm_dentis;user=sa;password=*shu29;MultipleActiveResultSets=true"
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ApiKey": "BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9n,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9nX,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9ny",
|
||||
"ApiCheck": "e913aab4-c2c5-4e33-ad24-d25848f748e7"
|
||||
}
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"DBConnection": "Server=shu00;Database=dpm_dentis;user=sa;password=*shu29;MultipleActiveResultSets=true"
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ApiKey": "BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9n,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9nX,BgWSbwCNM3pEiCxgIlDEyD7HFpUgKPeL8OPDqH9ny",
|
||||
"ApiCheck": "e913aab4-c2c5-4e33-ad24-d25848f748e7"
|
||||
}
|
||||
@@ -29,6 +29,7 @@
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {},
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files (x86)\\Syncfusion\\Essential Studio\\WinUI\\22.1.34\\NuGetPackages": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"E:\\Software-Projekte\\_NugetPackages": {},
|
||||
"http://nuget.grapecity.com/nuget": {}
|
||||
@@ -80,7 +81,8 @@
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
@@ -92,7 +94,7 @@
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.410\\RuntimeIdentifierGraph.json"
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.202\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,16 +7,13 @@
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Steafn Hutter lokal\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.11.2</NuGetToolVersion>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.5.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\Steafn Hutter lokal\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft\Xamarin\NuGet\" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.props')" />
|
||||
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore\6.1.4\build\Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore\6.1.4\build\Swashbuckle.AspNetCore.props')" />
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.targets')" />
|
||||
</ImportGroup>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -33,5 +33,8 @@ E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\DPMService.dll
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\DPMService.pdb
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\DPMService.genruntimeconfig.cache
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\DPMService.csproj.AssemblyReference.cache
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\staticwebassets\DPMService.StaticWebAssets.xml
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\scopedcss\bundle\DPMService.styles.css
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\staticwebassets\DPMService.StaticWebAssets.Pack.cache
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\staticwebassets\msbuild.DPMService.Microsoft.AspNetCore.StaticWebAssets.props
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\staticwebassets\msbuild.build.DPMService.props
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\staticwebassets\msbuild.buildMultiTargeting.DPMService.props
|
||||
E:\Software-Projekte\DPM\DPM2016\WebAPI\obj\Debug\netcoreapp3.1\staticwebassets\msbuild.buildTransitive.DPMService.props
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
<StaticWebAssets Version="1.0" />
|
||||
@@ -9,10 +9,14 @@
|
||||
"Newtonsoft.Json.Bson": "1.0.1"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netstandard2.0/System.Net.Http.Formatting.dll": {}
|
||||
"lib/netstandard2.0/System.Net.Http.Formatting.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Net.Http.Formatting.dll": {}
|
||||
"lib/netstandard2.0/System.Net.Http.Formatting.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.CSharp/4.3.0": {
|
||||
@@ -36,7 +40,9 @@
|
||||
"System.Threading": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.0/Microsoft.CSharp.dll": {}
|
||||
"ref/netstandard1.0/Microsoft.CSharp.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/Microsoft.CSharp.dll": {}
|
||||
@@ -74,10 +80,14 @@
|
||||
"Microsoft.OpenApi/1.2.3": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netstandard2.0/Microsoft.OpenApi.dll": {}
|
||||
"lib/netstandard2.0/Microsoft.OpenApi.dll": {
|
||||
"related": ".pdb;.xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.OpenApi.dll": {}
|
||||
"lib/netstandard2.0/Microsoft.OpenApi.dll": {
|
||||
"related": ".pdb;.xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Win32.Primitives/4.3.0": {
|
||||
@@ -88,7 +98,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/Microsoft.Win32.Primitives.dll": {}
|
||||
"ref/netstandard1.3/Microsoft.Win32.Primitives.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Win32.Registry/4.7.0": {
|
||||
@@ -98,10 +110,14 @@
|
||||
"System.Security.Principal.Windows": "4.7.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard2.0/_._": {}
|
||||
"ref/netstandard2.0/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {}
|
||||
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/unix/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
||||
@@ -194,10 +210,14 @@
|
||||
"System.Xml.XmlDocument": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netstandard1.3/Newtonsoft.Json.dll": {}
|
||||
"lib/netstandard1.3/Newtonsoft.Json.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/Newtonsoft.Json.dll": {}
|
||||
"lib/netstandard1.3/Newtonsoft.Json.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Newtonsoft.Json.Bson/1.0.1": {
|
||||
@@ -207,10 +227,14 @@
|
||||
"Newtonsoft.Json": "10.0.1"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netstandard1.3/Newtonsoft.Json.Bson.dll": {}
|
||||
"lib/netstandard1.3/Newtonsoft.Json.Bson.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/Newtonsoft.Json.Bson.dll": {}
|
||||
"lib/netstandard1.3/Newtonsoft.Json.Bson.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {
|
||||
@@ -437,10 +461,14 @@
|
||||
"Microsoft.OpenApi": "1.2.3"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll": {}
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll": {
|
||||
"related": ".pdb;.xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll": {}
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll": {
|
||||
"related": ".pdb;.xml"
|
||||
}
|
||||
},
|
||||
"frameworkReferences": [
|
||||
"Microsoft.AspNetCore.App"
|
||||
@@ -452,19 +480,27 @@
|
||||
"Swashbuckle.AspNetCore.Swagger": "6.1.4"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {}
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
|
||||
"related": ".pdb;.xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {}
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
|
||||
"related": ".pdb;.xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Swashbuckle.AspNetCore.SwaggerUI/6.1.4": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {}
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
|
||||
"related": ".pdb;.xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {}
|
||||
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
|
||||
"related": ".pdb;.xml"
|
||||
}
|
||||
},
|
||||
"frameworkReferences": [
|
||||
"Microsoft.AspNetCore.App"
|
||||
@@ -476,7 +512,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.6/System.AppContext.dll": {}
|
||||
"ref/netstandard1.6/System.AppContext.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.6/System.AppContext.dll": {}
|
||||
@@ -506,7 +544,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Collections.dll": {}
|
||||
"ref/netstandard1.3/System.Collections.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Collections.Concurrent/4.3.0": {
|
||||
@@ -524,7 +564,9 @@
|
||||
"System.Threading.Tasks": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Collections.Concurrent.dll": {}
|
||||
"ref/netstandard1.3/System.Collections.Concurrent.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Collections.Concurrent.dll": {}
|
||||
@@ -541,7 +583,9 @@
|
||||
"System.Threading": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Collections.NonGeneric.dll": {}
|
||||
"ref/netstandard1.3/System.Collections.NonGeneric.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Collections.NonGeneric.dll": {}
|
||||
@@ -559,7 +603,9 @@
|
||||
"System.Threading": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/_._": {}
|
||||
"ref/netstandard1.3/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Collections.Specialized.dll": {}
|
||||
@@ -571,7 +617,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.0/System.ComponentModel.dll": {}
|
||||
"ref/netstandard1.0/System.ComponentModel.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.ComponentModel.dll": {}
|
||||
@@ -585,7 +633,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.0/System.ComponentModel.Primitives.dll": {}
|
||||
"ref/netstandard1.0/System.ComponentModel.Primitives.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.0/System.ComponentModel.Primitives.dll": {}
|
||||
@@ -611,7 +661,9 @@
|
||||
"System.Threading": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.5/System.ComponentModel.TypeConverter.dll": {}
|
||||
"ref/netstandard1.5/System.ComponentModel.TypeConverter.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.5/System.ComponentModel.TypeConverter.dll": {}
|
||||
@@ -627,7 +679,9 @@
|
||||
"System.Text.Encoding": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Console.dll": {}
|
||||
"ref/netstandard1.3/System.Console.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Data.SqlClient/4.8.2": {
|
||||
@@ -638,10 +692,14 @@
|
||||
"runtime.native.System.Data.SqlClient.sni": "4.7.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netcoreapp2.1/System.Data.SqlClient.dll": {}
|
||||
"ref/netcoreapp2.1/System.Data.SqlClient.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp2.1/System.Data.SqlClient.dll": {}
|
||||
"lib/netcoreapp2.1/System.Data.SqlClient.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": {
|
||||
@@ -662,7 +720,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Diagnostics.Debug.dll": {}
|
||||
"ref/netstandard1.3/System.Diagnostics.Debug.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Diagnostics.DiagnosticSource/4.3.0": {
|
||||
@@ -675,10 +735,14 @@
|
||||
"System.Threading": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netstandard1.3/_._": {}
|
||||
"lib/netstandard1.3/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll": {}
|
||||
"lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Diagnostics.Tools/4.3.0": {
|
||||
@@ -689,7 +753,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.0/System.Diagnostics.Tools.dll": {}
|
||||
"ref/netstandard1.0/System.Diagnostics.Tools.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Diagnostics.Tracing/4.3.0": {
|
||||
@@ -700,7 +766,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.5/System.Diagnostics.Tracing.dll": {}
|
||||
"ref/netstandard1.5/System.Diagnostics.Tracing.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Dynamic.Runtime/4.3.0": {
|
||||
@@ -722,7 +790,9 @@
|
||||
"System.Threading": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Dynamic.Runtime.dll": {}
|
||||
"ref/netstandard1.3/System.Dynamic.Runtime.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Dynamic.Runtime.dll": {}
|
||||
@@ -736,7 +806,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Globalization.dll": {}
|
||||
"ref/netstandard1.3/System.Globalization.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Globalization.Calendars/4.3.0": {
|
||||
@@ -748,7 +820,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Globalization.Calendars.dll": {}
|
||||
"ref/netstandard1.3/System.Globalization.Calendars.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Globalization.Extensions/4.3.0": {
|
||||
@@ -762,7 +836,9 @@
|
||||
"System.Runtime.InteropServices": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/_._": {}
|
||||
"ref/netstandard1.3/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/unix/lib/netstandard1.3/System.Globalization.Extensions.dll": {
|
||||
@@ -785,7 +861,9 @@
|
||||
"System.Threading.Tasks": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.5/System.IO.dll": {}
|
||||
"ref/netstandard1.5/System.IO.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.IO.Compression/4.3.0": {
|
||||
@@ -808,7 +886,9 @@
|
||||
"runtime.native.System.IO.Compression": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.IO.Compression.dll": {}
|
||||
"ref/netstandard1.3/System.IO.Compression.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/unix/lib/netstandard1.3/System.IO.Compression.dll": {
|
||||
@@ -835,7 +915,9 @@
|
||||
"System.Text.Encoding": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.IO.Compression.ZipFile.dll": {}
|
||||
"ref/netstandard1.3/System.IO.Compression.ZipFile.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.IO.Compression.ZipFile.dll": {}
|
||||
@@ -854,7 +936,9 @@
|
||||
"System.Threading.Tasks": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.IO.FileSystem.dll": {}
|
||||
"ref/netstandard1.3/System.IO.FileSystem.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.IO.FileSystem.Primitives/4.3.0": {
|
||||
@@ -863,7 +947,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.IO.FileSystem.Primitives.dll": {}
|
||||
"ref/netstandard1.3/System.IO.FileSystem.Primitives.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.IO.FileSystem.Primitives.dll": {}
|
||||
@@ -879,7 +965,9 @@
|
||||
"System.Runtime.Extensions": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.6/System.Linq.dll": {}
|
||||
"ref/netstandard1.6/System.Linq.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.6/System.Linq.dll": {}
|
||||
@@ -907,7 +995,9 @@
|
||||
"System.Threading": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.6/System.Linq.Expressions.dll": {}
|
||||
"ref/netstandard1.6/System.Linq.Expressions.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.6/System.Linq.Expressions.dll": {}
|
||||
@@ -944,7 +1034,9 @@
|
||||
"runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Net.Http.dll": {}
|
||||
"ref/netstandard1.3/System.Net.Http.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/unix/lib/netstandard1.6/System.Net.Http.dll": {
|
||||
@@ -966,7 +1058,9 @@
|
||||
"System.Runtime.Handles": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Net.Primitives.dll": {}
|
||||
"ref/netstandard1.3/System.Net.Primitives.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Net.Sockets/4.3.0": {
|
||||
@@ -980,7 +1074,9 @@
|
||||
"System.Threading.Tasks": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Net.Sockets.dll": {}
|
||||
"ref/netstandard1.3/System.Net.Sockets.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.ObjectModel/4.3.0": {
|
||||
@@ -993,7 +1089,9 @@
|
||||
"System.Threading": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.ObjectModel.dll": {}
|
||||
"ref/netstandard1.3/System.ObjectModel.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.ObjectModel.dll": {}
|
||||
@@ -1009,7 +1107,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.5/System.Reflection.dll": {}
|
||||
"ref/netstandard1.5/System.Reflection.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Reflection.Emit/4.3.0": {
|
||||
@@ -1022,7 +1122,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.1/_._": {}
|
||||
"ref/netstandard1.1/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Reflection.Emit.dll": {}
|
||||
@@ -1036,7 +1138,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.0/_._": {}
|
||||
"ref/netstandard1.0/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Reflection.Emit.ILGeneration.dll": {}
|
||||
@@ -1051,7 +1155,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.0/_._": {}
|
||||
"ref/netstandard1.0/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Reflection.Emit.Lightweight.dll": {}
|
||||
@@ -1066,7 +1172,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.0/System.Reflection.Extensions.dll": {}
|
||||
"ref/netstandard1.0/System.Reflection.Extensions.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Reflection.Primitives/4.3.0": {
|
||||
@@ -1077,7 +1185,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.0/System.Reflection.Primitives.dll": {}
|
||||
"ref/netstandard1.0/System.Reflection.Primitives.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Reflection.TypeExtensions/4.3.0": {
|
||||
@@ -1087,7 +1197,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.5/_._": {}
|
||||
"ref/netstandard1.5/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.5/System.Reflection.TypeExtensions.dll": {}
|
||||
@@ -1103,7 +1215,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.0/System.Resources.ResourceManager.dll": {}
|
||||
"ref/netstandard1.0/System.Resources.ResourceManager.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime/4.3.0": {
|
||||
@@ -1113,7 +1227,9 @@
|
||||
"Microsoft.NETCore.Targets": "1.1.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.5/System.Runtime.dll": {}
|
||||
"ref/netstandard1.5/System.Runtime.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime.Extensions/4.3.0": {
|
||||
@@ -1124,7 +1240,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.5/System.Runtime.Extensions.dll": {}
|
||||
"ref/netstandard1.5/System.Runtime.Extensions.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime.Handles/4.3.0": {
|
||||
@@ -1135,7 +1253,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Runtime.Handles.dll": {}
|
||||
"ref/netstandard1.3/System.Runtime.Handles.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime.InteropServices/4.3.0": {
|
||||
@@ -1189,7 +1309,9 @@
|
||||
"System.Runtime.Extensions": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.1/System.Runtime.Numerics.dll": {}
|
||||
"ref/netstandard1.1/System.Runtime.Numerics.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Runtime.Numerics.dll": {}
|
||||
@@ -1218,7 +1340,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {}
|
||||
"ref/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {}
|
||||
@@ -1231,10 +1355,14 @@
|
||||
"System.Security.Principal.Windows": "4.7.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard2.0/_._": {}
|
||||
"ref/netstandard2.0/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Security.AccessControl.dll": {}
|
||||
"lib/netstandard2.0/System.Security.AccessControl.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll": {
|
||||
@@ -1356,7 +1484,9 @@
|
||||
"runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Security.Cryptography.Encoding.dll": {}
|
||||
"ref/netstandard1.3/System.Security.Cryptography.Encoding.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll": {
|
||||
@@ -1447,7 +1577,9 @@
|
||||
"runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll": {}
|
||||
"ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll": {
|
||||
@@ -1463,10 +1595,14 @@
|
||||
"System.Security.Principal.Windows/4.7.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"ref/netcoreapp3.0/_._": {}
|
||||
"ref/netcoreapp3.0/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {}
|
||||
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
||||
@@ -1487,7 +1623,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Text.Encoding.dll": {}
|
||||
"ref/netstandard1.3/System.Text.Encoding.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Text.Encoding.Extensions/4.3.0": {
|
||||
@@ -1499,7 +1637,9 @@
|
||||
"System.Text.Encoding": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Text.Encoding.Extensions.dll": {}
|
||||
"ref/netstandard1.3/System.Text.Encoding.Extensions.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Text.RegularExpressions/4.3.0": {
|
||||
@@ -1521,7 +1661,9 @@
|
||||
"System.Threading.Tasks": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Threading.dll": {}
|
||||
"ref/netstandard1.3/System.Threading.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Threading.dll": {}
|
||||
@@ -1535,7 +1677,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Threading.Tasks.dll": {}
|
||||
"ref/netstandard1.3/System.Threading.Tasks.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Threading.Tasks.Extensions/4.3.0": {
|
||||
@@ -1546,10 +1690,14 @@
|
||||
"System.Threading.Tasks": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/netstandard1.0/_._": {}
|
||||
"lib/netstandard1.0/_._": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.0/System.Threading.Tasks.Extensions.dll": {}
|
||||
"lib/netstandard1.0/System.Threading.Tasks.Extensions.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Threading.Timer/4.3.0": {
|
||||
@@ -1560,7 +1708,9 @@
|
||||
"System.Runtime": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.2/System.Threading.Timer.dll": {}
|
||||
"ref/netstandard1.2/System.Threading.Timer.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Xml.ReaderWriter/4.3.0": {
|
||||
@@ -1583,7 +1733,9 @@
|
||||
"System.Threading.Tasks.Extensions": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Xml.ReaderWriter.dll": {}
|
||||
"ref/netstandard1.3/System.Xml.ReaderWriter.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Xml.ReaderWriter.dll": {}
|
||||
@@ -1606,7 +1758,9 @@
|
||||
"System.Xml.ReaderWriter": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Xml.XDocument.dll": {}
|
||||
"ref/netstandard1.3/System.Xml.XDocument.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Xml.XDocument.dll": {}
|
||||
@@ -1627,7 +1781,9 @@
|
||||
"System.Xml.ReaderWriter": "4.3.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard1.3/System.Xml.XmlDocument.dll": {}
|
||||
"ref/netstandard1.3/System.Xml.XmlDocument.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.Xml.XmlDocument.dll": {}
|
||||
@@ -5919,6 +6075,7 @@
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\FastReports\\FastReport.Net\\Nugets": {},
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files (x86)\\Syncfusion\\Essential Studio\\WinUI\\22.1.34\\NuGetPackages": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"E:\\Software-Projekte\\_NugetPackages": {},
|
||||
"http://nuget.grapecity.com/nuget": {}
|
||||
@@ -5970,7 +6127,8 @@
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
@@ -5982,8 +6140,16 @@
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.410\\RuntimeIdentifierGraph.json"
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.202\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"logs": [
|
||||
{
|
||||
"code": "NU1803",
|
||||
"level": "Warning",
|
||||
"warningLevel": 1,
|
||||
"message": "You are running the 'restore' operation with an 'HTTP' source, 'http://nuget.grapecity.com/nuget'. Non-HTTPS access will be removed in a future version. Consider migrating to an 'HTTPS' source."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "RgUy3PgbidleUVTu3qKF9gXVLwoBtOirYvTKkGgGo11egoUJp1c+4eKkeuyVHHC4ofkf1SpIgOCbG9p38HpC3A==",
|
||||
"dgSpecHash": "u91K9sWwKVvqv2YtrqSxzI4HGVqFGFFPtJPPSfNZ4K/TRUcJ3s0GxPdZQYJewlmjO4ZwWmsnls3OUpZ2P26SHw==",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Software-Projekte\\DPM\\DPM2016\\WebAPI\\DPMService.csproj",
|
||||
"expectedPackageFiles": [
|
||||
@@ -105,5 +105,12 @@
|
||||
"C:\\Users\\Steafn Hutter lokal\\.nuget\\packages\\system.xml.xdocument\\4.3.0\\system.xml.xdocument.4.3.0.nupkg.sha512",
|
||||
"C:\\Users\\Steafn Hutter lokal\\.nuget\\packages\\system.xml.xmldocument\\4.3.0\\system.xml.xmldocument.4.3.0.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
"logs": [
|
||||
{
|
||||
"code": "NU1803",
|
||||
"level": "Warning",
|
||||
"warningLevel": 1,
|
||||
"message": "You are running the 'restore' operation with an 'HTTP' source, 'http://nuget.grapecity.com/nuget'. Non-HTTPS access will be removed in a future version. Consider migrating to an 'HTTPS' source."
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user