• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# AuthorProfile类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AuthorProfile的典型用法代码示例。如果您正苦于以下问题:C# AuthorProfile类的具体用法?C# AuthorProfile怎么用?C# AuthorProfile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AuthorProfile类属于命名空间,在下文中一共展示了AuthorProfile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetProfile

        public static JsonProfile GetProfile(string id)
        {
            if (!Utils.StringIsNullOrWhitespace(id))
            {
                bool canEditRoles;
                if (!CanUserEditProfile(id, out canEditRoles))
                    return null;

                var pf = AuthorProfile.GetProfile(id);

                if (pf == null)
                {
                    pf = new AuthorProfile(id);
                    pf.Birthday = DateTime.Parse("01/01/1900");
                    pf.DisplayName = id;
                    pf.EmailAddress = Utils.GetUserEmail(id);
                    pf.FirstName = id;
                    pf.Private = true;
                    pf.Save();
                }

                return AuthorProfile.ToJson(id);
            }

            return null;
        }
开发者ID:jperilla,项目名称:FreelanceHubSales,代码行数:26,代码来源:Profile.aspx.cs


示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.Params["id"] != null)
            {
                lbID.Text = Request.Params["id"];
            }
            ap = AuthorProfile.GetProfile(lbID.Text);
            //机构名称
            lbTitle.Text = ap.Company;
            strTitle = ap.Company;
            strCity = ap.Address;
            strGSJS = ap.AboutMe;
            strFWGKH = ap.Description1;
            this.Title = ap.Company;

            if (Request.Cookies["OrgansViewCount_" + lbID.Text] == null)
            {
                HttpCookie MyCookie = new HttpCookie("OrgansViewCount_" + lbID.Text);
                DateTime now = DateTime.Now;

                MyCookie["IP"] = Request.UserHostAddress;
                MyCookie["tid"] = lbID.Text;
                MyCookie.Expires = now.AddHours(1);

                Response.Cookies.Add(MyCookie);
                ap.ViewCount++;
                ap.Save();
            }
        }
    }
开发者ID:BGCX261,项目名称:zhenzhuo-px-svn-to-git,代码行数:32,代码来源:OrgansView.aspx.cs


示例3: DeleteProfile

        /// <summary>
        /// The delete profile.
        /// </summary>
        /// <param name="profile">
        /// The profile.
        /// </param>
        public override void DeleteProfile(AuthorProfile profile)
        {
            var fileName = string.Format("{0}profiles{1}{2}.xml", GetFolder(profile.Blog), Path.DirectorySeparatorChar, profile.Id);
            if (File.Exists(fileName))
            {
                File.Delete(fileName);
            }

            if (AuthorProfile.Profiles.Contains(profile))
            {
                AuthorProfile.Profiles.Remove(profile);
            }

            // remove profile picture
            var dir = BlogService.GetDirectory("/avatars");
            foreach (var f in dir.Files)
            {
                var dot = f.Name.IndexOf(".");
                var img = dot > 0 ? f.Name.Substring(0, dot) : f.Name;
                if (profile.UserName == img)
                {
                    f.Delete();
                }
            }
        }
开发者ID:aelagawy,项目名称:BlogEngine.NET,代码行数:31,代码来源:Profiles.cs


示例4: btnok_Click

    protected void btnok_Click(object sender, EventArgs e)
    {
        string reg_uid = Request["reg_uid"];
        Membership.CreateUser(Request["reg_uid"], Request["reg_pwd1"], Request["reg_email"]);

        AuthorProfile pc = new AuthorProfile(reg_uid);
        pc.DisplayName = Request["reg_xingming"];

        //pc.Company = Request["reg_company"];
        if (Request["reg_phone2"] != string.Empty)
        {
            pc.PhoneMain = (Request["reg_phone1"].Trim() != string.Empty ? Request["reg_phone1"] + "-" : "") + Request["reg_phone2"] + (Request["reg_phone3"].Trim() != string.Empty ? "-" + Request["reg_phone3"] : "");
        }

        pc.PhoneMobile = Request["reg_mobile"];
        if (Request["reg_fax2"] != string.Empty)
        {
            pc.PhoneFax = (Request["reg_fax1"].Trim() != string.Empty ? Request["reg_fax1"] + "-" : "") + Request["reg_fax2"];
        }
        pc.CityTown = Request["reg_shi"];
        pc.MSN_QQ = Request["reg_qqmsn"];
        pc.Company = Request["reg_company"];
        pc.Address = Request["reg_address"];
        pc.AboutMe = Request["reg_jianjie"];
        pc.Description1 = Request["reg_kehu"];

        Uppic(pc);
        pc.Save();

        Roles.AddUserToRole(reg_uid, "organs");

        Response.Redirect(Utils.AbsoluteWebRoot + "reg/regok.aspx?uType=org", true);
    }
开发者ID:BGCX261,项目名称:zhenzhuo-px-svn-to-git,代码行数:33,代码来源:regorg.aspx.cs


示例5: lbSaveProfile_Click

    protected void lbSaveProfile_Click(object sender, EventArgs e)
    {
        string userProfileToSave = ViewState["selectedProfile"] as string;
        AuthorProfile pc = AuthorProfile.GetProfile(userProfileToSave);
        if (pc == null)
            pc = new AuthorProfile(userProfileToSave);

        pc.IsPrivate = cbIsPublic.Checked;
        pc.DisplayName = tbDisplayName.Text;
        pc.FirstName = tbFirstName.Text;
        pc.MiddleName = tbMiddleName.Text;
        pc.LastName = tbLastName.Text;

        DateTime date;
        if (DateTime.TryParse(tbBirthdate.Text, out date))
            pc.Birthday = date;

        pc.PhotoURL = tbPhotoUrl.Text;
        pc.PhoneMain = tbPhoneMain.Text;
        pc.PhoneMobile = tbPhoneMobile.Text;
        pc.PhoneFax = tbPhoneFax.Text;
        pc.EmailAddress = tbEmailAddress.Text;
        pc.CityTown = tbCityTown.Text;
        pc.RegionState = tbRegionState.Text;
        pc.Country = ddlCountry.SelectedValue;
        pc.Company = tbCompany.Text;
        pc.AboutMe = tbAboutMe.Text;

        pc.Save();
    }
开发者ID:rajgit31,项目名称:RajBlog,代码行数:30,代码来源:Profiles.aspx.cs


示例6: Uppic

    protected void Uppic(AuthorProfile ap)
    {
        if (fudPhoto.FileName == string.Empty)
        {
            return;
        }
        HttpPostedFile pf = fudPhoto.PostedFile;
        int intDocLen = pf.ContentLength;
        string contentType = pf.ContentType;

        byte[] Docbuffer = new byte[intDocLen];

        Stream objStream;
        objStream = pf.InputStream;
        objStream.Read(Docbuffer, 0, intDocLen);

        Res res = new Res();
        res.FileName = Path.GetFileName(pf.FileName);
        res.ResType = pf.ContentType;
        res.Description = "Profile";
        res.Author = ap.UserName;
        res.Points = 0;
        res.Save();

        res.CurrentPostFileBuffer = Docbuffer;
        res.BlobUpdate();

        res.CurrentPostFileBuffer = null;

        ap.PhotoURL = res.Id.ToString();
    }
开发者ID:BGCX261,项目名称:zhenzhuo-px-svn-to-git,代码行数:31,代码来源:regtch.aspx.cs


示例7: DeleteProfile

        public override void DeleteProfile(AuthorProfile profile)
        {
            string fileName = _Folder + "profiles" + Path.DirectorySeparatorChar + profile.Id + ".xml";
            if (File.Exists(fileName))
                File.Delete(fileName);

            if (AuthorProfile.Profiles.Contains(profile))
                AuthorProfile.Profiles.Remove(profile);
        }
开发者ID:rajgit31,项目名称:RajBlog,代码行数:9,代码来源:Profiles.cs


示例8: btnNo_Click

 protected void btnNo_Click(object sender, EventArgs e)
 {
     string userProfileToSave = ViewState["selectedProfile"] as string;
     AuthorProfile pc = AuthorProfile.GetProfile(userProfileToSave);
     if (pc == null)
         pc = new AuthorProfile(userProfileToSave);
     pc.IsPrivate = false;
     pc.NoMess = txtNoMess.Text;
     pc.Save();
 }
开发者ID:BGCX261,项目名称:zhenzhuo-px-svn-to-git,代码行数:10,代码来源:Profiles.aspx.cs


示例9: DeleteProfile

        /// <summary>
        /// The delete profile.
        /// </summary>
        /// <param name="profile">
        /// The profile.
        /// </param>
        public override void DeleteProfile(AuthorProfile profile)
        {
            var fileName = string.Format("{0}profiles{1}{2}.xml", this.Folder, Path.DirectorySeparatorChar, profile.Id);
            if (File.Exists(fileName))
            {
                File.Delete(fileName);
            }

            if (AuthorProfile.Profiles.Contains(profile))
            {
                AuthorProfile.Profiles.Remove(profile);
            }
        }
开发者ID:sagasu,项目名称:tddLegacy,代码行数:19,代码来源:Profiles.cs


示例10: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        lbID.Text = Request.Params["uid"];
        tch = AuthorProfile.GetProfile(lbID.Text);
        this.Title = tch.DisplayName;
        if (Request.Cookies["tchViewCount_" + lbID.Text] == null)
        {
            HttpCookie MyCookie = new HttpCookie("tchViewCount_" + lbID.Text);
            DateTime now = DateTime.Now;

            MyCookie["IP"] = Request.UserHostAddress;
            MyCookie["tid"] = lbID.Text;
            MyCookie.Expires = now.AddHours(1);

            Response.Cookies.Add(MyCookie);
            tch.ViewCount++;
            tch.Save();
        }
    }
开发者ID:BGCX261,项目名称:zhenzhuo-px-svn-to-git,代码行数:19,代码来源:TeacherView.aspx.cs


示例11: InsertProfile

        /// <summary>
        /// The insert profile.
        /// </summary>
        /// <param name="profile">
        /// The profile.
        /// </param>
        public override void InsertProfile(AuthorProfile profile)
        {
            if (!Directory.Exists(string.Format("{0}profiles", this.Folder)))
            {
                Directory.CreateDirectory(string.Format("{0}profiles", this.Folder));
            }

            var fileName = string.Format("{0}profiles{1}{2}.xml", this.Folder, Path.DirectorySeparatorChar, profile.Id);
            var settings = new XmlWriterSettings { Indent = true };

            using (var writer = XmlWriter.Create(fileName, settings))
            {
                writer.WriteStartDocument(true);
                writer.WriteStartElement("profileData");

                writer.WriteElementString("DisplayName", profile.DisplayName);
                writer.WriteElementString("FirstName", profile.FirstName);
                writer.WriteElementString("MiddleName", profile.MiddleName);
                writer.WriteElementString("LastName", profile.LastName);

                writer.WriteElementString("CityTown", profile.CityTown);
                writer.WriteElementString("RegionState", profile.RegionState);
                writer.WriteElementString("Country", profile.Country);

                writer.WriteElementString("Birthday", profile.Birthday.ToString("yyyy-MM-dd"));
                writer.WriteElementString("AboutMe", profile.AboutMe);
                writer.WriteElementString("PhotoURL", profile.PhotoUrl);

                writer.WriteElementString("Company", profile.Company);
                writer.WriteElementString("EmailAddress", profile.EmailAddress);
                writer.WriteElementString("PhoneMain", profile.PhoneMain);
                writer.WriteElementString("PhoneMobile", profile.PhoneMobile);
                writer.WriteElementString("PhoneFax", profile.PhoneFax);

                writer.WriteElementString("IsPrivate", profile.Private.ToString());

                writer.WriteEndElement();
            }
        }
开发者ID:sagasu,项目名称:tddLegacy,代码行数:45,代码来源:Profiles.cs


示例12: InsertProfile

        public override void InsertProfile(AuthorProfile profile)
        {
            if (!Directory.Exists(_Folder + "profiles"))
                Directory.CreateDirectory(_Folder + "profiles");

            string fileName = _Folder + "profiles" + Path.DirectorySeparatorChar + profile.Id + ".xml";
            XmlWriterSettings settings = new XmlWriterSettings();
            settings.Indent = true;

            using (XmlWriter writer = XmlWriter.Create(fileName, settings))
            {
                writer.WriteStartDocument(true);
                writer.WriteStartElement("profileData");

                writer.WriteElementString("DisplayName", profile.DisplayName);
                writer.WriteElementString("FirstName", profile.FirstName);
                writer.WriteElementString("MiddleName", profile.MiddleName);
                writer.WriteElementString("LastName", profile.LastName);

                writer.WriteElementString("CityTown", profile.CityTown);
                writer.WriteElementString("RegionState", profile.RegionState);
                writer.WriteElementString("Country", profile.Country);

                writer.WriteElementString("Birthday", profile.Birthday.ToString("yyyy-MM-dd"));
                writer.WriteElementString("AboutMe", profile.AboutMe);
                writer.WriteElementString("PhotoURL", profile.PhotoURL);

                writer.WriteElementString("Company", profile.Company);
                writer.WriteElementString("EmailAddress", profile.EmailAddress);
                writer.WriteElementString("PhoneMain", profile.PhoneMain);
                writer.WriteElementString("PhoneMobile", profile.PhoneMobile);
                writer.WriteElementString("PhoneFax", profile.PhoneFax);

                writer.WriteElementString("IsPrivate", profile.IsPrivate.ToString());

                writer.WriteEndElement();
            }
        }
开发者ID:rajgit31,项目名称:RajBlog,代码行数:38,代码来源:Profiles.cs


示例13: btnok_Click

    protected void btnok_Click(object sender, EventArgs e)
    {
        string reg_uid = Request["reg_uid"];
        Membership.CreateUser(Request["reg_uid"], Request["reg_pwd1"],  Request["reg_email"]);
        //reg_nicheng reg_company
        //reg_phone1 reg_phone2 reg_phone3 reg_mobile reg_qqmsn
        AuthorProfile pc = new AuthorProfile(reg_uid);
        pc.DisplayName = Request["reg_nicheng"];
        pc.CityTown = Request["reg_shi"];
        pc.Company = Request["reg_company"];
        if (Request["reg_phone2"]!=string.Empty)
        {
            pc.PhoneMain =  Request["reg_phone1"].Trim() != string.Empty ?Request["reg_phone1"] + "-":"" + Request["reg_phone2"] + Request["reg_phone3"].Trim() != string.Empty ? "-" + Request["reg_phone3"] : "";
        }

        pc.PhoneMobile = Request["reg_mobile"];
        pc.MSN_QQ = Request["reg_qqmsn"];
        pc.IsPrivate = true;//学员注册直接审核通过
        pc.Save();

        Roles.AddUserToRole(reg_uid, "students");
        Response.Redirect(Utils.AbsoluteWebRoot + "reg/regok.aspx?uType=std", true);
    }
开发者ID:BGCX261,项目名称:zhenzhuo-px-svn-to-git,代码行数:23,代码来源:regstd.aspx.cs


示例14: btnok_Click

    protected void btnok_Click(object sender, EventArgs e)
    {
        string reg_uid = Request["reg_uid"];
        Membership.CreateUser(Request["reg_uid"], Request["reg_pwd1"], Request["reg_email"]);

        AuthorProfile pc = new AuthorProfile(reg_uid);
        pc.DisplayName = Request["reg_xingming"];
        pc.CityTown = Request["reg_shi"];
        //pc.Company = Request["reg_company"];
        if (Request["reg_phone2"] != string.Empty)
        {
            pc.PhoneMain = (Request["reg_phone1"].Trim() != string.Empty ? Request["reg_phone1"] + "-" : "") + Request["reg_phone2"] + (Request["reg_phone3"].Trim() != string.Empty ? "-" + Request["reg_phone3"] : "");
        }

        pc.PhoneMobile = Request["reg_mobile"];
        pc.MSN_QQ = Request["reg_qqmsn"];
        pc.Pay = Request["reg_pay"];
        pc.AboutMe = Request["reg_jianjie"];
        pc.Description1 = Request["reg_kehu"];
        pc.Description2 = Request["reg_zhujiang"];

        string fields = string.Empty;
        for (int i = 0; i < Field.Fields.Count; i++)
        {
            if (Request["reg_lingyu:" + i]!=null)
            {
                Field fld = Field.Fields[i];
                fields += fld.Id + "|";
            }
        }
        pc.Fields = fields.TrimEnd('|');
        Uppic(pc);
        pc.Save();

        Roles.AddUserToRole(reg_uid, "teachers");
        Response.Redirect(Utils.AbsoluteWebRoot + "reg/regok.aspx?uType=tch", true);
    }
开发者ID:BGCX261,项目名称:zhenzhuo-px-svn-to-git,代码行数:37,代码来源:regtch.aspx.cs


示例15: SelectProfile

        /// <summary>
        /// Loads AuthorProfile from database
        /// </summary>
        /// <param name="id">username</param>
        /// <returns></returns>
        public override AuthorProfile SelectProfile(string id)
        {
            StringDictionary dic = new StringDictionary();
            AuthorProfile profile = new AuthorProfile(id);

            // Retrieve Profile data from Db
            string connString = ConfigurationManager.ConnectionStrings[connStringName].ConnectionString;
            string providerName = ConfigurationManager.ConnectionStrings[connStringName].ProviderName;
            DbProviderFactory provider = DbProviderFactories.GetFactory(providerName);

            using (DbConnection conn = provider.CreateConnection())
            {
                conn.ConnectionString = connString;
                conn.Open();

                using (DbCommand cmd = conn.CreateCommand())
                {
                    string sqlQuery = "SELECT SettingName, SettingValue FROM " + tablePrefix + "Profiles " +
                                        "WHERE UserName = " + parmPrefix + "name";
                    cmd.CommandText = sqlQuery;
                    cmd.CommandType = CommandType.Text;

                    DbParameter dpName = provider.CreateParameter();
                    dpName.ParameterName = parmPrefix + "name";
                    dpName.Value = id;
                    cmd.Parameters.Add(dpName);

                    using (DbDataReader rdr = cmd.ExecuteReader())
                    {
                        while (rdr.Read())
                        {
                            dic.Add(rdr.GetString(0), rdr.GetString(1));
                        }
                    }
                }
            }

            // Load profile with data from dictionary
            if (dic.ContainsKey("DisplayName"))
                profile.DisplayName = dic["DisplayName"];
            if (dic.ContainsKey("FirstName"))
                profile.FirstName = dic["FirstName"];
            if (dic.ContainsKey("MiddleName"))
                profile.MiddleName = dic["MiddleName"];
            if (dic.ContainsKey("LastName"))
                profile.LastName = dic["LastName"];
            if (dic.ContainsKey("CityTown"))
                profile.CityTown = dic["CityTown"];
            if (dic.ContainsKey("RegionState"))
                profile.RegionState = dic["RegionState"];
            if (dic.ContainsKey("Country"))
                profile.Country = dic["Country"];
            if (dic.ContainsKey("Birthday"))
            {
                DateTime date;
                if (DateTime.TryParse(dic["Birthday"], out date))
                    profile.Birthday = date;
            }
            if (dic.ContainsKey("AboutMe"))
                profile.AboutMe = dic["AboutMe"];
            if (dic.ContainsKey("PhotoURL"))
                profile.PhotoURL = dic["PhotoURL"];
            if (dic.ContainsKey("Company"))
                profile.Company = dic["Company"];
            if (dic.ContainsKey("EmailAddress"))
                profile.EmailAddress = dic["EmailAddress"];
            if (dic.ContainsKey("PhoneMain"))
                profile.PhoneMain = dic["PhoneMain"];
            if (dic.ContainsKey("PhoneMobile"))
                profile.PhoneMobile = dic["PhoneMobile"];
            if (dic.ContainsKey("PhoneFax"))
                profile.PhoneFax = dic["PhoneFax"];
            if (dic.ContainsKey("IsPrivate"))
                profile.IsPrivate = dic["IsPrivate"] == "true";

            return profile;
        }
开发者ID:rajgit31,项目名称:RajBlog,代码行数:82,代码来源:DbBlogProvider.cs


示例16: UpdateProfileImage

        /// <summary>
        /// Remove any existing profile images
        /// </summary>
        /// <param name="profile">User profile</param>
        static void UpdateProfileImage(AuthorProfile profile)
        {
            var dir = BlogEngine.Core.Providers.BlogService.GetDirectory("/avatars");

            if(string.IsNullOrEmpty(profile.PhotoUrl))
            {
                foreach (var f in dir.Files)
                {
                    var dot = f.Name.IndexOf(".");
                    var img = dot > 0 ? f.Name.Substring(0, dot) : f.Name;
                    if (profile.UserName == img)
                    {
                        f.Delete();
                    }
                }
            }
            else
            {
                foreach (var f in dir.Files)
                {
                    var dot = f.Name.IndexOf(".");
                    var img = dot > 0 ? f.Name.Substring(0, dot) : f.Name;
                    // delete old profile image saved with different name
                    // for example was admin.jpg and now admin.png
                    if (profile.UserName == img && f.Name != profile.PhotoUrl.Replace("\"", ""))
                    {
                        f.Delete();
                    }
                }
            }
        }
开发者ID:ildragocom,项目名称:BlogEngine.NET,代码行数:35,代码来源:UsersRepository.cs


示例17: GetProfile

 static Profile GetProfile(string id)
 {
     if (!Utils.StringIsNullOrWhitespace(id))
     {
         var pf = AuthorProfile.GetProfile(id);
         if (pf == null)
         {
             pf = new AuthorProfile(id);
             pf.Birthday = DateTime.Parse("01/01/1900");
             pf.DisplayName = id;
             pf.EmailAddress = Utils.GetUserEmail(id);
             pf.FirstName = id;
             pf.Private = true;
             pf.Save();
         }
         
         return new Profile { 
             AboutMe = string.IsNullOrEmpty(pf.AboutMe) ? "" : pf.AboutMe,
             Birthday = pf.Birthday.ToShortDateString(),
             CityTown = string.IsNullOrEmpty(pf.CityTown) ? "" : pf.CityTown,
             Country = string.IsNullOrEmpty(pf.Country) ? "" : pf.Country,
             DisplayName = pf.DisplayName,
             EmailAddress = pf.EmailAddress,
             PhoneFax = string.IsNullOrEmpty(pf.PhoneFax) ? "" : pf.PhoneFax,
             FirstName = string.IsNullOrEmpty(pf.FirstName) ? "" : pf.FirstName,
             Private = pf.Private,
             LastName = string.IsNullOrEmpty(pf.LastName) ? "" : pf.LastName,
             MiddleName = string.IsNullOrEmpty(pf.MiddleName) ? "" : pf.MiddleName,
             PhoneMobile = string.IsNullOrEmpty(pf.PhoneMobile) ? "" : pf.PhoneMobile,
             PhoneMain = string.IsNullOrEmpty(pf.PhoneMain) ? "" : pf.PhoneMain,
             PhotoUrl = string.IsNullOrEmpty(pf.PhotoUrl) ? "" : pf.PhotoUrl.Replace("\"", ""),
             RegionState = string.IsNullOrEmpty(pf.RegionState) ? "" : pf.RegionState
         };
     }
     return null;
 }
开发者ID:ildragocom,项目名称:BlogEngine.NET,代码行数:36,代码来源:UsersRepository.cs


示例18: SelectProfile

        AuthorProfile SelectProfile(string id, Blog blog)
        {
            var fileName = string.Format("{0}profiles{1}{2}.xml", GetFolder(blog), Path.DirectorySeparatorChar, id);

            if (blog.IsSiteAggregation && !blog.IsPrimary)
                fileName = Path.Combine(BlogConfig.StorageLocation, "blogs", blog.Name, "profiles", id + ".xml");

            var doc = new XmlDocument();

            if (!File.Exists(fileName))
            {
                Utils.Log(string.Format("XmlBlogProvider: can not load profile from \"{0}\"", fileName));
                return null;
            }

            doc.Load(fileName);

            var profile = new AuthorProfile(id);

            if (doc.SelectSingleNode("//DisplayName") != null)
            {
                profile.DisplayName = doc.SelectSingleNode("//DisplayName").InnerText;
            }

            if (doc.SelectSingleNode("//FirstName") != null)
            {
                profile.FirstName = doc.SelectSingleNode("//FirstName").InnerText;
            }

            if (doc.SelectSingleNode("//MiddleName") != null)
            {
                profile.MiddleName = doc.SelectSingleNode("//MiddleName").InnerText;
            }

            if (doc.SelectSingleNode("//LastName") != null)
            {
                profile.LastName = doc.SelectSingleNode("//LastName").InnerText;
            }

            if (doc.SelectSingleNode("//CityTown") != null)
            {
                profile.CityTown = doc.SelectSingleNode("//CityTown").InnerText;
            }

            if (doc.SelectSingleNode("//RegionState") != null)
            {
                profile.RegionState = doc.SelectSingleNode("//RegionState").InnerText;
            }

            if (doc.SelectSingleNode("//Country") != null)
            {
                profile.Country = doc.SelectSingleNode("//Country").InnerText;
            }

            if (doc.SelectSingleNode("//Birthday") != null)
            {
                DateTime date;
                if (DateTime.TryParse(doc.SelectSingleNode("//Birthday").InnerText, out date))
                {
                    profile.Birthday = date;
                }
            }

            if (doc.SelectSingleNode("//AboutMe") != null)
            {
                profile.AboutMe = doc.SelectSingleNode("//AboutMe").InnerText;
            }

            if (doc.SelectSingleNode("//PhotoURL") != null)
            {
                profile.PhotoUrl = doc.SelectSingleNode("//PhotoURL").InnerText;
            }

            if (doc.SelectSingleNode("//Company") != null)
            {
                profile.Company = doc.SelectSingleNode("//Company").InnerText;
            }

            if (doc.SelectSingleNode("//EmailAddress") != null)
            {
                profile.EmailAddress = doc.SelectSingleNode("//EmailAddress").InnerText;
            }

            if (doc.SelectSingleNode("//PhoneMain") != null)
            {
                profile.PhoneMain = doc.SelectSingleNode("//PhoneMain").InnerText;
            }

            if (doc.SelectSingleNode("//PhoneMobile") != null)
            {
                profile.PhoneMobile = doc.SelectSingleNode("//PhoneMobile").InnerText;
            }

            if (doc.SelectSingleNode("//PhoneFax") != null)
            {
                profile.PhoneFax = doc.SelectSingleNode("//PhoneFax").InnerText;
            }

            if (doc.SelectSingleNode("//IsPrivate") != null)
            {
//.........这里部分代码省略.........
开发者ID:aelagawy,项目名称:BlogEngine.NET,代码行数:101,代码来源:Profiles.cs


示例19: DeleteProfile

 /// <summary>
 /// Deletes the specified Page from the current provider.
 /// </summary>
 /// <param name="profile">
 /// The profile to delete.
 /// </param>
 public static void DeleteProfile(AuthorProfile profile)
 {
     Provider.DeleteProfile(profile);
 }
开发者ID:raul-aguirre-flexit,项目名称:Carnaval-Radio,代码行数:10,代码来源:BlogService.cs


示例20: InsertProfile

 /// <summary>
 /// Adds AuthorProfile to database
 /// </summary>
 /// <param name="profile"></param>
 public override void InsertProfile(AuthorProfile profile)
 {
     UpdateProfile(profile);
 }
开发者ID:rajgit31,项目名称:RajBlog,代码行数:8,代码来源:DbBlogProvider.cs



注:本文中的AuthorProfile类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AuthorizationContext类代码示例发布时间:2022-05-24
下一篇:
C# Author类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap