Ejemplo n.º 1
0
        public ActionResult PatientRegistration(Patient model)
        {
            if (_patientManager.Add(model))
            {
                ViewBag.message = "Patient Added Sucessfully";
            }

            return(View());
        }
Ejemplo n.º 2
0
 public IHttpActionResult Create([FromBody] Patient patient)
 {
     try
     {
         return(Content(HttpStatusCode.OK, _patientManager.Add(patient)));
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
Ejemplo n.º 3
0
 private void Save(object sender, EventArgs e)
 {
     if (areTextBoxesFilled())
     {
         var patientId = patientManager.Add(CreatePatient());
         addressManager.Add(CreateAddress(patientId));
         emergencyContactManager.Add(CreateEmergencyContact(patientId));
         consultationManager.Add(CreateConsultation(patientId));
         MessageBox.Show("Patient data saved successfully");
         this.Close();
     }
 }