private void ultraBtnPDelete_Click(object sender, EventArgs e) { objHospitalDB = new HospitalDB(); Patient objPatient = new Patient(objHospitalDB); PatientRow objPatientRow = new PatientRow(); objPatientRow.Patient_ID = Convert.ToInt32(this.Pat_id); objPatient.Delete(objPatientRow); ultraGridPatient.DataSource = objPatient.GetAll(); /* ultraGridPatient.Rows[this.ultraGridPatient.ActiveRow.Index].Delete(true); * SqlCommand query = objHospitalDB.CreateCommand("delete from Patient where Patient_ID='" + this.Pat_id + "';", false); * int p = query.ExecuteNonQuery(); * MessageBox.Show(p + "Deleted");*/ }