1
This commit is contained in:
@@ -5,22 +5,21 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using NoteManageAR;
|
||||
|
||||
namespace UFIDA.U8.Framework.Api.ControlObject.Common
|
||||
{
|
||||
public class APARHelper
|
||||
{
|
||||
protected readonly ILog logInfo = LogManager.GetLogger("logInfo");
|
||||
private readonly VoucherData _vd;
|
||||
//private readonly VoucherData _vd;
|
||||
private readonly PropertyInfo[] _props;
|
||||
|
||||
public APARHelper(VoucherDataClass vd)
|
||||
{
|
||||
_vd = vd;
|
||||
var tp = vd.GetType();
|
||||
_props = tp.GetProperties();
|
||||
}
|
||||
//public APARHelper(VoucherDataClass vd)
|
||||
//{
|
||||
// _vd = vd;
|
||||
// var tp = vd.GetType();
|
||||
// _props = tp.GetProperties();
|
||||
//}
|
||||
|
||||
public void SetValue(Dictionary<string, object> dictionary)
|
||||
{
|
||||
@@ -33,7 +32,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.Common
|
||||
{
|
||||
var prop = _props.First(a => string.Equals(a.Name, key, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
prop.SetPropValue(_vd, dictionary[key]);
|
||||
//prop.SetPropValue(_vd, dictionary[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user