56 lines
1.3 KiB
C#
56 lines
1.3 KiB
C#
using DeviceRepair.DataAccess.Data;
|
|
using DeviceRepair.Models;
|
|
using DeviceRepair.Models.History;
|
|
using DeviceRepair.Models.Preserve;
|
|
using DeviceRepair.Utils;
|
|
using NLog;
|
|
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Linq;
|
|
|
|
namespace DeviceRepair.DataAccess.SysCommon
|
|
{
|
|
public class SysConfigDa : BaseDa
|
|
{
|
|
private static readonly Logger log = LogManager.GetCurrentClassLogger();
|
|
|
|
public SysConfigDa() : base()
|
|
{
|
|
|
|
}
|
|
|
|
public SysConfigDa(IDictionary<string, string> apiParams) : base(apiParams)
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取全部配置信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public DataSet GetDatas()
|
|
{
|
|
DataSet dsDatas = new DataSet("Datas");
|
|
try
|
|
{
|
|
List<SysConfigInfo> Datas = devMain.Queryable<SysConfigInfo>()?.ToList();
|
|
DataTable table = Datas.ToDataTable();
|
|
dsDatas.Tables.Add(table);
|
|
return dsDatas;
|
|
}
|
|
catch (SqlException sqlEx)
|
|
{
|
|
throw sqlEx;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|