>private void btnSave_Click(object sender, EventArgs e) > { > DataRow row = this.dsPolicyNotes.Tables[0].NewRow(); > row["PolID"] = this.PolID; > row["Note"] = this.rtbNotes.Text; > row["edate"] = DateTime.Now; > this.dsPolicyNotes.Tables[0].Rows.Add(row); > > // Now proceed to call the update method in the biz object > this.oPolicyNotesBiz.UpdateDataSet(dsPolicyNotes); > > } > >>
> public void UpdateDataSet(DataSet ds) > { > // Here maybe I can put someloig > this.oDA.UpdateDataSet(ds); > > } > >>
>public void UpdateDataSet(DataSet ds) > { > DataSet dirtyDS = ds.GetChanges(); > //Take action. > ds.AcceptChanges(); > > SqlConnection con1 = new SqlConnection(this.connectionstring); > con1.Open(); > SqlDataAdapter sqlAdapter1 = new SqlDataAdapter(); > sqlAdapter1.Update(ds,"PolicyNotes"); > con1.Close(); > > } > >>