Update 20260123

This commit is contained in:
Stefan Hutter
2026-01-23 08:09:23 +01:00
parent 49155d898f
commit 2d1525575b
358 changed files with 123777 additions and 73 deletions

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace OnDocAPI_NetFramework.Helper
{
public class DBHelper
{
string connectionstring = "";
public DBHelper(string connectionstring)
{
this.connectionstring = connectionstring;
}
}
}

View File

@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using DataMatrix.net;
namespace OnDocAPI_NetFramework.Helper
{
public class ImageHelper
{
public void CalculateImageSize(System.Drawing.Image img, out double targetHeight, out double targetWidth)
{
targetHeight = 0;
targetWidth = 0;
}
public System.Drawing.Image Datamatrix(int width, int heigth, int left, int top, List<string>values)
{
//int imageWidth = 304; // 250; // 142;
//int imageHeight = 45; // 37; // 31;
//JToken jObject = JToken.Parse(value);
//bool show = jObject.Value<bool>("Show");
//if (show)
//{
// string dokumentId = jObject.Value<string>("DokumentId");
// if (dokumentId == null)
// {
// dokumentId = "123456Edoka Dok Id fehlt!";
// }
// string avqAuthExtlRef = jObject.Value<string>("AvqAuthExtlRef");
// string PartnerNr = jObject.Value<string>("PartnerNr");
// string PersonNr = jObject.Value<string>("PersonNr");
// string PersonNr1 = jObject.Value<string>("PersonNr1");
// string text = "imaq$" + dokumentId.Substring(6) + "$0002$" + avqAuthExtlRef + "$" + PartnerNr + "$" + PersonNr + "$" + PersonNr1;
// Bitmap dataMatrixBitmap = new DmtxImageEncoder().EncodeImage(text); //.Save("test1.png");
// Bitmap textBitmap = new Bitmap(4000, 600);
// using (Graphics g = Graphics.FromImage(textBitmap))
// {
// g.DrawImage(dataMatrixBitmap, 0, 0, 600, 600);
// g.DrawString(dokumentId.Substring(6) + " U", new Font("Futura Book", 84), Brushes.Black, 650, 360);
// }
// byte[] textPng = null;
// using (MemoryStream m = new MemoryStream())
// {
// textBitmap.Save(m, System.Drawing.Imaging.ImageFormat.Png);
// textPng = m.GetBuffer();
// }
//}
return null;
}
}
}