1: public class StronglyTypedProfile
2: {
3: private ProfileBase profile;
4:
5: public int MerchantId
6: {
7: get
8: {
9: object ob = profile.GetPropertyValue("MerchantId");
10: if (ob == null)
11: return -1;
12: return (int)ob;
13: }
14: set
15: {
16: profile.SetPropertyValue("MerchantId", value);
17: }
18: }
19:
20: public string ForumNick
21: {
22: get { return (string)profile.GetPropertyValue("ForumNick"); }
23: set
24: {
25: profile.SetPropertyValue("ForumNick", value);
26: }
27: }
28:
29: public string FirstName {
30: get
31: {
32: return (string)profile.GetPropertyValue("FirstName");
33: }
34: set
35: {
36: profile.SetPropertyValue("FirstName", value);
37: }
38: }
39:
40: public string LastName
41: {
42: get
43: {
44: return (string)profile.GetPropertyValue("LastName");
45: }
46: set
47: {
48: profile.SetPropertyValue("LastName", value);
49: }
50: }
51:
52: public void Save()
53: {
54: profile.Save();
55: }
56:
57: private StronglyTypedProfile() { }
58: public static StronglyTypedProfile Create(string username)
59: {
60: StronglyTypedProfile p = new StronglyTypedProfile();
61: p.profile = ProfileBase.Create(username);
62: //profile = ProfileBase.Create(username);
63: return p;
64: }
65: }