Esempio n. 1
0
        // GET: Doctor/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DoctorViewModel doctorViewModel = doctorModel.GetDoctor((int)id);

            if (doctorViewModel == null)
            {
                return(HttpNotFound());
            }
            return(View(doctorViewModel));
        }
Esempio n. 2
0
        // GET: DoctorsList/Edit/5
        public ActionResult Edit(int id)
        {
            DoctorModel     Model     = new DoctorModel();
            Doctor          doctor    = new Doctor(Model.GetDoctor(id));
            DoctorViewModel viewModel = new DoctorViewModel(doctor);

            return(View(viewModel));
        }
Esempio n. 3
0
        //[HttpGet]
        public ActionResult Delete(Doctor d)
        {
            //var doctor = (Doctor)TempData["doctor"];
            DoctorModel Model  = new DoctorModel();
            Doctor      doctor = new Doctor(Model.GetDoctor(d.ID));

            Model.Delete(doctor);
            return(RedirectToAction("Index"));
        }
Esempio n. 4
0
        // GET: DoctorsList/Delete/5
        public ActionResult Delete(int id)
        {
            DoctorModel     Model     = new DoctorModel();
            Doctor          doctor    = new Doctor(Model.GetDoctor(id));
            DoctorViewModel viewModel = new DoctorViewModel(doctor);

            //TempData["doctor"] = doctor;
            return(View(viewModel));
        }