protected void btnSend_Click(object sender, EventArgs e)
    {
        Random rf=new Random(DateTime.Now.DayOfYear);
        varificationCode = rf.NextDouble().ToString().Substring(3,6);

        MailAndSms ms = new MailAndSms("COM25");
        ms.Open();
        ms.sendMsg(txtMobileNo.Text, varificationCode);
            lblStatus.Text = "Message sent";
        ms.Close();
    }
    protected void btnSend_Click(object sender, EventArgs e)
    {
        Random rf = new Random(DateTime.Now.DayOfYear);

        varificationCode = rf.NextDouble().ToString().Substring(3, 6);

        MailAndSms ms = new MailAndSms("COM25");

        ms.Open();
        ms.sendMsg(txtMobileNo.Text, varificationCode);
        lblStatus.Text = "Message sent";
        ms.Close();
    }
示例#3
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        bool            attempt = false;
        UserGeneralInfo UGI     = new UserGeneralInfo();

        if (UGI.Query_UserName(txtUserName.Text))
        {
            if (UGI.Query_email(txtEmail.Text))
            {
                if (UGI.User_Registration(txtFName.Text + " " + txtLName.Text, txtUserName.Text, txtDob.Text, ddSex.Text, txtEmail.Text, txtPass.Text))
                {
                    attempt = true;
                }
            }
            else
            {
                lblError.Text = "Email already Exist";
            }
        }
        else
        {
            lblError.Text = "UserName not available";
        }
        if (attempt)
        {
            MailAndSms ms = new MailAndSms("20");
            ms.SendEmail("*****@*****.**", txtEmail.Text, "Email Varification", "please follow the Link http://cmrsocial.moooo.com:81/Authenticate.aspx?uid=" + txtUserName.Text);

            Session["UserName"] = txtUserName.Text;
            //********CREATING FOLDERS FOR THE REGISTERD USERS*********//
            String folder1 = "~/foopicDB/" + Session["UserName"].ToString();
            Directory.CreateDirectory(Server.MapPath(folder1));

            String folder2 = "~/foopicDB/" + Session["UserName"].ToString() + "/Profile";
            Directory.CreateDirectory(Server.MapPath(folder2));

            UGI.update_Login(Session["UserName"].ToString(), 1);
            Response.Redirect("fooHome.aspx");
        }
        clear_function();
    }
示例#4
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        bool attempt=false;
        UserGeneralInfo UGI = new UserGeneralInfo();
        if (UGI.Query_UserName(txtUserName.Text))
        {
            if (UGI.Query_email(txtEmail.Text))
            {
                if (UGI.User_Registration(txtFName.Text+" "+txtLName.Text, txtUserName.Text, txtDob.Text, ddSex.Text, txtEmail.Text, txtPass.Text))
                    attempt = true;

            }
            else
                lblError.Text = "Email already Exist";

        }
        else
            lblError.Text = "UserName not available";
        if (attempt)
        {
            MailAndSms ms = new MailAndSms("20");
            ms.SendEmail("*****@*****.**", txtEmail.Text, "Email Varification", "please follow the Link http://cmrsocial.moooo.com:81/Authenticate.aspx?uid=" + txtUserName.Text);

            Session["UserName"] = txtUserName.Text;
            //********CREATING FOLDERS FOR THE REGISTERD USERS*********//
            String folder1 = "~/foopicDB/" + Session["UserName"].ToString();
            Directory.CreateDirectory(Server.MapPath(folder1));

            String folder2 = "~/foopicDB/" + Session["UserName"].ToString() + "/Profile";
            Directory.CreateDirectory(Server.MapPath(folder2));

            UGI.update_Login(Session["UserName"].ToString(), 1);
                Response.Redirect("fooHome.aspx");

        }
        clear_function();
    }