示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBox2.Text != "" && textBox3.Text != "")
                {
                    db = new linqDataContext();
                    lib pinfo = new lib();

                    pinfo.theme = textBox2.Text;
                    pinfo.url   = textBox3.Text;

                    db.lib.InsertOnSubmit(pinfo);
                    db.SubmitChanges();

                    Select();
                }
                else
                {
                    MessageBox.Show("Заповніть всі дані");
                }
            }
            catch
            {
            }
        }
 partial void Deletelib(lib instance);
 partial void Updatelib(lib instance);
 partial void Insertlib(lib instance);