예제 #1
0
    protected void BtnRegister_Click(object sender, EventArgs e)
    {
        bool partnerExists = true;

        if (TxtBxPartnerID.Text != "")
        {
            partnerExists = Participant.CheckParticipantTTID(int.Parse(TxtBxPartnerID.Text.Substring(2)));
        }
        if (partnerExists)
        {
            Participant participant = InitializeParticipant();
            int         ttid        = Participant.AddNewParticipant(participant);
            if (ttid != 0)
            {
                //bool mailSent = Communication.Sendmail("*****@*****.**", "", participant.EmailID, "Techtrishna 2014 registration", "You are successfully registered in Techtrishan 2014. Your registration id is TT" + ttid.ToString());
                LblResult.Text = "Registered. Your ID is TT" + ttid.ToString();
            }
            else
            {
                LblResult.Text = "Error! Please try again.";
            }
        }
        else
        {
            LblResult.Text = "Invalid Partner ID";
        }
    }