You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.4 KiB
43 lines
1.4 KiB
using Dapper;
|
|
using Microsoft.Data.SqlClient;
|
|
using Npgsql;
|
|
using Oracle.ManagedDataAccess.Client;
|
|
using Shentun.Utilities;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data.Common;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Shentun.WebPeis.PlugIns.ColumnReferences
|
|
{
|
|
public class ColumnReferencePlugInsDbBase : ColumnReferencePlugInsBase
|
|
{
|
|
|
|
public ColumnReferencePlugInsDbBase(string parmValue) : base(parmValue)
|
|
{
|
|
InterfaceSql = InterfaceConfig.GetSection("Interface").GetSection("Sql").Value;
|
|
InterfaceDbType = InterfaceConfig.GetSection("Interface").GetSection("DbType").Value;
|
|
InterfaceConnctionStr = InterfaceConfig.GetSection("Interface").GetSection("ConnectionStrings").Value;
|
|
}
|
|
|
|
|
|
public override async Task<List<ColumnReferenceCodeValue>> GetInterfaceCodeValuesAsync()
|
|
{
|
|
using (DbConnection conn = CreateInterfaceDbConnect())
|
|
{
|
|
var list = (await conn.QueryAsync<ColumnReferenceCodeValue>(InterfaceSql)).ToList();
|
|
foreach (var item in list)
|
|
{
|
|
if(string.IsNullOrWhiteSpace(item.SimpleCode))
|
|
{
|
|
item.SimpleCode = LanguageConverter.GetPYSimpleCode(item.DisplayName);
|
|
}
|
|
|
|
}
|
|
return list;
|
|
}
|
|
}
|
|
}
|
|
}
|