Exemplo n.º 1
0
        public ActionResult Edit(patientsModel patient)
        {
            if (pcrud.update(patient))
            {
                return(RedirectToAction("Index"));
            }

            return(View());
        }
Exemplo n.º 2
0
        public ActionResult Delete(patientsModel patient)
        {
            // TODO: Add delete logic here
            if (pcrud.delete(patient.ID))
            {
                return(RedirectToAction("Index"));
            }

            return(View());
        }
Exemplo n.º 3
0
        public ActionResult Create(patientsModel patient)
        {
            if (ModelState.IsValid)
            {
                // TODO: Add insert logic here
                if (pcrud.Add(patient))
                {
                    return(RedirectToAction("Index"));
                }
            }

            return(View());
        }
Exemplo n.º 4
0
        // GET: patients/Edit/5
        public ActionResult Edit(int id)
        {
            patientsModel patient = pcrud.getById(id);

            return(View(patient));
        }