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


C# Registration.Subscribe方法代码示例

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


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

示例1: btnPersonalDetails_Click

        //Confirmation panel
        protected void btnPersonalDetails_Click(object sender, EventArgs e)
        {
            cvSubmitSubscription.ErrorMessage = Translate.Text("<p>Sorry, the booking system is not available right now - please try again later.</p>");
            cvSubmitSubscription.IsValid = true;

            //custom validation

            //check dob is fine
            DateTime datDateOfBirth;
            if (!DateTime.TryParse(txtDOBDay.Value.Trim() + "/" + txtDOBMonth.Value.Trim() + "/" + txtDOBYear.Value.Trim(), out datDateOfBirth))
            {
                cvDateOfBirth.IsValid = false;
            }
            //check dob2 is fine
            if ((txtDOBDay2.Value == "" && txtDOBMonth2.Value == "" && txtDOBYear2.Value == "") || (txtDOBDay2.Value == "DD" && txtDOBMonth2.Value == "MM" && txtDOBYear2.Value == "YYYY"))
            {
                //valid
            }
            else
            {
                //check date is fine
                if (!DateTime.TryParse(txtDOBDay2.Value.Trim() + "/" + txtDOBMonth2.Value.Trim() + "/" + txtDOBYear2.Value.Trim(), out datDateOfBirth))
                {
                    cvDateOfBirth2.IsValid = false;
                }
            }
            //check dob3 is fine
            if ((txtDOBDay3.Value == "" && txtDOBMonth3.Value == "" && txtDOBYear3.Value == "") || (txtDOBDay3.Value == "DD" && txtDOBMonth3.Value == "MM" && txtDOBYear3.Value == "YYYY"))
            {
                //valid
            }
            else
            {
                //check date is fine
                if (!DateTime.TryParse(txtDOBDay3.Value.Trim() + "/" + txtDOBMonth3.Value.Trim() + "/" + txtDOBYear3.Value.Trim(), out datDateOfBirth))
                {
                    cvDateOfBirth3.IsValid = false;
                }
            }
            //check Terms and Conditions
            cvTermsAndConditions.IsValid = chkTermsAndConditions.Checked;

            try
            {

                if (Page.IsValid == true)
                {
                    //Background data
                    if (radRace1.Checked)
                    {
                        raceType = radRace1.Text;
                    }
                    else if (radRace2.Checked)
                    {
                        raceType = radRace2.Text;
                    }
                    else
                    {
                        raceType = radRace3.Text;
                    }

                    if (radMember.Checked)
                    {
                        vaStatus = radMember.Text;
                    }
                    else if (radNonMember.Checked)
                    {
                        vaStatus = radNonMember.Text;
                    }
                    else
                    {
                        vaStatus = radStaff.Text;
                    }

                    //Save form details to report Db
                    SaveDataToReportDB();

                    //check if we have a data stored

                    if (Session["sess_Transaction"] != null)
                    {

                        //load transaction
                        transaction = (Transaction)Session["sess_Transaction"];

                        //Set transaction object

                        Athlete subscriber = transaction.Subscriber;

                        subscriber.IsTeam = radGroup.Checked ? true : false;

                        if (radMember.Checked)
                        {
                            subscriber.Type = AthleteType.Member;
                        }
                        else if (radNonMember.Checked)
                        {
                            subscriber.Type = AthleteType.Non_Member;
                        }
//.........这里部分代码省略.........
开发者ID:jon-mcmr,项目名称:Virgin-Tds,代码行数:101,代码来源:IndoorRegistration.ascx.cs


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