public void DeletePatient()
        {
            Patient patient = new Patient()
            {
                ContactNo = "0770810866"
            };

            PatientManager PatientManager = new PatientManager();
            var            DeletePatient  = PatientManager.DeletePatient(patient);
        }
Esempio n. 2
0
        protected void patientGridView_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string contactNo = null;

            if (e.CommandName == "DeleteRow")
            {
                contactNo = e.CommandArgument.ToString();
            }
            aPatientManager.DeletePatient(contactNo);
            PopulateGridView();
        }
Esempio n. 3
0
        public JsonResult Delete(PatientViewModel model)
        {
            int deleteIndex = 0;

            try
            {
                deleteIndex = PatientManager.DeletePatient(model.PatientId);
            }
            catch (Exception exception)
            {
                throw new Exception(exception.Message);
            }
            return(deleteIndex > 0 ? Reload() : ErroResult("Failed To Delete"));
        }
Esempio n. 4
0
        public ActionResult DeletePatient(Patient delPatient)
        {
            if (delPatient.PatientID == null || delPatient.PatientID.Length == 0)
            {
                ViewBag.message = "Error: An ID is required";
                return(View(delPatient));
            }
            bool result = PatientManager.DeletePatient(delPatient);

            if (result == false)
            {
                ViewBag.message = "Error: ID is wrong";
                return(View(delPatient));
            }
            ViewBag.message = "Patient deleted";
            Patient[] patients = PatientManager.GetAllPatients();
            return(View("List", patients));
        }
 private void btn_Delete(object sender, EventArgs e)
 {
     if (this.delete_Name.Text != null)
     {
         string  d_name = delete_Name.Text.ToString();
         Patient p      = new Patient();
         p.PatientName = d_name;
         if (PatientManager.DeletePatient(p))
         {
             MessageBox.Show("患者  " + d_name + "已删除");
         }
         else
         {
             MessageBox.Show("操作失败");
         }
     }
     else
     {
         MessageBox.Show("删除姓名为空!");
     }
 }
Esempio n. 6
0
 public void Delete()
 {
     patientManager.DeletePatient();
     GameManager.ActivePatient = null;
     sceneManager.LoadPatientSlectionMenu();
 }