private void button1_Click(object sender, EventArgs e) { try { StudentLinqDataContext db = new StudentLinqDataContext(); Co fac = new Co(); fac.CourseAdded = comboBox1.Text; fac.StudentName = studentname; db.Cos.InsertOnSubmit(fac); db.SubmitChanges(); MessageBox.Show("Course Added"); } catch (Exception ex) { MessageBox.Show("Data Not Inserted"); } }
partial void DeleteCo(Co instance);
partial void UpdateCo(Co instance);
partial void InsertCo(Co instance);