示例#1
0
        public ActionResult PatientRegistration(Patient model)
        {
            if (_patientManager.Add(model))
            {
                ViewBag.message = "Patient Added Sucessfully";
            }

            return(View());
        }
 public IHttpActionResult Create([FromBody] Patient patient)
 {
     try
     {
         return(Content(HttpStatusCode.OK, _patientManager.Add(patient)));
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
示例#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();
     }
 }