Exemplo n.º 1
0
        // GET: Book
        public ActionResult Index()
        {
            prt = new ClinicalELDAL.Repository.PatientRepository();
            List <ClinicalELDAL.EntityLayer.Appointment> apoints = prt.GetAppointments();

            return(View(apoints));
        }
Exemplo n.º 2
0
 public ActionResult Index2(ViewModels.BookViewModel apt)
 {
     ClinicalELDAL.EntityLayer.Appointment appointment = new ClinicalELDAL.EntityLayer.Appointment();
     prt = new ClinicalELDAL.Repository.PatientRepository();
     if (ModelState.IsValid)
     {
         appointment.PatientUserID = Convert.ToInt32(Session["UserID"]);
         appointment.DoctorUserID  = apt.DoctorUserID;
         appointment.Date          = apt.Date;
         appointment.Status        = "inactive";
         appointment.Time          = apt.Time;
         bool b = prt.AddApppointment(appointment);
         if (b == true)
         {
             return(RedirectToAction("Index"));
         }
         else
         {
             return(RedirectToAction("AddAppointment"));
         }
     }
     ViewModels.BookViewModel aptobj = new ViewModels.BookViewModel();
     return(View(aptobj));
 }
 public BookViewModel()
 {
     userRepository = new ClinicalELDAL.Repository.PatientRepository();
     users          = userRepository.GetDoctors();
 }