谁有Profile资料~,急需!谢谢!

解决方案 »

  1.   


    namespace SMS.Model
    {
        public class CurrentUserShoppingCart
        {
            /// <summary>
            /// 获取购物记录
            /// </summary>
            /// <returns></returns>
            public static ICollection GetItems()
            {
                return (HttpContext.Current.Profile as ProfileCommon).ShoppingCart.Items;
            }        /// <summary>
            /// 删除商品
            /// </summary>
            /// <param name="id"></param>
            public static void DeleteProduct(int id)
            {
                (HttpContext.Current.Profile as ProfileCommon).ShoppingCart.DeleteProduct(id);
            }        /// <summary>
            /// 清空购物车
            /// </summary>
            public static void ClearItem()
            {
                (HttpContext.Current.Profile as ProfileCommon).ShoppingCart.ClearTtem();
            }        /// <summary>
            /// 删除单条记录
            /// </summary>
            /// <param name="id"></param>
            public static void DeleteItem(int id)
            {
                (HttpContext.Current.Profile as ProfileCommon).ShoppingCart.DeleteItem(id);
            }
        }
    }<profile defaultProvider="TBH_ProfileProvider">
    <providers>
    <add name="TBH_ProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </providers>
    <properties>
                <add name="FirstName" type="String" />
                <add name="LastName" type="String" />
                <add name="Gender" type="String" />
                <add name="BirthDate" type="DateTime" />
                <add name="Occupation" type="String" />
                <add name="Website" type="String" />
                <add name="ShoppingCart" type="MB.TheBeerHouse.BLL.Store.ShoppingCart" serializeAs="Binary" allowAnonymous="true" />
                <group name="Forum">
                   <add name="Posts" type="Int32" />
                   <add name="AvatarUrl" type="String" />
                   <add name="Signature" type="String" />
                </group>
                <group name="Address">
                   <add name="Street" type="String" />
                   <add name="PostalCode" type="String" />
                   <add name="City" type="String" />
                   <add name="State" type="String" />
                   <add name="Country" type="String" />
                </group>
                <group name="Contacts">
                   <add name="Phone" type="String" />
                   <add name="Fax" type="String" />
                </group>
                <group name="Preferences">
                   <add name="Theme" type="String" allowAnonymous="true" />
                   <add name="Culture" type="String" defaultValue="en-US" />
                   <add name="Newsletter" type="MB.TheBeerHouse.BLL.Newsletters.SubscriptionType" />
                </group>
    </properties>
    </profile>
      

  2.   

    Profile资料?
    是什么意思?