Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (txtEmail.Enabled == true)
            {
                Contacts.Service1 sr = new Contacts.Service1();
                lblShow.Text = sr.RecoverPwdE(txtEmail.Text);

                if (lblShow.Text != "invalid user or User no Registered with this email")
                {
                    SendEmailAdmin(txtEmail.Text, lblShow.Text);
                    MessageBox.Show("Password has been sent by Email.");
                }
            }
            else
            {
                Contacts.Service1 sr2 = new Contacts.Service1();
                lblShow.Text = sr2.RecoverPwdS(txtSMS.Text);

                if (txtSMS.Text.Trim().Length == 13)
                {
                    RecPwdbySMS sm = new RecPwdbySMS();
                    sm.SetComPort("com4");
                    sm.Opens();
                    sm.RecoverPwdbySMS(txtSMS.Text, lblShow.Text);
                    sm.Closes();
                    MessageBox.Show("Password has been sent by SMS.");
                }
            }
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Contacts.Service1 sr = new Contacts.Service1();
            lblShow.Text = sr.RecoverPwdE(txtEmail.Text);
            if (lblShow.Text != "invalid user or User no Registered with this email")
            {
                SendEmailAdmin(txtEmail.Text, lblShow.Text);
            }

            //  SendEmailAdmin(txtEmail.Text, "lblShow.Text");
        }