// // GET: /Default/Details/5 public ActionResult AllAppointee() { AppointeeViewModel apvm = new AppointeeViewModel(); apvm.lstAppointee = _AppointmentService.GetAllAppointee(); return(View("../Appointments/Appointee", apvm)); }
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")); }
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)); }
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")); }