示例#1
0
 public IActionResult AddDiagnos(AppliedDiagnos appliedDiagnos)
 {
     if (ModelState.IsValid)
     {
         _db.Create(appliedDiagnos);
         _db.Save();
         return(RedirectToAction(nameof(Index)));
     }
     ViewData["AppointmentId"] = new SelectList(_context.Appointments, "Id", "Id", appliedDiagnos.AppointmentId);
     ViewData["DiagnosId"]     = _context.AppliedDiagnoses.Include(p => p.Diagnos).ToList();
     return(View(appliedDiagnos));
 }
示例#2
0
 public IActionResult Create(Diagnos diagnos)
 {
     if (ModelState.IsValid)
     {
         _db.Create(diagnos);
         _db.Save();
         return(RedirectToAction(nameof(Index)));
     }
     return(View(diagnos));
 }
示例#3
0
 public IActionResult Create(Appointment appointment)
 {
     if (ModelState.IsValid)
     {
         _db.Create(appointment);
         _db.Save();
         return(RedirectToAction(nameof(Index)));
     }
     return(View(appointment));
 }
示例#4
0
        public IActionResult Create(Patient p)
        {
            if (ModelState.IsValid)
            {
                _db.Create(p);
                _db.Save();
                return(RedirectToAction(nameof(Index)));
            }

            return(View(p));
        }
示例#5
0
 /// <summary>
 /// Creates a new clinic
 /// </summary>
 /// <param name="clinic">The clinic that is being created</param>
 // POST: api/clinic
 public void Post([FromBody] API.DAL.Models.Clinic clinic)
 {
     _clinicRepository.Create(clinic);
 }
示例#6
0
        /// <summary>
        /// Create
        /// </summary>
        /// <param name="data">The record passed in.</param>
        /// <returns>The record created for the result.</returns>
        public ClinicModel Create(ClinicModel data)
        {
            var myData = repository.Create(data);

            return(myData);
        }