-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathForm2.cs
More file actions
64 lines (55 loc) · 1.93 KB
/
Form2.cs
File metadata and controls
64 lines (55 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Web;
using System.Net;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form2 : Form
{
dbClss gObjDBClss = new dbClss();
DataSet gObjDS = new DataSet();
public Form2()
{
InitializeComponent();
}
private void sbmt_frgt_pwd_Click(object sender, EventArgs e)
{
if (phn_fgt.Text.Equals(""))
{
MessageBox.Show("Please enter your registered phone number");
}
else
{
string lsQuery = "Select username,pwd from T_Login where phone_number='" + phn_fgt.Text + "'";
gObjDS = gObjDBClss.GetData(lsQuery);
if (gObjDS.Tables[0].Rows.Count > 0)
{
string text = "UserName=" + gObjDS.Tables[0].Rows[0][0].ToString() +"Password=" + gObjDS.Tables[0].Rows[0][1].ToString() + "";
string URL = "https://smsapi.engineeringtgr.com/send/?Mobile=*********&Password=*******&Message=" + text + "&To=" + phn_fgt.Text + "&Key=***********";
try
{
Process.Start("Firefox.exe",URL);
}
catch (Exception xe)
{
Console.Out.WriteLine("------ping--------");
Console.Out.WriteLine(xe.Message);
}
}
else
{
MessageBox.Show("Enter valid phone number");
}
}
}
}
}