/// <summary> /// 获取数据对象 /// </summary> /// <param name="dt"></param> /// <returns></returns> public static BaseData GetBaseData(Model.Synergismlogdt dt) { DAL.DLLReflect dal = new DAL.DLLReflect(); Model.DLLReflect model = dal.GetModel("cvouchertype='" + dt.Cvouchertype + "' and ClassType='data' and tasktype = " + dt.TaskType); Common.ErrorMsg(model, "未能取到数据对象"); return((BaseData)System.Reflection.Assembly.Load(model.Dllpath).CreateInstance(model.Npace + "." + model.ClassName, true, System.Reflection.BindingFlags.CreateInstance, null, new object[] { model.TaskType }, null, null)); }
/// <summary> /// 任务Main BLL 工厂 /// </summary> /// <param name="tasktype"></param> /// <returns></returns> public static BLL.TaskLog.ITaskLogMain GetITaskLogMainBLL(int taskType) { DAL.DLLReflect dal = new DAL.DLLReflect(); Model.DLLReflect model = dal.GetModel("ClassType='logBLL' and tasktype = " + taskType); Common.ErrorMsg(model, "未能取到数据对象"); return((BLL.TaskLog.ITaskLogMain)System.Reflection.Assembly.Load(model.Dllpath).CreateInstance(model.Npace + "." + model.ClassName, true, System.Reflection.BindingFlags.CreateInstance, null, null, null, null)); }
/// <summary> /// 获取操作对象 /// </summary> /// <param name="dt"></param> /// <returns></returns> public static BaseOp GetBaseOp(Model.Synergismlog dt) { DAL.DLLReflect dal = new DAL.DLLReflect(); string swhere = "cvouchertype='" + dt.Cvouchertype + "' and ClassType='op' and tasktype = " + dt.TaskType; Model.DLLReflect model = dal.GetModel(swhere); Common.ErrorMsg(model, "未能取到操作类型对象"); return((BaseOp)System.Reflection.Assembly.Load(model.Dllpath).CreateInstance(model.Npace + "." + model.ClassName)); }