示例#1
0
        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");
            }
        }
示例#2
0
 partial void Updatecust(cust instance);
示例#3
0
 partial void Deletecust(cust instance);
示例#4
0
 partial void Insertcust(cust instance);