Compare commits
3 Commits
8703dff7d5
...
835fa8fd00
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
835fa8fd00 | ||
|
|
8dcbfd8bc4 | ||
|
|
d0cb41d13d |
@ -5,6 +5,7 @@ using APT.BaseData.Domain.IServices.BI;
|
|||||||
using APT.BaseData.Domain.IServices.BS;
|
using APT.BaseData.Domain.IServices.BS;
|
||||||
using APT.BaseData.Domain.IServices.EX;
|
using APT.BaseData.Domain.IServices.EX;
|
||||||
using APT.BaseData.Domain.IServices.FM;
|
using APT.BaseData.Domain.IServices.FM;
|
||||||
|
using APT.BaseData.Domain.IServices.OP;
|
||||||
using APT.BaseData.Domain.IServices.Platform;
|
using APT.BaseData.Domain.IServices.Platform;
|
||||||
using APT.BaseData.Services.DomainServices;
|
using APT.BaseData.Services.DomainServices;
|
||||||
using APT.BaseData.Services.Services.AE;
|
using APT.BaseData.Services.Services.AE;
|
||||||
@ -13,6 +14,7 @@ using APT.BaseData.Services.Services.BI;
|
|||||||
using APT.BaseData.Services.Services.BS;
|
using APT.BaseData.Services.Services.BS;
|
||||||
using APT.BaseData.Services.Services.EX;
|
using APT.BaseData.Services.Services.EX;
|
||||||
using APT.BaseData.Services.Services.FM;
|
using APT.BaseData.Services.Services.FM;
|
||||||
|
using APT.BaseData.Services.Services.OP;
|
||||||
using APT.BaseData.Services.Services.Platform;
|
using APT.BaseData.Services.Services.Platform;
|
||||||
using APT.BaseData.Services.Sys;
|
using APT.BaseData.Services.Sys;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
@ -66,6 +68,7 @@ namespace APT.HM.WebApi.App_Start
|
|||||||
builder.RegisterType<BIHomeService>().As<IBIHomeService>().InstancePerLifetimeScope();
|
builder.RegisterType<BIHomeService>().As<IBIHomeService>().InstancePerLifetimeScope();
|
||||||
builder.RegisterType<FMNoticeService>().As<IFMNoticeService>().InstancePerLifetimeScope();
|
builder.RegisterType<FMNoticeService>().As<IFMNoticeService>().InstancePerLifetimeScope();
|
||||||
builder.RegisterType<SENewUserService>().As<ISENewUserService>().InstancePerLifetimeScope();
|
builder.RegisterType<SENewUserService>().As<ISENewUserService>().InstancePerLifetimeScope();
|
||||||
|
builder.RegisterType<OPTenantDBConnService>().As<IOPTenantDBConnService>().InstancePerLifetimeScope();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Http;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@ -1198,6 +1199,38 @@ namespace APT.Utility
|
|||||||
}
|
}
|
||||||
return age;
|
return age;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DataTable 转 List
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
/// <param name="dt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<T> TableToList<T>(DataTable dt) where T : new()
|
||||||
|
{
|
||||||
|
List<T> ts = new List<T>();
|
||||||
|
Type type = typeof(T);
|
||||||
|
string tempName = "";
|
||||||
|
|
||||||
|
foreach (DataRow dr in dt.Rows)
|
||||||
|
{
|
||||||
|
T t = new T();
|
||||||
|
PropertyInfo[] propertys = t.GetType().GetProperties();
|
||||||
|
foreach (PropertyInfo pi in propertys)
|
||||||
|
{
|
||||||
|
tempName = pi.Name;
|
||||||
|
if (dt.Columns.Contains(tempName))
|
||||||
|
{
|
||||||
|
if (!pi.CanWrite) continue;
|
||||||
|
object value = dr[tempName];
|
||||||
|
if (value != DBNull.Value)
|
||||||
|
pi.SetValue(t, value, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ts.Add(t);
|
||||||
|
}
|
||||||
|
return ts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public class BitAnd
|
public class BitAnd
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user