您目前尚未登陆,请选择【登陆】或【注册
首页->全站代码->IFNuke1.1.0版源码>>Core/Data/BusinessBase.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:IFNuke1.1.0版源码
当前文件:文件类型 IFnuke110/Core/Data/BusinessBase.cs打开代码结构图
普通视图
		            
1using System; 2using System.Collections.Generic; 3using System.Text; 4using System.Data; 5 6using IFNuke; 7 8namespace IFNuke.Data 9{ 10 [Serializable()] 11 public class BusinessBase<T> 12 where T : BusinessBase<T> 13 { 14 private static readonly string TableName_Select = "TableName_Select"; 15 16 Select 81 82 public static bool Delete(int id) 83 { 84 return DataProvider.Instance().Delete<T>(id); 85 } 86 87 // save include Insert and Update 88 public int Save() 89 { 90 return DataProvider.Instance().Save<T>((T)this, ""); 91 } 92 93 public int Save(string spName) 94 { 95 return DataProvider.Instance().Save<T>((T)this, spName); 96 } 97 98 public static bool IsExist(int id) 99 { 100 return Select(id) != null; 101 } 102 103 public static bool IsExist(CriteriaCollection parameters) 104 { 105 List<T> list = SelectList(parameters); 106 return list != null && list.Count > 0; 107 } 108 109 public static Dictionary<string, string> GetNameValueList() 110 { 111 return DataProvider.Instance().GetNameValueList<T>("Id", "Name"); 112 } 113 public static Dictionary<string, string> GetNameValueList(string textName) 114 { 115 return DataProvider.Instance().GetNameValueList<T>("Id", textName); 116 } 117 public static Dictionary<string, string> GetNameValueList(string idName,string textName) 118 { 119 return DataProvider.Instance().GetNameValueList<T>(idName, textName); 120 } 121 122 123 } 124} 125
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:IFNuke1.1.0版源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号