protected void GvPatients_RowDeleting(object sender, GridViewDeleteEventArgs e) { var id = gvPatients.DataKeys[e.RowIndex].Value.ToString(); var fileAddress = Server.MapPath("Patient.xml"); PatientManager.Delete(id, fileAddress); ShowList(); }
protected void GvPatients_RowUpdating(object sender, GridViewUpdateEventArgs e) { var fileAddress = Server.MapPath("Patient.xml"); var myNewValues = e.NewValues; var id = gvPatients.DataKeys[e.RowIndex].Value.ToString(); PatientManager.Update(myNewValues, fileAddress, id); gvPatients.EditIndex = -1; ShowList(); }