protected void BtnSave_Click(object sender, EventArgs e)
    {
        string s;

        if (RbtnMale.Checked == true)
        {
            s = "male";
        }
        else
        {
            s = "female";
        }
        //  string mycmd = "insert into ContactUs values('" + TxtName.Text + "','" + TxtAddress.Text + "','" + s + "','" + TxtContactNo.Text + "','" + TxtEmailAddress.Text + "','" + TxtMessage.Text + "')";
        // bool x = dm.NonQuery(mycmd);
        // if (x == true)
        // {
        Response.Write("<script>alert('Thanks for contacting Us!')</script>");
        string    msg = "Hello" + TxtName.Text + ".Thanks for enquiry.We will contact You shortly.Regards-Ebanking";
        SMSSender ss  = new SMSSender();
        bool      y   = ss.SendMySMS(TxtContactNo.Text, msg);

        if (y == true)
        {
            Response.Write("<script>alert('sucess!')</script>");
        }
        else
        {
            Response.Write("<script>alert('fali!')</script>");
        }

        // }
        //  else
        //  Response.Write("<script>alert('Error..try again!')</script>");
    }
示例#2
0
    protected void BtnSend_Click(object sender, EventArgs e)
    {
        SMSSender ss = new SMSSender();

        if (ss.SendMySMS(TxtMobNo.Text, TxtMessage.Text) == true)
        {
            Response.Write("<script>alert('SMS sent successfully')</script>");
        }
        else
        {
            Response.Write("<script>alert('SMS sent not successfully')</script>");
        }
    }
示例#3
0
    protected void BtnSendSMS_Click(object sender, EventArgs e)
    {
        SMSSender ss = new SMSSender();
        bool      b  = ss.SendMySMS(TxtMobNo.Text, TxtMessage.Text);

        if (b == true)
        {
            TxtMessage.Text = "";
            TxtMobNo.Text   = "";
            Response.Write("<script>alert('SMS Sent.');</script>");
        }
        else
        {
            Response.Write("<script>alert('SMS not Sent.');</script>");
        }
    }
示例#4
0
    protected void BtnGetCode_Click(object sender, EventArgs e)
    {
        cm.YourCommand = "SELECT name from Registration where mobile='" + TxtMobNo.Text + "'";
        object ob = cm.GetSingleValue();

        if (ob != null)
        {
            //SendSMS ss = new SendSMS();
            SMSSender        ss   = new SMSSender();
            CaptchaGenerator cg   = new CaptchaGenerator();
            string           code = cg.GetRandomCode();
            string           msg  = "Hello " + ob + ", Someone tried to reset your password in GGL Web Portal. Is that person you? if yes then your varification code is: " + code + " Otherwise ignore this message.\n Regards- \n Admin Polyprep";
            ss.SendMySMS(TxtMobNo.Text, msg);
            cm.YourCommand = "Insert into Tbl_ForgotPassword(UserId,RequestedOn,Code,ValidTill,Status) values('" + TxtVerEmail.Text + "','" + DateTime.Now.ToString() + "','" + code + "','" + DateTime.Now.AddMinutes(15).ToString() + "','0')";
            if (cm.ExecuteInsertOrUpdateOrDelete())
            {
                Response.Write("<script>window.location.href = '#reset';</script>");
            }
        }
        else
        {
            Response.Write("<script>alert('Invalid mobile no');window.location.href = '#dialog';</script>");
        }
    }