Esempio n. 1
0
        //
        // GET: /Default/Details/5

        public ActionResult AllAppointee()
        {
            AppointeeViewModel apvm = new AppointeeViewModel();

            apvm.lstAppointee = _AppointmentService.GetAllAppointee();
            return(View("../Appointments/Appointee", apvm));
        }
Esempio n. 2
0
        public ActionResult AllAppointee(AppointeeViewModel apvm)
        {
            Appointee aptee = new Appointee();

            aptee.FirstName  = apvm.FirstName;
            aptee.LastName   = apvm.LastName;
            aptee.CreatedOn  = DateTime.Now;
            aptee.ModifiedOn = DateTime.Now;
            _AppointmentService.AddAppointee(aptee);

            return(RedirectToAction("AllAppointee"));
        }
Esempio n. 3
0
        public ActionResult DelAppointee(int ID)
        {
            Appointee aptee = new Appointee();

            aptee.ApteeID = ID;
            _AppointmentService.DelAppointee(aptee);


            AppointeeViewModel apvm = new AppointeeViewModel();

            apvm.lstAppointee = _AppointmentService.GetAllAppointee();
            return(View("../Appointments/Appointee", apvm));
        }
Esempio n. 4
0
        public ActionResult AllAppointee(AppointeeViewModel apvm)
        {
            Appointee aptee = new Appointee();

            aptee.FirstName  = apvm.FirstName;
            aptee.LastName   = apvm.LastName;
            aptee.CreatedOn  = DateTime.Now;
            aptee.ModifiedOn = DateTime.Now;
            _AppointmentService.AddAppointee(aptee);

            //non common method (use dapper directly rahter than dapperextension)
            //_AppointmentService.AddDirect(aptee);

            return(RedirectToAction("AllAppointee"));
        }