当前位置: 首页>>代码示例>>C#>>正文


C# DataLayer.AddMember方法代码示例

本文整理汇总了C#中DataLayer.AddMember方法的典型用法代码示例。如果您正苦于以下问题:C# DataLayer.AddMember方法的具体用法?C# DataLayer.AddMember怎么用?C# DataLayer.AddMember使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataLayer的用法示例。


在下文中一共展示了DataLayer.AddMember方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnSubmit_Click

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (lbxMembers.SelectedIndex == -1)
        {
            string sSubscriptionID = "Free";
            string sMembershipType = "0.00";
            DataLayer dl = new DataLayer();
            DateTime dtJoinDate = DateTime.Now;

            int iPassword = rPassword.Next(9999999);

            dl.AddMember(tbxEmail.Text, iPassword.ToString(), tbxName.Text, "no_avatar.gif", "", "", "", "", tbxBusinessName.Text, "no_logo.gif", "", dtJoinDate, "", "", "", "", "", "", cbxAdmin.Checked, cbxModerator.Checked, cbxCanPostBlog.Checked, cbxMemberNewsletter.Checked, cbxDailyMotivator.Checked, false, false, "", "", "Not Specified", 0, DateTime.Today, "", "#77BB77,#ffffff,#DDFFDD,#444444,#1985b5,#77BB77,#ffffff,#ffffff,#000000,#0000EE,#CCDDCC", ddlArticleColumn.SelectedValue, sSubscriptionID, sMembershipType);

            try
            {
                WebRequest wrGETURL;
                wrGETURL = WebRequest.Create("http://tinyurl.com/api-create.php?url=http://www.ReferralNetworX.com/Profile.aspx?member=" + tbxEmail.Text);
                Stream objStream;
                objStream = wrGETURL.GetResponse().GetResponseStream();
                StreamReader objReader = new StreamReader(objStream);
                string sURL = objReader.ReadToEnd();

                Yedda.Twitter t = new Yedda.Twitter();
                t.Update("ReferralNetworX", "1million!", "New Member! " + dl.GetFullMemberNameBy_Email(tbxEmail.Text) + " has joined us on ReferralNetworX.com " + sURL, Yedda.Twitter.OutputFormatType.XML);
                t.Update("Chevex", "Ch3vyF0rd", "New Member! " + dl.GetFullMemberNameBy_Email(tbxEmail.Text) + " has joined us on ReferralNetworX.com " + sURL, Yedda.Twitter.OutputFormatType.XML);
                t.Update("WALTatRNX", "robinwalt98", "New Member! " + dl.GetFullMemberNameBy_Email(tbxEmail.Text) + " has joined us on ReferralNetworX.com " + sURL, Yedda.Twitter.OutputFormatType.XML);
            }
            catch
            {
            }

            SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
            MailMessage mm;

            ////////////////// -= Add Comment To New Member's Profile =- ////////////////////////
            int iPerson = rand.Next(2);
            string sPerson;
            if (iPerson == 0)
            {
                int iComment = rand.Next(10);
                string sComment = "";
                if (iComment == 0)
                {
                    sComment = "Welcome to the site! I hope you like what you find.<br /><br />- Alex";
                }
                else if (iComment == 1)
                {
                    sComment = "Welcome to Referral NetworX! We are glad to have you as a member.<br /><br />- Alex";
                }
                else if (iComment == 2)
                {
                    sComment = "I love seeing new faces! Welcome to the site.<br /><br />- Alex";
                }
                else if (iComment == 3)
                {
                    sComment = "Welcome to the site! I look forward to networking with you.<br /><br />- Alex";
                }
                else if (iComment == 4)
                {
                    sComment = "A new member! I am excited that you have joined us!<br /><br />- Alex";
                }
                else if (iComment == 5)
                {
                    sComment = "Welcome to the site! We are excited to benefit from the knowledge you have to offer!<br /><br />- Alex";
                }
                else if (iComment == 6)
                {
                    sComment = "We are excited to have you here! I am confident you will make a great addition to the RNX community!<br /><br />- Alex";
                }
                else if (iComment == 7)
                {
                    sComment = "Glad you could join us! I look forward to networking with you.<br /><br />- Alex";
                }
                else if (iComment == 8)
                {
                    sComment = "I am happy you decided to be a part of Referral NetworX! Here is your first thumbs up!<br /><br />- Alex";
                }
                else if (iComment == 9)
                {
                    sComment = "Welcome to ReferralNetworX.com! Let me know if you need anything at all!<br /><br />- Alex";
                }

                dl.AddComment("[email protected]", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                dl.AddThumbsUp(tbxEmail.Text);

                mm = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To = tbxEmail.Text;
                mm.From = "[email protected]";
                mm.Subject = "Someone posted a comment on your profile!";
                mm.Body = "Alex Ford posted a comment on your profile.";
                mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                SmtpMail.Send(mm);
            }
            else if (iPerson == 1)
            {
                int iComment = rand.Next(6);
                string sComment = "";
                if (iComment == 0)
                {
//.........这里部分代码省略.........
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:101,代码来源:ManageMembers.aspx.cs

示例2: btnSubmit_Click

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        this.Validate("signup");
        if (Page.IsValid)
        {
            if (cbxAgree.Checked)
            {
                DataLayer dl = new DataLayer();
                if (!dl.EmailExists(tbxEmail.Text))
                {

                    //SmtpClient smtp = new SmtpClient("localhost");

                    //MailMessage mm;

                        dl.AddMember(tbxEmail.Text, tbxPassword.Text, tbxName.Text, "no_avatar.gif", "", "", "", "", "", "no_logo.gif", "", DateTime.Now, "", "", "", "", "", "", false, false, false, true, true, false, false, "", "", "Not Specified", 0, DateTime.Now, "Not Selected", "#77BB77,#ffffff,#DDFFDD,#444444,#1985b5,#77BB77,#ffffff,#ffffff,#000000,#0000EE,#CCDDCC", "None", "", "");

                        #region -= Add Comments to New Member Profile =-

                        int iPerson = rand.Next(2);
                        if (iPerson == 0)
                        {
                            int iComment = rand.Next(10);
                            string sComment = "";
                            if (iComment == 0)
                            {
                                sComment = "Welcome to the site! I hope you like what you find.<br /><br />- Alex";
                            }
                            else if (iComment == 1)
                            {
                                sComment = "Welcome to Referral NetworX! We are glad to have you as a member.<br /><br />- Alex";
                            }
                            else if (iComment == 2)
                            {
                                sComment = "I love seeing new faces! Welcome to the site.<br /><br />- Alex";
                            }
                            else if (iComment == 3)
                            {
                                sComment = "Welcome to the site! I look forward to networking with you.<br /><br />- Alex";
                            }
                            else if (iComment == 4)
                            {
                                sComment = "A new member! I am excited that you have joined us!<br /><br />- Alex";
                            }
                            else if (iComment == 5)
                            {
                                sComment = "Welcome to the site! We are excited to benefit from the knowledge you have to offer!<br /><br />- Alex";
                            }
                            else if (iComment == 6)
                            {
                                sComment = "We are excited to have you here! I am confident you will make a great addition to the RNX community!<br /><br />- Alex";
                            }
                            else if (iComment == 7)
                            {
                                sComment = "Glad you could join us! I look forward to networking with you.<br /><br />- Alex";
                            }
                            else if (iComment == 8)
                            {
                                sComment = "I am happy you decided to be a part of Referral NetworX! Here is your first thumbs up!<br /><br />- Alex";
                            }
                            else if (iComment == 9)
                            {
                                sComment = "Welcome to ReferralNetworX.com! Let me know if you need anything at all!<br /><br />- Alex";
                            }

                            dl.AddComment("[email protected]", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
                            dl.AddThumbsUp(tbxEmail.Text);

                            //mm = new MailMessage();
                            //mm.IsBodyHtml = true;
                            //mm.To.Add(tbxEmail.Text);
                            //mm.From = new MailAddress("[email protected]");
                            //mm.Subject = "Someone posted a comment on your profile!";
                            //mm.Body = "Alex Ford posted a comment on your profile.";
                            //mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
                            //smtp.Send(mm);
                        }
                        else if (iPerson == 1)
                        {
                            int iComment = rand.Next(6);
                            string sComment = "";
                            if (iComment == 0)
                            {
                                sComment = "Hi and welcome to Referral NetworX! Our mission is your success!<br /><br />- Walt";
                            }
                            else if (iComment == 1)
                            {
                                sComment = "Welcome to Referral NetworX! I am really looking forward to networking with you. Here's to you continued success!<br /><br />- Walt";
                            }
                            else if (iComment == 2)
                            {
                                sComment = "Its great to have you as a member of Referral NetworX! We are here to help you with your continued success!<br /><br />- Walt";
                            }
                            else if (iComment == 3)
                            {
                                sComment = "Congratulations! You are now a member of Referral NetworX. Our mission is your success!<br /><br />- Walt";
                            }
                            else if (iComment == 4)
                            {
                                sComment = "Welcome! Referral NetworX is your beginning to expanding your personal network! Relationship, Relationship, Relationship!<br /><br />- Walt";
//.........这里部分代码省略.........
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:101,代码来源:SignUp.aspx.cs


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