Example #1
0
        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();
        }
Example #2
0
        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();
        }