Coding of Database
Coding of Database
Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'yASSERDatabase1DataSet.student' table. You can move, or remove it, as needed. this.studentTableAdapter.Fill(this.yASSERDatabase1DataSet.student); //this.studentTableAdapter1.Fill(this.dataSet1.Tables,33); this.studentTableAdapter1.Fill(this.dataSet1.student, 22); textBox2.Text = ""; } private void button1_Click(object sender, EventArgs e) { this.studentBindingSource.MoveNext(); } private void button2_Click(object sender, EventArgs e) { this.studentBindingSource.MovePrevious(); } private void button3_Click(object sender, EventArgs e) { string x = textBox1.Text; //int p = Convert.ToInt32(x) ; if (x == "") { textBox1.Text = ("Please Enter some Value"); return; } this.studentTableAdapter1.Fill(this.dataSet1.student,Int32.Parse( textBox1.Text) ); } private void button4_Click(object sender, EventArgs e) { this.studentBindingSource.MoveLast(); this.studentBindingSource.AddNew(); }
private void button5_Click(object sender, EventArgs e) { //this.studentBindingSource.Add(Int32.Parse(textBox2.Text)); //this.dataSet1.AcceptChanges(); //this.studentBindingSource.EndEdit(); dataGridView1.Update(); dataGridView1.RefreshEdit(); dataGridView1.EndEdit(); } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { } } }