UserData.cs
1/////////////////////////////
2//File:UserData.cs
3//Data Created:2006年10月2日
4//Created by:Slash
5/////////////////////////////
6namespace FreeZone.Common.Data
7{
8 using System;
9 using System.Data;
10 using System.Runtime.Serialization;
11
12 /// <summary>
13 /// A custom serializable dataset containing order information.
14 /// <remarks>
15 /// This class is used to define the shape of OrderData.
16 /// </remarks>
17 /// <remarks>
18 /// The serializale constructor allows objects of type OrderData to be remoted.
19 /// </remarks>
20 /// </summary>
21 [System.ComponentModel.DesignerCategoryAttribute("Code")]
22 [SerializableAttribute]
23 public class UserData : DataSet
24 {
25
26
27 //
28 //User items table constants
29 //
30 ///<value>The constant used for User table.</value>
31 public const String USER_TABLE = "User";
32 ///<value>The constant used for PKID field in the User table.</value>
33 public const String PKID_FIELD = "PKID";
34 ///<value>The constant used for UserName field in the User table.</value>
35 public const String USERNAME_FIELD = "UserName";
36 ///<value>The constant used for Password field in the User table.</value>
37 public const String PASSWORD_FIELD = "Password";
38 ///<value>The constant used for NickName field in the User table.</value>
39 public const String NICKNAME_FIELD = "NickName";
40 ///<value>The constant used for Sex field in the User table.</value>
41 public const String SEX_FIELD = "Sex";
42 ///<value>The constant used for Email field in the User table.</value>
43 public const String EMAIL_FIELD = "Email";
44 ///<value>The constant used for Face field in the User table.</value>
45 public const String FACE_FIELD = "Face";
46 ///<value>The constant used for EMoney field in the User table.</value>
47 public const String EMONEY_FIELD = "EMoney";
48 ///<value>The constant used for Score field in the User table.</value>
49 public const String SCORE_FIELD = "Score";
50 ///<value>The constant used for Credit field in the User table.</value>
51 public const String CREDIT_FIELD = "Credit";
52 ///<value>The constant used for LevelUp field in the User table.</value>
53 public const String LEVELUP_FIELD = "LevelUp";
54 ///<value>The constant used for UpdateTime field in the User table.</value>
55 public const String UPDATETIME_FIELD = "UpdateTime";
56 ///<value>The constant used for IsAvailable field in the User table.</value>
57 public const String ISAVAILABLE_FIELD = "IsAvailable";
58 ///<value>The constant used for RoleID field in the User table.</value>
59 public const String ROLEID_FIELD = "RoleID";
60
61 //
62 //UserInfo items table constants
63 //
64 ///<value>The constant used for UserInfo table.</value>
65 public const String USERINFO_TABLE = "UserInfo";
66 ///<value>The constant used for PKID field in the UserInfo table.</value>
67 public const String PKID_FIELD = "PKID";
68 ///<value>The constant used for UserID field in the UserInfo table.</value>
69 public const String USERID_FIELD = "UserID";
70 ///<value>The constant used for Name field in the UserInfo table.</value>
71 public const String NAME_FIELD = "Name";
72 ///<value>The constant used for Oicq field in the UserInfo table.</value>
73 public const String OICQ_FIELD = "Oicq";
74 ///<value>The constant used for MSN field in the UserInfo table.</value>
75 public const String MSN_FIELD = "MSN";
76 ///<value>The constant used for InTime field in the UserInfo table.</value>
77 public const String INTIME_FIELD = "InTime";
78 ///<value>The constant used for TotalLogins field in the UserInfo table.</value>
79 public const String TOTALLOGINS_FIELD = "TotalLogins";
80 ///<value>The constant used for TotalTopics field in the UserInfo table.</value>
81 public const String TOTALTOPICS_FIELD = "TotalTopics";
82 ///<value>The constant used for TotalReplys field in the UserInfo table.</value>
83 public const String TOTALREPLYS_FIELD = "TotalReplys";
84
85 //
86 //UserOnLine items table constants
87 //
88 ///<value>The constant used for UserOnLine table.</value>
89 public const String USERONLINE_TABLE = "UserOnLine";
90 ///<value>The constant used for UserID field in the UserOnLine table.</value>
91 public const String USERID_FIELD = "UserID";
92 ///<value>The constant used for LastActivity field in the UserOnLine table.</value>
93 public const String LASTACTIVITY_FIELD = "LastActivity";
94 ///<value>The constant used for IPAddress field in the UserOnLine table.</value>
95 public const String IPADDRESS_FIELD = "IPAddress";
96
97 /// <summary>
98 /// Constructor to support serialization.
99 /// <remarks>Constructor that supports serialization.</remarks>
100 /// <param name="info">The SerializationInfo object to read from.</param>
101 /// <param name="context">Information on who is calling this method.</param>
102 /// </summary>
103 private UserData(SerializationInfo info,StreamingContext context):base(info,context)
104 {
105 }
106
107 /// <summary>
108 /// Constructor for UserData.
109 /// <remarks>Initialize a UserDatainstance by building the table schema.</remarks>
110 /// </summary>
111 public UserData
112 {
113 //
114 //Create the tables in the dataset
115 //
116 BuildDataTables();
117 }
118
119 ///----------------------------------------------------------------
120 /// Sub BuildDataTables:
121 /// Creates the following datatables: OrderItems, OrderSummary,
122 /// Customer, ShippingAddress, Payment, Order
123 ///----------------------------------------------------------------
124 private void BuildDataTables()
125 {
126 ///
127 ///create the User items table.
128 ///
129 DataTable table=new DataTable(User);
130 DataColumnCollection columns=table.Columns;
131
132 columns.Add(PKID,typeof(System.Int32));
133 columns.Add(UserName,typeof(System.String));
134 columns.Add(Password,typeof(System.String));
135 columns.Add(NickName,typeof(System.String));
136 columns.Add(Sex,typeof(System.Boolean));
137 columns.Add(Email,typeof(System.String));
138 columns.Add(Face,typeof(System.String));
139 columns.Add(EMoney,typeof(System.Int32));
140 columns.Add(Score,typeof(System.Int32));
141 columns.Add(Credit,typeof(System.Int32));
142 columns.Add(LevelUp,typeof(System.Int32));
143 columns.Add(UpdateTime,typeof(System.DataTime));
144 columns.Add(IsAvailable,typeof(System.Boolean));
145 columns.Add(RoleID,typeof(System.Int32));
146 columns.Add(PKID,typeof(System.Int32));
147 columns.Add(UserID,typeof(System.Int32));
148 columns.Add(Name,typeof(System.String));
149 columns.Add(Oicq,typeof(System.String));
150 columns.Add(MSN,typeof(System.String));
151 columns.Add(InTime,typeof(System.DataTime));
152 columns.Add(TotalLogins,typeof(System.Int32));
153 columns.Add(TotalTopics,typeof(System.Int32));
154 columns.Add(TotalReplys,typeof(System.Int32));
155 columns.Add(UserID,typeof(System.Int32));
156 columns.Add(LastActivity,typeof(System.DataTime));
157 columns.Add(IPAddress,typeof(System.String));
158 this.Tables.Add(table);
159 }
160
161 }
162}
163
2//File:UserData.cs
3//Data Created:2006年10月2日
4//Created by:Slash
5/////////////////////////////
6namespace FreeZone.Common.Data
7{
8 using System;
9 using System.Data;
10 using System.Runtime.Serialization;
11
12 /// <summary>
13 /// A custom serializable dataset containing order information.
14 /// <remarks>
15 /// This class is used to define the shape of OrderData.
16 /// </remarks>
17 /// <remarks>
18 /// The serializale constructor allows objects of type OrderData to be remoted.
19 /// </remarks>
20 /// </summary>
21 [System.ComponentModel.DesignerCategoryAttribute("Code")]
22 [SerializableAttribute]
23 public class UserData : DataSet
24 {
25
26
27 //
28 //User items table constants
29 //
30 ///<value>The constant used for User table.</value>
31 public const String USER_TABLE = "User";
32 ///<value>The constant used for PKID field in the User table.</value>
33 public const String PKID_FIELD = "PKID";
34 ///<value>The constant used for UserName field in the User table.</value>
35 public const String USERNAME_FIELD = "UserName";
36 ///<value>The constant used for Password field in the User table.</value>
37 public const String PASSWORD_FIELD = "Password";
38 ///<value>The constant used for NickName field in the User table.</value>
39 public const String NICKNAME_FIELD = "NickName";
40 ///<value>The constant used for Sex field in the User table.</value>
41 public const String SEX_FIELD = "Sex";
42 ///<value>The constant used for Email field in the User table.</value>
43 public const String EMAIL_FIELD = "Email";
44 ///<value>The constant used for Face field in the User table.</value>
45 public const String FACE_FIELD = "Face";
46 ///<value>The constant used for EMoney field in the User table.</value>
47 public const String EMONEY_FIELD = "EMoney";
48 ///<value>The constant used for Score field in the User table.</value>
49 public const String SCORE_FIELD = "Score";
50 ///<value>The constant used for Credit field in the User table.</value>
51 public const String CREDIT_FIELD = "Credit";
52 ///<value>The constant used for LevelUp field in the User table.</value>
53 public const String LEVELUP_FIELD = "LevelUp";
54 ///<value>The constant used for UpdateTime field in the User table.</value>
55 public const String UPDATETIME_FIELD = "UpdateTime";
56 ///<value>The constant used for IsAvailable field in the User table.</value>
57 public const String ISAVAILABLE_FIELD = "IsAvailable";
58 ///<value>The constant used for RoleID field in the User table.</value>
59 public const String ROLEID_FIELD = "RoleID";
60
61 //
62 //UserInfo items table constants
63 //
64 ///<value>The constant used for UserInfo table.</value>
65 public const String USERINFO_TABLE = "UserInfo";
66 ///<value>The constant used for PKID field in the UserInfo table.</value>
67 public const String PKID_FIELD = "PKID";
68 ///<value>The constant used for UserID field in the UserInfo table.</value>
69 public const String USERID_FIELD = "UserID";
70 ///<value>The constant used for Name field in the UserInfo table.</value>
71 public const String NAME_FIELD = "Name";
72 ///<value>The constant used for Oicq field in the UserInfo table.</value>
73 public const String OICQ_FIELD = "Oicq";
74 ///<value>The constant used for MSN field in the UserInfo table.</value>
75 public const String MSN_FIELD = "MSN";
76 ///<value>The constant used for InTime field in the UserInfo table.</value>
77 public const String INTIME_FIELD = "InTime";
78 ///<value>The constant used for TotalLogins field in the UserInfo table.</value>
79 public const String TOTALLOGINS_FIELD = "TotalLogins";
80 ///<value>The constant used for TotalTopics field in the UserInfo table.</value>
81 public const String TOTALTOPICS_FIELD = "TotalTopics";
82 ///<value>The constant used for TotalReplys field in the UserInfo table.</value>
83 public const String TOTALREPLYS_FIELD = "TotalReplys";
84
85 //
86 //UserOnLine items table constants
87 //
88 ///<value>The constant used for UserOnLine table.</value>
89 public const String USERONLINE_TABLE = "UserOnLine";
90 ///<value>The constant used for UserID field in the UserOnLine table.</value>
91 public const String USERID_FIELD = "UserID";
92 ///<value>The constant used for LastActivity field in the UserOnLine table.</value>
93 public const String LASTACTIVITY_FIELD = "LastActivity";
94 ///<value>The constant used for IPAddress field in the UserOnLine table.</value>
95 public const String IPADDRESS_FIELD = "IPAddress";
96
97 /// <summary>
98 /// Constructor to support serialization.
99 /// <remarks>Constructor that supports serialization.</remarks>
100 /// <param name="info">The SerializationInfo object to read from.</param>
101 /// <param name="context">Information on who is calling this method.</param>
102 /// </summary>
103 private UserData(SerializationInfo info,StreamingContext context):base(info,context)
104 {
105 }
106
107 /// <summary>
108 /// Constructor for UserData.
109 /// <remarks>Initialize a UserDatainstance by building the table schema.</remarks>
110 /// </summary>
111 public UserData
112 {
113 //
114 //Create the tables in the dataset
115 //
116 BuildDataTables();
117 }
118
119 ///----------------------------------------------------------------
120 /// Sub BuildDataTables:
121 /// Creates the following datatables: OrderItems, OrderSummary,
122 /// Customer, ShippingAddress, Payment, Order
123 ///----------------------------------------------------------------
124 private void BuildDataTables()
125 {
126 ///
127 ///create the User items table.
128 ///
129 DataTable table=new DataTable(User);
130 DataColumnCollection columns=table.Columns;
131
132 columns.Add(PKID,typeof(System.Int32));
133 columns.Add(UserName,typeof(System.String));
134 columns.Add(Password,typeof(System.String));
135 columns.Add(NickName,typeof(System.String));
136 columns.Add(Sex,typeof(System.Boolean));
137 columns.Add(Email,typeof(System.String));
138 columns.Add(Face,typeof(System.String));
139 columns.Add(EMoney,typeof(System.Int32));
140 columns.Add(Score,typeof(System.Int32));
141 columns.Add(Credit,typeof(System.Int32));
142 columns.Add(LevelUp,typeof(System.Int32));
143 columns.Add(UpdateTime,typeof(System.DataTime));
144 columns.Add(IsAvailable,typeof(System.Boolean));
145 columns.Add(RoleID,typeof(System.Int32));
146 columns.Add(PKID,typeof(System.Int32));
147 columns.Add(UserID,typeof(System.Int32));
148 columns.Add(Name,typeof(System.String));
149 columns.Add(Oicq,typeof(System.String));
150 columns.Add(MSN,typeof(System.String));
151 columns.Add(InTime,typeof(System.DataTime));
152 columns.Add(TotalLogins,typeof(System.Int32));
153 columns.Add(TotalTopics,typeof(System.Int32));
154 columns.Add(TotalReplys,typeof(System.Int32));
155 columns.Add(UserID,typeof(System.Int32));
156 columns.Add(LastActivity,typeof(System.DataTime));
157 columns.Add(IPAddress,typeof(System.String));
158 this.Tables.Add(table);
159 }
160
161 }
162}
163