private void button1_Click(object sender, EventArgs e) ///CONFIRM { cust newCust = new cust(); newCust.FULL_NAME = textBox1.Text; newCust.ADDRESS = textBox2.Text; newCust.PHONE_NO = textBox3.Text; newCust.MAIL = textBox4.Text; newCust.BLOOD_GROUP = textBox5.Text; DataClasses1DataContext custdb = new DataClasses1DataContext(); custdb.custs.InsertOnSubmit(newCust); try { custdb.SubmitChanges(); MessageBox.Show("ok"); this.Hide(); Form1 fr = new Form1(); fr.ShowDialog(); // Loaddata(); } catch { MessageBox.Show("inception"); } }
partial void Updatecust(cust instance);
partial void Deletecust(cust instance);
partial void Insertcust(cust instance);