资源简介
Epicor10二次开发代码,对Adapter使用封装,以及UD表使用加强封装.
采用反射方式调用对应Adapter中的方法.

代码片段和文件信息
using Ice.Lib.framework;
using Ice.Lib.Searches;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace Epicor.SynergyIT
{
public class Adpbase
{
public EpiTransaction oTrans = null;
private Type Type = null;
private object Adp = null;
public string AdpName = ““;
public Adpbase()
{
}
public Adpbase(object otransstring adpName string className1 = null)
{
InitAdp(otrans adpName className1);
}
/// 初始化Adapter
public void InitAdp(object otrans string adpName string className1 = null)
{
oTrans = (EpiTransaction)otrans;
AdpName = adpName;
string dllfile = “Erp.Adapters.“ + AdpName + “.dll“;
string className = “Erp.Adapters.“ + AdpName + “Adapter“;
if (!File.Exists(Application.StartupPath + @“\“ + dllfile))
{
dllfile = “Ice.Adapters.“ + AdpName + “.dll“;
className = “Ice.Adapters.“ + AdpName + “Adapter“;
}
if (!File.Exists(Application.StartupPath + @“\“ + dllfile))
{
dllfile = AdpName;
className = className1;
}
Assembly assembly = Assembly.LoadFrom(Application.StartupPath + @“\“ + dllfile);
Type = assembly.GetType(className);
Adp = Activator.CreateInstance(Type new object[] { otrans });
BOConnect();
}
/// 析构函数
~Adpbase()
{
Dispose();
}
///批量新增数据
public int InsertData(string newFunName DataTable dt List excludeCols = nullstring[] colsName=nullType[] type=null)
{
int result = 0;
try
{
for (int r1 = 0; r1 < dt.Rows.Count; r1++)
{
DataRow dr = dt.Rows[r1];
bool bl1 = false;
if (colsName != null) {
Listject> obj = new Listject>();
for (int i = 0; i < colsName.Length; i++) obj.Add(dr[colsName[i]]);
bl1 = (bool)InvokeFun(newFunName obj.ToArray()type);
}
else bl1 = (bool)InvokeFun(newFunName);
if (bl1)
{
DataSet ds1 = GetCurrentDataSet();
string tableName = dt.TableName;
if (!ds1.Tables.Contains(tableName))
{
throw new Exception(“This DataSet does not contain ‘“ + tableName + “‘ table.“);
}
int r = ds1.Tables[tableName].Rows.Count - 1;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 9930 2018-11-13 11:48 Adpba
文件 2742 2018-11-13 11:48 AdpUDba
- 上一篇:基于waveIn API的录音器
- 下一篇:TSNE 降维方法
相关资源
- SVNDrv.sys
- USB网卡驱动 USB2.0 TO Fast Ethernet Adapte
- IPCamAdapter_x64
-
TP-li
nk WIRELESS USB ADAPTER无线驱动程序 - List控件使用---SimpleAdapter使用详解一
- Optimized ScrollView Adapter 4.2
- ListView +RatingBar +TextView +adapter
-
listview+ba
seAdapter + AsyncTask异步请求网 - IPCamAdapter.msi程序
- Epicor10创建快速搜索
- 用一个RecyclerView实现仿京东、天猫的
- Optimized ScrollView Adapter v3.0.2
- 滑动效果的带标题的Tab页,每个Tab页
- Optimized ScrollView Adapter V5.1.2
- ipcamadapter_x64 ip camera adapter 64 bit
- canal 1.1.4 安装包合集,包括deployer a
- Flutter学习之旅(六)----ListView控件自
- Epicor10 中文安装手册
- esxi_5.5_no_network_adapters解决方案
- Microsoft_LoopBack_Adapter
- Microsoft Loopback Adapter Cracked x64 AMD64
- ListView中使用自定义Adapter及时更新数
- ADMtek AN983 FastNIC Ethernet Adapter Win7驱动
- arcgis10.3.1正式版完整版包含desktop+se
- usb 2.0 to fast ethernet adapter
- Optimized ScrollView Adapter-V3.2.unitypackage
- Tap-Windows Adapter V9虚拟网卡 tap-windows
- Apple USB Ethernet Adapter苹果USB网卡驱动支
- NETGEAR WG111 802.11g Wireless USB2.0 Adapter无
评论
共有 条评论