this is my code in form1:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;
namespace FirstSmartDeviceProject
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
/* Reset Button Code */
private void btnreset_Click(object sender, EventArgs e)
{
txtuname.Text = "";
txtpassword.Text = "";
}
private void btnlogin_Click(object sender, EventArgs e)
{
AppDatabase1DataSet ds = new AppDatabase1DataSet();
AppDatabase1DataSet.userDataTable dt = new AppDatabase1DataSet.userDataTable();
this.userTableAdapter1.Fill(dt);
foreach (DataRow dr in dt.Rows)
{
if (dr[1].ToString() == txtuname.Text && dr[2].ToString() == txtpassword.Text)
{
txtpassword.Text = "";
txtpassword.Text = dr[0].ToString();
MessageBox.Show("Login Valid!");
}
}
}
private void nextbtn_Click(object sender, EventArgs e)
{
Form Name = new Form2(); Name.Show();
}
}
}
and this is my code in form2:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace FirstSmartDeviceProject
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
if (AppDatabase1DataSet2Util.DesignerUtil.IsRunTime())
{
this.userTableAdapter.Fill(this.appDatabase1DataSet2.user);
}
}
private void backbtn_Click(object sender, EventArgs e)
{
Form Name = new Form1(); Name.Show();
}
}
}
i want to insert data textboxt in form1 to datagridview in form2, and save it. but if i deploy that code, textbox in form1 cannot insert in datagridview form2
....can any body help me....i am a beginner to development smartdevice