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.Threading;
using System.Data.OleDb;
namespace my_project
{
public partial class Form1 : Form
{
private OleDbConnection mycon;
public Form1()
{
InitializeComponent();
mycon = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\program\my project\my project\bin\Debug\pepole.mdb");
}
private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process process1;
process1 = new System.Diagnostics.Process();
process1.EnableRaisingEvents = false;
System.Diagnostics.Process.Start("smsniff.exe", "/startcapture");
process1.Close();
Thread.Sleep(5000);
SendKeysToApps page2 = new SendKeysToApps();
page2.Show();
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'pepoleDataSet.IPAddress' table. You can move, or remove it, as needed.
// TODO: This line of code loads data into the 'pepoleDataSet.room' table. You can move, or remove it, as needed.
this.roomTableAdapter.Fill(this.pepoleDataSet.room);
}
private void button2_Click(object sender, EventArgs e)
{
OleDbCommand cmd = new OleDbCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "insert into pepole( RoomNumber, titlename, Firstname, Surname, Pcname, Macaddress ) Valuse('" +
textBox1.Text + "','" + textBox6.Text + "','" +
textBox2.Text + "','" + textBox3.Text + "','" +textBox4.Text + "','" +
textBox5.Text + "')";
cmd.Connection=mycon;
mycon.Open();
cmd.ExecuteNonQuery();
mycon.Close();
}