Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void btn_Update_Click(object sender, EventArgs e)
- {
- try
- {
- System.Data.DataTable dt2;
- dt2 = ds.Tables["tblForce_N"];
- this.assetdg.BindingContext[dt2].EndCurrentEdit();
- this.da.Update(dt2);
- MessageBox.Show("Data Update successfull", "Update", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- catch (SqlException ex)
- {
- MessageBox.Show(ex + "Update not Successfull", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
- try
- {
- System.Data.DataTable dt2;
- dt2 = ds2.Tables["tblComp"];
- this.assetdg.BindingContext[dt2].EndCurrentEdit();
- this.da2.Update(dt2);
- MessageBox.Show("Data Update successfull", "Update", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- catch (SqlException ex)
- {
- MessageBox.Show(ex + "Update not Successfull", "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement