(Object/(DataSet,DataReader) Relational Mapping)ODRM模式更新20070131

新修改ODRM函数库
1.增加SortedList对象,并且IBatisNet支持SortedList作为参数传递
ODRM模式下载地址:
http://files.cnblogs.com/mail-ricklee/ODRM.part01.rar
http://files.cnblogs.com/mail-ricklee/ODRM.part02.rar
http://files.cnblogs.com/mail-ricklee/ODRM.part03.rar

ODRMTemp_Default.cs演示代码
ContractedBlock.gif ExpandedBlockStart.gif ODRMTemp_Default
None.gifusing System;
None.gif
using System.Data;
None.gif
using System.Configuration;
None.gif
using System.Collections;
None.gif
using System.Web;
None.gif
using System.Web.Security;
None.gif
using System.Web.UI;
None.gif
using System.Web.UI.WebControls;
None.gif
using System.Web.UI.WebControls.WebParts;
None.gif
using System.Web.UI.HtmlControls;
ContractedBlock.gifExpandedBlockStart.gif
自定义命名空间#region 自定义命名空间
InBlock.gif
using System.Collections.Generic;
InBlock.gif
using System.Collections.Specialized;
InBlock.gif
InBlock.gif
using NickLee.Common;
InBlock.gif
using IBatisNet.DataMapper;
InBlock.gif
using IBatisNet.DataMapper.Exceptions;
ExpandedBlockEnd.gif
#endregion

None.gif
None.gif
public partial class ODRMTemp_Default : System.Web.UI.Page
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//// <summary>
InBlock.gif    
/// 页面载入函数
InBlock.gif    
/// </summary>
InBlock.gif    
/// <param name="sender"></param>
ExpandedSubBlockEnd.gif    
/// <param name="e"></param>

InBlock.gif    protected void Page_Load(object sender, EventArgs e)
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
ExpandedSubBlockEnd.gif    }

InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif    
一级函数.公共#region 一级函数.公共
InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif    
模拟函数(ODRM.EvalMethod)#region 模拟函数(ODRM.EvalMethod)
InBlock.gif    
public static string xx(ref string jj, int yy)
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
string temp = jj;
InBlock.gif        jj 
= jj + "_Add";
InBlock.gif        
return temp;
ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif    
public virtual string GG(ref string jj, int yy)
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
string temp = jj;
InBlock.gif        jj 
= jj + "_Add";
InBlock.gif        
return temp;
ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif    
public string MM(ref string jj, int yy)
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
string temp = jj;
InBlock.gif        jj 
= jj + "_Add";
InBlock.gif        
return temp;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockEnd.gif    
#endregion

InBlock.gif
ExpandedSubBlockEnd.gif    
#endregion

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//// <summary>
InBlock.gif    
/// 模拟函数(ODRM.EvalMethod)按钮事件
InBlock.gif    
/// </summary>
InBlock.gif    
/// <param name="sender"></param>
ExpandedSubBlockEnd.gif    
/// <param name="e"></param>

InBlock.gif    protected void Button1_Click(object sender, EventArgs e)
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        ODRMTemp_Default objModel 
= new ODRMTemp_Default();
InBlock.gif        Hashtable table 
= new Hashtable();
InBlock.gif        table.Add(
"jj""sdfdsfds");
InBlock.gif        table.Add(
"yy"55);
InBlock.gif
InBlock.gif        SortedList list 
= new SortedList();
InBlock.gif        list.Add(
"jj""sdfdsfds");
InBlock.gif        list.Add(
"yy"55);
InBlock.gif
InBlock.gif        
object[] xx = new object[table.Count];
InBlock.gif        
object returnobj = new object();
InBlock.gif
InBlock.gif        xx 
= ODRM.EvalMethod(objModel, "xx", table, ref returnobj);
InBlock.gif        xx 
= ODRM.EvalMethod(objModel, "MM", table, ref returnobj);
InBlock.gif        xx 
= ODRM.EvalMethod(objModel, "GG", table, ref returnobj);
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//// <summary>
InBlock.gif    
/// parameterClass='System.Collections.IDictionary'测试
InBlock.gif    
/// </summary>
InBlock.gif    
/// <param name="sender"></param>
ExpandedSubBlockEnd.gif    
/// <param name="e"></param>

InBlock.gif    protected void Button2_Click(object sender, EventArgs e)
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
try
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ContractedSubBlock.gifExpandedSubBlockStart.gif            
键值对测试#region 键值对测试
InBlock.gif            
//通过:泛型键值对通过
InBlock.gif
            Dictionary<objectobject> test = new Dictionary<objectobject>();
InBlock.gif            test.Add(
"NAME""nick");
InBlock.gif            test.Add(
"LOGINNAME""nick");
InBlock.gif            
//通过:无排序键值对通过
InBlock.gif            
//Hashtable test = new Hashtable();
InBlock.gif            
//test.Add("NAME", "nick");
InBlock.gif            
//test.Add("LOGINNAME", "nick");
InBlock.gif            
//通过:可排序键值对通过
InBlock.gif            
//SortedList test = new SortedList();
InBlock.gif            
//test.Add("NAME", "nick");
InBlock.gif            
//test.Add("LOGINNAME", "nick");
InBlock.gif            
//通过:但不建议用ListDictionary作为传递参数
InBlock.gif            
//可以用Hashtable,SortedList替代,因NickLee.ODRM不提供ListDictionary与其他对象互换函数
InBlock.gif            
//ListDictionary test = new ListDictionary();
InBlock.gif            
//test.Add("NAME", "nick");
InBlock.gif            
//test.Add("LOGINNAME", "nick");
ExpandedSubBlockEnd.gif
            #endregion

InBlock.gif           
ContractedSubBlock.gifExpandedSubBlockStart.gif            
单个函数测试#region 单个函数测试
InBlock.gif            
//通过:string,int,等单个类型通过,那么所有单个类型都通过
InBlock.gif            
//但仅仅用于非动态情况,如:Select * from xx where Name=#Name# and User=#User#,
InBlock.gif            
//不能包含动态配置
InBlock.gif            
//string test = "nick";
InBlock.gif            
//int test = 1;
ExpandedSubBlockEnd.gif
            #endregion

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif            
/**//*
InBlock.gif             * 注意:null也通过
ExpandedSubBlockEnd.gif             
*/

InBlock.gif            
//DataSet set1=Mapper.Instance().QueryForDataSet("SelectXTM_UserListTemp_Test",null);
InBlock.gif
            DataSet set1 = Mapper.Instance().QueryForDataSet("Selectbasedata_UserListTest", test);
InBlock.gif
InBlock.gif            Dictionary
<object,object> dic=new Dictionary<object,object>();
InBlock.gif            
if(set1.Tables[0].Rows[0]!=null)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                dic
=ODRM.DataRowConvertDictionary(set1.Tables[0].Rows[0]);
ExpandedSubBlockEnd.gif            }

InBlock.gif            
InBlock.gif            GridView1.DataSource 
= set1.Tables[0];
InBlock.gif            GridView1.DataBind();
ExpandedSubBlockStart.gifContractedSubBlock.gif            
/**//*
InBlock.gif             *    测试说明
InBlock.gif             * 1.如果parameterClass='System.Collections.IDictionary',
InBlock.gif             *   那么无论键值对类型还是普通的string,intdot.gif单个类型,
InBlock.gif             *   在传入的时候,如果有#Name#,#User#等多个函数的情况下,
InBlock.gif             *   键值对类型会一一对应,而普通的string,int,等单个类型会直接吧#Name#,#User#等多个函数都替换为单个值和类型
InBlock.gif             * 2.不包括对象类型数据
InBlock.gif             * 3.普通的string,intdot.gif单个类型,可以直接替换#value#,但不能包含动态配置,如isNotEmpty等
InBlock.gif             * 4.建议
InBlock.gif             *   4.1:parameterClass='System.Collections.IDictionary',全部使用System.Collections.IDictionary传递,以满足更好的可扩充参数类型性
InBlock.gif             *       ODRM.rar包中最新的IBatis代码生成器:LLBLGen.exe可以自动生成parameterClass='System.Collections.IDictionary'
InBlock.gif             *   4.2:
InBlock.gif             *       键值对,Hashtable,DataSet,对象实体之间互换函数参考:NickLee.Common.ODRM命名空间下函数
InBlock.gif             *   
ExpandedSubBlockEnd.gif             
*/

ExpandedSubBlockEnd.gif        }

InBlock.gif        
catch (System.Exception ee)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
throw ee;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif    
ExpandedBlockEnd.gif}

None.gif


函数库说明:
ContractedBlock.gif ExpandedBlockStart.gif ODRM
None.gifusing System;
None.gif
using System.Collections;
None.gif
using System.Data;
None.gif
using System.Reflection;
None.gif
None.gif
namespace NickLee.Common
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif    
// 摘要:
InBlock.gif    
//     Object/DataSet Relational Mapping(对象/数据集关系映射)
InBlock.gif
    public class ODRM
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
public ODRM();
InBlock.gif
InBlock.gif        
// 摘要:
InBlock.gif        
//     转换为DataTable
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   Source:
InBlock.gif        
//     数据源
InBlock.gif        
//
InBlock.gif        
//   DataMember:
InBlock.gif        
//     数据表名称
InBlock.gif
        public static DataTable ConvertDataTable(object Source, string DataMember);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     返回DataTable为哈希表键值对
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   SourceRow:
InBlock.gif        
//     数据行对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后哈希表
InBlock.gif
        public static Hashtable DataRowConvertHashtable(DataRow SourceRow);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     返回DataTable为哈希表键值对
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   SourceRow:
InBlock.gif        
//     数据行对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后哈希表
InBlock.gif
        public static SortedList DataRowConvertSortedList(DataRow SourceRow);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     数据集中一行DataRow转换为指定对象,并填充数据
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   row:
InBlock.gif        
//     数据集中一行
InBlock.gif        
//
InBlock.gif        
//   objModel:
InBlock.gif        
//     指定对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后对象
InBlock.gif
        public static object DataTableConvertObject(DataRow row, object objModel);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     数据集中一行DataRow转换为指定对象,并填充数据 baseAssembly请使用:System.Reflection.Assembly.LoadFrom()获取程序集
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   row:
InBlock.gif        
//     数据集中一行
InBlock.gif        
//
InBlock.gif        
//   baseAssembly:
InBlock.gif        
//     程序集
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     完整路径类名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后对象
InBlock.gif
        public static object DataTableConvertObject(DataRow row, Assembly baseAssembly, string className);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     数据集中一行DataRow转换为指定对象,并填充数据
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   row:
InBlock.gif        
//     数据集中一行
InBlock.gif        
//
InBlock.gif        
//   AssemblyPath:
InBlock.gif        
//     程序集路径
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     完整路径类名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后对象
InBlock.gif
        public static object DataTableConvertObject(DataRow row, string AssemblyPath, string className);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     执行指定对象函数(公共,静态) 函数可以ref、out、普通参数传递
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   objModel:
InBlock.gif        
//     传入对象
InBlock.gif        
//
InBlock.gif        
//   methodName:
InBlock.gif        
//     函数名称
InBlock.gif        
//
InBlock.gif        
//   table:
InBlock.gif        
//     传入参数(Hashtable类型)
InBlock.gif        
//
InBlock.gif        
//   returnobj:
InBlock.gif        
//     执行制定函数返回值
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     返回执行指定对象函数的传入数据(ref,out数据经过修改)
InBlock.gif
        public static object[] EvalMethod(object objModel, string methodName, Hashtable table, ref object returnobj);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     执行指定对象函数(公共,静态) 函数可以ref、out、普通参数传递
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   objModel:
InBlock.gif        
//     传入对象
InBlock.gif        
//
InBlock.gif        
//   methodName:
InBlock.gif        
//     函数名称
InBlock.gif        
//
InBlock.gif        
//   list:
InBlock.gif        
//     传入参数(SortedList类型)
InBlock.gif        
//
InBlock.gif        
//   returnobj:
InBlock.gif        
//     执行制定函数返回值
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     返回执行指定对象函数的传入数据(ref,out数据经过修改)
InBlock.gif
        public static object[] EvalMethod(object objModel, string methodName, SortedList list, ref object returnobj);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     执行指定对象函数(公共,静态) 函数可以ref、out、普通参数传递
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   baseAssembly:
InBlock.gif        
//     程序集对象
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     对象名称
InBlock.gif        
//
InBlock.gif        
//   table:
InBlock.gif        
//     传入参数(Hashtable类型)
InBlock.gif        
//
InBlock.gif        
//   returnobj:
InBlock.gif        
//     执行制定函数返回值
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     返回执行指定对象函数的传入数据(ref,out数据经过修改)
InBlock.gif
        public static object[] EvalMethod(Assembly baseAssembly, string className, string methodName, Hashtable table, ref object returnobj);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     执行指定对象函数(公共,静态) 函数可以ref、out、普通参数传递
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   baseAssembly:
InBlock.gif        
//     程序集对象
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     对象名称
InBlock.gif        
//
InBlock.gif        
//   list:
InBlock.gif        
//     传入参数(SortedList类型)
InBlock.gif        
//
InBlock.gif        
//   returnobj:
InBlock.gif        
//     执行制定函数返回值
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     返回执行指定对象函数的传入数据(ref,out数据经过修改)
InBlock.gif
        public static object[] EvalMethod(Assembly baseAssembly, string className, string methodName, SortedList list, ref object returnobj);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     执行指定对象函数(公共,静态) 函数可以ref、out、普通参数传递
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   AssemblyPath:
InBlock.gif        
//     程序集路径
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     对象名称
InBlock.gif        
//
InBlock.gif        
//   table:
InBlock.gif        
//     传入参数(Hashtable类型)
InBlock.gif        
//
InBlock.gif        
//   returnobj:
InBlock.gif        
//     执行制定函数返回值
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     返回执行指定对象函数的传入数据(ref,out数据经过修改)
InBlock.gif
        public static object[] EvalMethod(string AssemblyPath, string className, string methodName, Hashtable table, ref object returnobj);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     执行指定对象函数(公共,静态) 函数可以ref、out、普通参数传递
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   AssemblyPath:
InBlock.gif        
//     程序集路径
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     对象名称
InBlock.gif        
//
InBlock.gif        
//   list:
InBlock.gif        
//     传入参数(SortedList类型)
InBlock.gif        
//
InBlock.gif        
//   returnobj:
InBlock.gif        
//     执行制定函数返回值
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     返回执行指定对象函数的传入数据(ref,out数据经过修改)
InBlock.gif
        public static object[] EvalMethod(string AssemblyPath, string className, string methodName, SortedList list, ref object returnobj);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     哈希表对象转换为DataTable,并有一行DataRow
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的哈希表
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后数据表
InBlock.gif
        public static DataTable HashtableConvertDataTableWidthRow(Hashtable hTable);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     哈希表对象转换为DataTable,并有一行DataRow
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的哈希表
InBlock.gif        
//
InBlock.gif        
//   DataMember:
InBlock.gif        
//     生成数据表名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后数据表
InBlock.gif
        public static DataTable HashtableConvertDataTableWidthRow(Hashtable hTable, string DataMember);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     哈希表转换为对象
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的哈希表
InBlock.gif        
//
InBlock.gif        
//   objModel:
InBlock.gif        
//     指定对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后对象
InBlock.gif
        public static object HashtableConvertObject(Hashtable hTable, object objModel);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     哈希表转换为对象 baseAssembly请使用:System.Reflection.Assembly.LoadFrom()获取程序集
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的哈希表
InBlock.gif        
//
InBlock.gif        
//   baseAssembly:
InBlock.gif        
//     程序集
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     完整路径类名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后对象
InBlock.gif
        public static object HashtableConvertObject(Hashtable hTable, Assembly baseAssembly, string className);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     哈希表转换为对象
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的哈希表
InBlock.gif        
//
InBlock.gif        
//   AssemblyPath:
InBlock.gif        
//     程序集路径
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     完整路径类名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后对象
InBlock.gif
        public static object HashtableConvertObject(Hashtable hTable, string AssemblyPath, string className);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     Hashtable转化为SortedList
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   table:
InBlock.gif        
//     传入的Hashtable
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     返回的SortedList
InBlock.gif
        public static SortedList HashtableConvertSortedList(Hashtable table);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     哈希数据比较 作为在修改的时候或者其他时候判断是否做过处理
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   Fristobj:
InBlock.gif        
//     比较哈希表
InBlock.gif        
//
InBlock.gif        
//   Equalobj:
InBlock.gif        
//     被比较哈希表
InBlock.gif        
//
InBlock.gif        
//   errMethod:
InBlock.gif        
//     返回比较不一致对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     比较状态
InBlock.gif
        public static bool HashtableDataEqual(Hashtable Fristobj, Hashtable Equalobj, ref string errMethod);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     对象转换为DataTable,并有单行DataRow
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   objModel:
InBlock.gif        
//     有数据的对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后数据表
InBlock.gif
        public static DataTable ObjectConvertDataTableWidthRow(object objModel);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     对象转换为DataTable,并有单行DataRow
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   objModel:
InBlock.gif        
//     有数据的对象
InBlock.gif        
//
InBlock.gif        
//   DataMember:
InBlock.gif        
//     生成数据表名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后数据表
InBlock.gif
        public static DataTable ObjectConvertDataTableWidthRow(object objModel, string DataMember);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     对象转换为DataTable,并有多行DataRow
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   objModel:
InBlock.gif        
//     有数据的对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后数据表
InBlock.gif
        public static DataTable ObjectConvertDataTableWidthRows(object[] objModel);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     对象转换为DataTable,并有多行DataRow
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   objModel:
InBlock.gif        
//     有数据的对象
InBlock.gif        
//
InBlock.gif        
//   DataMember:
InBlock.gif        
//     生成数据表名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后数据表
InBlock.gif
        public static DataTable ObjectConvertDataTableWidthRows(object[] objModel, string DataMember);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     对象转化为哈希表
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   objModel:
InBlock.gif        
//     对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后哈希表
InBlock.gif
        public static Hashtable ObjectConvertHashtable(object objModel);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     对象转化为哈希表
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   objModel:
InBlock.gif        
//     对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后哈希表
InBlock.gif
        public static SortedList ObjectConvertSortedList(object objModel);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     对象数据比较 作为在修改的时候或者其他时候判断是否做过处理
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   Fristobj:
InBlock.gif        
//     比较对象
InBlock.gif        
//
InBlock.gif        
//   Equalobj:
InBlock.gif        
//     被比较对象
InBlock.gif        
//
InBlock.gif        
//   errMethod:
InBlock.gif        
//     返回比较不一致对象或者类不一致提示
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     比较状态(false不一致,true一致)
InBlock.gif
        public static bool ObjectDataEqual(object Fristobj, object Equalobj, ref string errMethod);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     SortedList对象转换为DataTable,并有一行DataRow
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的SortedList
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后数据表
InBlock.gif
        public static DataTable SortedListConvertDataTableWidthRow(SortedList hTable);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     SortedList对象转换为DataTable,并有一行DataRow
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的SortedList
InBlock.gif        
//
InBlock.gif        
//   DataMember:
InBlock.gif        
//     生成数据表名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后数据表
InBlock.gif
        public static DataTable SortedListConvertDataTableWidthRow(SortedList hTable, string DataMember);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     SortedList转化为Hashtable
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   list:
InBlock.gif        
//     传入的SortedList
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     返回的Hashtable
InBlock.gif
        public static Hashtable SortedListConvertHashtable(SortedList list);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     SortedList转换为对象
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的SortedList
InBlock.gif        
//
InBlock.gif        
//   objModel:
InBlock.gif        
//     指定对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后对象
InBlock.gif
        public static object SortedListConvertObject(SortedList hTable, object objModel);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     SortedList转换为对象 baseAssembly请使用:System.Reflection.Assembly.LoadFrom()获取程序集
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的SortedList
InBlock.gif        
//
InBlock.gif        
//   baseAssembly:
InBlock.gif        
//     程序集
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     完整路径类名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后对象
InBlock.gif
        public static object SortedListConvertObject(SortedList hTable, Assembly baseAssembly, string className);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     SortedList转换为对象
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   hTable:
InBlock.gif        
//     包含数据的SortedList
InBlock.gif        
//
InBlock.gif        
//   AssemblyPath:
InBlock.gif        
//     程序集路径
InBlock.gif        
//
InBlock.gif        
//   className:
InBlock.gif        
//     完整路径类名称
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     填充后对象
InBlock.gif
        public static object SortedListConvertObject(SortedList hTable, string AssemblyPath, string className);
InBlock.gif        
//
InBlock.gif        
// 摘要:
InBlock.gif        
//     SortedList数据比较 作为在修改的时候或者其他时候判断是否做过处理
InBlock.gif        
//
InBlock.gif        
// 参数:
InBlock.gif        
//   Fristobj:
InBlock.gif        
//     比较SortedList
InBlock.gif        
//
InBlock.gif        
//   Equalobj:
InBlock.gif        
//     被比较SortedList
InBlock.gif        
//
InBlock.gif        
//   errMethod:
InBlock.gif        
//     返回比较不一致对象
InBlock.gif        
//
InBlock.gif        
// 返回结果:
InBlock.gif        
//     比较状态
InBlock.gif
        public static bool SortedListDataEqual(SortedList Fristobj, SortedList Equalobj, ref string errMethod);
ExpandedSubBlockEnd.gif    }

ExpandedBlockEnd.gif}

None.gif

转载于:https://www.cnblogs.com/mail-ricklee/archive/2007/01/31/636204.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值