📄 datahelper.cs
字号:
//Copyright (C) 2006 dooogo.com
//Author:benben
//www.aspxclub.com
using System;
using System.Data;
using System.Globalization;
using Club.Framework.Components;
using Club.Framework.Util;
using Club.Framework.Configuration;
using System.Text.RegularExpressions;
namespace Club.Framework.Data
{
/// <summary>
/// Summary description for DataHelper.
/// </summary>
public class DataHelper
{
public DataHelper()
{
}
#region c_AddressListInfo public static c_AddressListInfo Init_c_AddressListInfo(IDataReader reader) { c_AddressListInfo _c_AddressListInfo = new c_AddressListInfo(); _c_AddressListInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_AddressListInfo.TrueName = reader["TrueName"].ToString(); _c_AddressListInfo.NiceName = reader["NiceName"].ToString(); _c_AddressListInfo.SortID = reader["SortID"]==System.DBNull.Value?_c_AddressListInfo.SortID:Int32.Parse(reader["SortID"].ToString()); _c_AddressListInfo.Birthday = reader["Birthday"]==System.DBNull.Value?_c_AddressListInfo.Birthday:System.DateTime.Parse(reader["Birthday"].ToString()); _c_AddressListInfo.Tel = reader["Tel"].ToString(); _c_AddressListInfo.Mobile = reader["Mobile"].ToString(); _c_AddressListInfo.QQ = reader["QQ"].ToString(); _c_AddressListInfo.Email = reader["Email"].ToString(); _c_AddressListInfo.Address = reader["Address"].ToString(); _c_AddressListInfo.Explian = reader["Explian"].ToString(); _c_AddressListInfo.RegisterID = reader["RegisterID"]==System.DBNull.Value?_c_AddressListInfo.RegisterID:Int32.Parse(reader["RegisterID"].ToString()); return _c_AddressListInfo; } #endregion
#region c_CircleInfo public static c_CircleInfo Init_c_CircleInfo(IDataReader reader) { c_CircleInfo _c_CircleInfo = new c_CircleInfo(); _c_CircleInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_CircleInfo.RegisterID = reader["RegisterID"]==System.DBNull.Value?_c_CircleInfo.RegisterID:Int32.Parse(reader["RegisterID"].ToString()); _c_CircleInfo.CircleName = reader["CircleName"].ToString(); _c_CircleInfo.IsPublicity = reader["IsPublicity"]==System.DBNull.Value?_c_CircleInfo.IsPublicity:Boolean.Parse(reader["IsPublicity"].ToString()); _c_CircleInfo.ImageUrl = reader["ImageUrl"].ToString(); _c_CircleInfo.CircleTypeID = reader["CircleTypeID"]==System.DBNull.Value?_c_CircleInfo.CircleTypeID:Int32.Parse(reader["CircleTypeID"].ToString()); _c_CircleInfo.Explain = reader["Explain"].ToString(); _c_CircleInfo.InviteMode = reader["InviteMode"]==System.DBNull.Value?_c_CircleInfo.InviteMode:Int32.Parse(reader["InviteMode"].ToString()); _c_CircleInfo.ApplicationMode = reader["ApplicationMode"]==System.DBNull.Value?_c_CircleInfo.ApplicationMode:Int32.Parse(reader["ApplicationMode"].ToString()); _c_CircleInfo.ApplicationExplain = reader["ApplicationExplain"].ToString(); _c_CircleInfo.PostDate = reader["PostDate"]==System.DBNull.Value?_c_CircleInfo.PostDate:System.DateTime.Parse(reader["PostDate"].ToString()); _c_CircleInfo.Hits = reader["Hits"]==System.DBNull.Value?_c_CircleInfo.Hits:Int32.Parse(reader["Hits"].ToString()); return _c_CircleInfo; } #endregion
#region c_CircleActionInfo public static c_CircleActionInfo Init_c_CircleActionInfo(IDataReader reader) { c_CircleActionInfo _c_CircleActionInfo = new c_CircleActionInfo(); _c_CircleActionInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_CircleActionInfo.CircleID = reader["CircleID"]==System.DBNull.Value?_c_CircleActionInfo.CircleID:Int32.Parse(reader["CircleID"].ToString()); _c_CircleActionInfo.Title = reader["Title"].ToString(); _c_CircleActionInfo.Content = reader["Content"].ToString(); _c_CircleActionInfo.StartDate = reader["StartDate"]==System.DBNull.Value?_c_CircleActionInfo.StartDate:System.DateTime.Parse(reader["StartDate"].ToString()); _c_CircleActionInfo.EndDate = reader["EndDate"]==System.DBNull.Value?_c_CircleActionInfo.EndDate:System.DateTime.Parse(reader["EndDate"].ToString()); _c_CircleActionInfo.CountryID = reader["CountryID"]==System.DBNull.Value?_c_CircleActionInfo.CountryID:Int32.Parse(reader["CountryID"].ToString()); _c_CircleActionInfo.ProvinceID = reader["ProvinceID"]==System.DBNull.Value?_c_CircleActionInfo.ProvinceID:Int32.Parse(reader["ProvinceID"].ToString()); _c_CircleActionInfo.CityID = reader["CityID"]==System.DBNull.Value?_c_CircleActionInfo.CityID:Int32.Parse(reader["CityID"].ToString()); _c_CircleActionInfo.Address = reader["Address"].ToString(); _c_CircleActionInfo.AddressExplain = reader["AddressExplain"].ToString(); _c_CircleActionInfo.ActionType = reader["ActionType"]==System.DBNull.Value?_c_CircleActionInfo.ActionType:Int32.Parse(reader["ActionType"].ToString()); _c_CircleActionInfo.JoinType = reader["JoinType"]==System.DBNull.Value?_c_CircleActionInfo.JoinType:Int32.Parse(reader["JoinType"].ToString()); _c_CircleActionInfo.PostDate = reader["PostDate"]==System.DBNull.Value?_c_CircleActionInfo.PostDate:System.DateTime.Parse(reader["PostDate"].ToString()); return _c_CircleActionInfo; } #endregion
#region c_CircleActionJoinerInfo public static c_CircleActionJoinerInfo Init_c_CircleActionJoinerInfo(IDataReader reader) { c_CircleActionJoinerInfo _c_CircleActionJoinerInfo = new c_CircleActionJoinerInfo(); _c_CircleActionJoinerInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_CircleActionJoinerInfo.ActionID = reader["ActionID"]==System.DBNull.Value?_c_CircleActionJoinerInfo.ActionID:Int32.Parse(reader["ActionID"].ToString()); _c_CircleActionJoinerInfo.JoinerRegisterID = reader["JoinerRegisterID"]==System.DBNull.Value?_c_CircleActionJoinerInfo.JoinerRegisterID:Int32.Parse(reader["JoinerRegisterID"].ToString()); _c_CircleActionJoinerInfo.PostDate = reader["PostDate"]==System.DBNull.Value?_c_CircleActionJoinerInfo.PostDate:System.DateTime.Parse(reader["PostDate"].ToString()); return _c_CircleActionJoinerInfo; } #endregion
#region c_CircleGuestBookInfo public static c_CircleGuestBookInfo Init_c_CircleGuestBookInfo(IDataReader reader) { c_CircleGuestBookInfo _c_CircleGuestBookInfo = new c_CircleGuestBookInfo(); _c_CircleGuestBookInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_CircleGuestBookInfo.CircleID = reader["CircleID"]==System.DBNull.Value?_c_CircleGuestBookInfo.CircleID:Int32.Parse(reader["CircleID"].ToString()); _c_CircleGuestBookInfo.RegisterID = reader["RegisterID"]==System.DBNull.Value?_c_CircleGuestBookInfo.RegisterID:Int32.Parse(reader["RegisterID"].ToString()); _c_CircleGuestBookInfo.Title = reader["Title"].ToString(); _c_CircleGuestBookInfo.Content = reader["Content"].ToString(); _c_CircleGuestBookInfo.PostDate = reader["PostDate"]==System.DBNull.Value?_c_CircleGuestBookInfo.PostDate:System.DateTime.Parse(reader["PostDate"].ToString()); return _c_CircleGuestBookInfo; } #endregion
#region c_CircleMemberInfo public static c_CircleMemberInfo Init_c_CircleMemberInfo(IDataReader reader) { c_CircleMemberInfo _c_CircleMemberInfo = new c_CircleMemberInfo(); _c_CircleMemberInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_CircleMemberInfo.CircleRegisterID = reader["CircleRegisterID"]==System.DBNull.Value?_c_CircleMemberInfo.CircleRegisterID:Int32.Parse(reader["CircleRegisterID"].ToString()); _c_CircleMemberInfo.CircleIdentity = reader["CircleIdentity"]==System.DBNull.Value?_c_CircleMemberInfo.CircleIdentity:Int32.Parse(reader["CircleIdentity"].ToString()); _c_CircleMemberInfo.CircleID = reader["CircleID"]==System.DBNull.Value?_c_CircleMemberInfo.CircleID:Int32.Parse(reader["CircleID"].ToString()); _c_CircleMemberInfo.LastTime = reader["LastTime"]==System.DBNull.Value?_c_CircleMemberInfo.LastTime:System.DateTime.Parse(reader["LastTime"].ToString()); return _c_CircleMemberInfo; } #endregion
#region c_CommentInfo public static c_CommentInfo Init_c_CommentInfo(IDataReader reader) { c_CommentInfo _c_CommentInfo = new c_CommentInfo(); _c_CommentInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_CommentInfo.Content = reader["Content"].ToString(); _c_CommentInfo.RestoreConten = reader["RestoreConten"].ToString(); _c_CommentInfo.CommentRegisterID = reader["CommentRegisterID"]==System.DBNull.Value?_c_CommentInfo.CommentRegisterID:Int32.Parse(reader["CommentRegisterID"].ToString()); _c_CommentInfo.RegisterID = reader["RegisterID"]==System.DBNull.Value?_c_CommentInfo.RegisterID:Int32.Parse(reader["RegisterID"].ToString()); _c_CommentInfo.SortType = reader["SortType"]==System.DBNull.Value?_c_CommentInfo.SortType:Int32.Parse(reader["SortType"].ToString()); _c_CommentInfo.ItemID = reader["ItemID"]==System.DBNull.Value?_c_CommentInfo.ItemID:Int32.Parse(reader["ItemID"].ToString()); return _c_CommentInfo; } #endregion
#region c_CountInfo public static c_CountInfo Init_c_CountInfo(IDataReader reader) { c_CountInfo _c_CountInfo = new c_CountInfo(); _c_CountInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_CountInfo.ItemID = reader["ItemID"].ToString(); _c_CountInfo.Hits = reader["Hits"]==System.DBNull.Value?_c_CountInfo.Hits:Int32.Parse(reader["Hits"].ToString()); _c_CountInfo.SortType = reader["SortType"]==System.DBNull.Value?_c_CountInfo.SortType:Int32.Parse(reader["SortType"].ToString()); return _c_CountInfo; } #endregion
#region c_DiaryInfo public static c_DiaryInfo Init_c_DiaryInfo(IDataReader reader) { c_DiaryInfo _c_DiaryInfo = new c_DiaryInfo(); _c_DiaryInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_DiaryInfo.RegisterID = reader["RegisterID"]==System.DBNull.Value?_c_DiaryInfo.RegisterID:Int32.Parse(reader["RegisterID"].ToString()); _c_DiaryInfo.Title = reader["Title"].ToString(); _c_DiaryInfo.Content = reader["Content"].ToString(); _c_DiaryInfo.Weather = reader["Weather"].ToString(); _c_DiaryInfo.Mood = reader["Mood"].ToString(); _c_DiaryInfo.PostDate = reader["PostDate"]==System.DBNull.Value?_c_DiaryInfo.PostDate:System.DateTime.Parse(reader["PostDate"].ToString()); _c_DiaryInfo.IsVisible = reader["IsVisible"]==System.DBNull.Value?_c_DiaryInfo.IsVisible:Boolean.Parse(reader["IsVisible"].ToString()); _c_DiaryInfo.CommentCount = reader["CommentCount"]==System.DBNull.Value?_c_DiaryInfo.CommentCount:Int32.Parse(reader["CommentCount"].ToString()); _c_DiaryInfo.Hits = reader["Hits"]==System.DBNull.Value?_c_DiaryInfo.Hits:Int32.Parse(reader["Hits"].ToString()); return _c_DiaryInfo; } #endregion
#region c_FavoriteInfo public static c_FavoriteInfo Init_c_FavoriteInfo(IDataReader reader) { c_FavoriteInfo _c_FavoriteInfo = new c_FavoriteInfo(); _c_FavoriteInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_FavoriteInfo.Url = reader["Url"].ToString(); _c_FavoriteInfo.Title = reader["Title"].ToString(); _c_FavoriteInfo.Explain = reader["Explain"].ToString(); _c_FavoriteInfo.SortID = reader["SortID"]==System.DBNull.Value?_c_FavoriteInfo.SortID:Int32.Parse(reader["SortID"].ToString()); _c_FavoriteInfo.RegisterID = reader["RegisterID"]==System.DBNull.Value?_c_FavoriteInfo.RegisterID:Int32.Parse(reader["RegisterID"].ToString()); return _c_FavoriteInfo; } #endregion
#region c_FriendInfo public static c_FriendInfo Init_c_FriendInfo(IDataReader reader) { c_FriendInfo _c_FriendInfo = new c_FriendInfo(); _c_FriendInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_FriendInfo.RegisterID = reader["RegisterID"]==System.DBNull.Value?_c_FriendInfo.RegisterID:Int32.Parse(reader["RegisterID"].ToString()); _c_FriendInfo.FriendID = reader["FriendID"]==System.DBNull.Value?_c_FriendInfo.FriendID:Int32.Parse(reader["FriendID"].ToString()); _c_FriendInfo.SortID = reader["SortID"]==System.DBNull.Value?_c_FriendInfo.SortID:Int32.Parse(reader["SortID"].ToString()); _c_FriendInfo.IsBlacklist = reader["IsBlacklist"]==System.DBNull.Value?_c_FriendInfo.IsBlacklist:Boolean.Parse(reader["IsBlacklist"].ToString()); return _c_FriendInfo; } #endregion
#region c_HomeSettingInfo public static c_HomeSettingInfo Init_c_HomeSettingInfo(IDataReader reader) { c_HomeSettingInfo _c_HomeSettingInfo = new c_HomeSettingInfo(); _c_HomeSettingInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_HomeSettingInfo.RegisterID = reader["RegisterID"]==System.DBNull.Value?_c_HomeSettingInfo.RegisterID:Int32.Parse(reader["RegisterID"].ToString()); _c_HomeSettingInfo.IsOpen = reader["IsOpen"]==System.DBNull.Value?_c_HomeSettingInfo.IsOpen:Boolean.Parse(reader["IsOpen"].ToString()); _c_HomeSettingInfo.MessagePostType = reader["MessagePostType"]==System.DBNull.Value?_c_HomeSettingInfo.MessagePostType:Int32.Parse(reader["MessagePostType"].ToString()); _c_HomeSettingInfo.CommentPostType = reader["CommentPostType"]==System.DBNull.Value?_c_HomeSettingInfo.CommentPostType:Int32.Parse(reader["CommentPostType"].ToString()); _c_HomeSettingInfo.GuestBookPostType = reader["GuestBookPostType"]==System.DBNull.Value?_c_HomeSettingInfo.GuestBookPostType:Int32.Parse(reader["GuestBookPostType"].ToString()); _c_HomeSettingInfo.AdminUIColorID = reader["AdminUIColorID"]==System.DBNull.Value?_c_HomeSettingInfo.AdminUIColorID:Int32.Parse(reader["AdminUIColorID"].ToString()); _c_HomeSettingInfo.CapabilitySize = reader["CapabilitySize"]==System.DBNull.Value?_c_HomeSettingInfo.CapabilitySize:Int32.Parse(reader["CapabilitySize"].ToString()); _c_HomeSettingInfo.TemplateID = reader["TemplateID"]==System.DBNull.Value?_c_HomeSettingInfo.TemplateID:Int32.Parse(reader["TemplateID"].ToString()); _c_HomeSettingInfo.SiteTitle = reader["SiteTitle"].ToString(); _c_HomeSettingInfo.SiteAffiche = reader["SiteAffiche"].ToString(); _c_HomeSettingInfo.SiteMenuSetting = reader["SiteMenuSetting"].ToString(); _c_HomeSettingInfo.PhotoIsDownLoad = reader["PhotoIsDownLoad"]==System.DBNull.Value?_c_HomeSettingInfo.PhotoIsDownLoad:Boolean.Parse(reader["PhotoIsDownLoad"].ToString()); return _c_HomeSettingInfo; } #endregion
#region c_MemoInfo public static c_MemoInfo Init_c_MemoInfo(IDataReader reader) { c_MemoInfo _c_MemoInfo = new c_MemoInfo(); _c_MemoInfo.ID = Int32.Parse(reader["ID"].ToString()); _c_MemoInfo.Content = reader["Content"].ToString(); _c_MemoInfo.IsRemind = reader["IsRemind"]==System.DBNull.Value?_c_MemoInfo.IsRemind:Boolean.Parse(reader["IsRemind"].ToString()); _c_MemoInfo.RemindDate = reader["RemindDate"]==System.DBNull.Value?_c_MemoInfo.RemindDate:System.DateTime.Parse(reader["RemindDate"].ToString()); _c_MemoInfo.RegisterID = reader["RegisterID"]==System.DBNull.Value?_c_MemoInfo.RegisterID:Int32.Parse(reader["RegisterID"].ToString()); return _c_MemoInfo; } #endregion
#region c_MessageInfo
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -