📄 profile.cs
字号:
using System;
using System.Web.Profile;
namespace SkyiSite.DBUtility
{
public class Profile
{
public void Add(System.Web.Profile.ProfileBase profileBase, SkyiSite.DBUtility.ProfileInfo profileInfo)
{
//Mobile|Tele| RealityName| Corporation |IsAudited|IsStoped|Address|PostCode
profileBase.SetPropertyValue("Tele", profileInfo.Tele);
profileBase.SetPropertyValue("Mobile", profileInfo.Mobile);
profileBase.SetPropertyValue("Corporation", profileInfo.Corporation);
profileBase.SetPropertyValue("RealityName", profileInfo.RealityName);
profileBase.SetPropertyValue("IsAudited", profileInfo.IsAudited);
profileBase.SetPropertyValue("IsStoped", profileInfo.IsStoped);
profileBase.SetPropertyValue("Address", profileInfo.Address);
profileBase.SetPropertyValue("PostCode", profileInfo.PostCode);
profileBase.Save();
}
public void Add(string userName, SkyiSite.DBUtility.ProfileInfo profileInfo)
{
//Mobile|Tele| RealityName| Corporation |IsAudited|IsStoped|Address|PostCode
System.Web.Profile.ProfileBase profileBase = new System.Web.Profile.ProfileBase();
profileBase.Initialize(userName, true);
profileBase.SetPropertyValue("Tele", profileInfo.Tele);
profileBase.SetPropertyValue("Mobile", profileInfo.Mobile);
profileBase.SetPropertyValue("Corporation", profileInfo.Corporation);
profileBase.SetPropertyValue("RealityName", profileInfo.RealityName);
profileBase.SetPropertyValue("IsAudited", profileInfo.IsAudited);
profileBase.SetPropertyValue("IsStoped", profileInfo.IsStoped);
profileBase.SetPropertyValue("Address", profileInfo.Address);
profileBase.SetPropertyValue("PostCode", profileInfo.PostCode);
profileBase.Save();
}
public void Add(string userName, string Mobile, string Tele, string RealityName, string Corporation, bool IsAudited, bool IsStoped, string Address, string PostCode)
{
//Mobile|Tele| RealityName| Corporation |IsAudited|IsStoped|Address|PostCode
System.Web.Profile.ProfileBase profileBase = new System.Web.Profile.ProfileBase();
profileBase.Initialize(userName, true);
profileBase.SetPropertyValue("Tele", Tele);
profileBase.SetPropertyValue("Mobile", Mobile);
profileBase.SetPropertyValue("Corporation", Corporation);
profileBase.SetPropertyValue("RealityName", RealityName);
profileBase.SetPropertyValue("IsAudited", IsAudited);
profileBase.SetPropertyValue("IsStoped", IsStoped);
profileBase.SetPropertyValue("Address", Address);
profileBase.SetPropertyValue("PostCode", PostCode);
profileBase.Save();
}
public SkyiSite.DBUtility.ProfileInfo Get(string userName)
{
//Mobile|Tele| RealityName| Corporation |IsAudited|IsStoped|Address|PostCode
System.Web.Profile.ProfileBase profileBase = new System.Web.Profile.ProfileBase();
profileBase.Initialize(userName, true);
SkyiSite.DBUtility.ProfileInfo profileInfo = new SkyiSite.DBUtility.ProfileInfo();
profileInfo.Corporation = profileBase.GetPropertyValue("Corporation").ToString();
profileInfo.Mobile = profileBase.GetPropertyValue("Mobile").ToString();
profileInfo.RealityName = profileBase.GetPropertyValue("RealityName").ToString();
profileInfo.Tele = profileBase.GetPropertyValue("Tele").ToString();
profileInfo.IsAudited = Convert.ToBoolean(profileBase.GetPropertyValue("IsAudited").ToString());
profileInfo.IsStoped = Convert.ToBoolean(profileBase.GetPropertyValue("IsStoped").ToString());
profileInfo.Address = profileBase.GetPropertyValue("Address").ToString();
profileInfo.PostCode = profileBase.GetPropertyValue("PostCode").ToString();
return profileInfo;
}
private Profile() { }
public static readonly Profile Instance = new Profile();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -