private void pay_Click(object sender, EventArgs e) { DataClasses1DataContext pd = new DataClasses1DataContext(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\ANIK\Documents\incometax.mdf;Integrated Security=True;Connect Timeout=30"); payment th = new payment { nid = textBox1.Text, receipt_number = textBox2.Text, account_number = textBox3.Text, amount = Convert.ToDouble(textBox5.Text) }; pd.payments.InsertOnSubmit(th); pd.SubmitChanges(); MessageBox.Show("Payment done successfully"); }
partial void Deletepayment(payment instance);
partial void Updatepayment(payment instance);
partial void Insertpayment(payment instance);