2025-04-15 12:10:19 +02:00

41 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace PDFGenerator.BusinessLayer.Utils
{
public class SqlDataManager
{
public DataThread ActiveDataThread { get; private set; }
public DataRow ActiveData { get; private set; }
public ReportType ActiveType { get; private set; }
public SqlDataManager(DataThread thread, ReportType type)
{
ActiveDataThread = thread;
ActiveType = type;
ActiveData = GetData(ActiveDataThread, type);
}
public string GetValueAsString(string name, string areaCode = null)
{
return areaCode;
}
public int GetValueAsNumber(string name, string areaCode = null)
{
return 1;
}
private DataRow GetData(DataThread thread, ReportType type)
{
string sql = "Select ";
DataTable dt = DataAccess.ExecuteDataTable(DBProvider.SqlServerStampeC6, CommandType.Text, sql);
return dt.Rows[0];
}
}
}