Esempio n. 1
0
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                // Get the patient detail
                PatientModel patient = new PatientModel
                {
                    Identification = collection["Identification"],
                    FirstName      = collection["FirstName"],
                    LastName       = collection["LastName"],
                    Age            = Convert.ToInt16(collection["Age"]),
                    PhoneNumber    = collection["PhoneNumber"],
                    Email          = collection["Email"]
                };

                string msg = _patientManager.CreatePatient(patient);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }