Esempio n. 1
0
        public ActionResult AppointmentQueue()
        {
            Web.ViewModel.AppointmentSheetViewModel avm = new ViewModel.AppointmentSheetViewModel();

            var results = _service.GetAllAppointments();

            avm.appts = results;
            var username = HttpContext.User.Identity.Name;

            var user = _UserRepository.GetUserByUsername(username);

            avm.user = user;
            return(View(avm));
        }
Esempio n. 2
0
        //You should never enter this.   For development purposes only
        public ActionResult AppointmentSheet(int LeadId)
        {
            Web.ViewModel.AppointmentSheetViewModel asvm = new ViewModel.AppointmentSheetViewModel();
            //This following lines are for testing purposes and need to be deleted
            string   today    = DateTime.Now.ToShortTimeString();
            DateTime tempDate = Convert.ToDateTime(today);

            asvm.appointmentSheet = new AppointmentSheet()
            {
                DayOfAppointment = new DateTime(2011, 11, 09),
                //AppointmentDateFrom = new DateTime(2011, 10, 10),
                AppointmentDateTo = new DateTime(2011, 11, 10),
                LastUpdated       = tempDate
            };
            return(View(asvm));
        }
Esempio n. 3
0
        public ActionResult CreateAppointment(int LeadId)
        {
            Web.ViewModel.AppointmentSheetViewModel singleAppointment = new ViewModel.AppointmentSheetViewModel();
            var saUsersResult = _UserRepository.GetAllUsersByRole(3);
            //To get the user who calls this appointment
            var username = HttpContext.User.Identity.Name;

            singleAppointment.user             = _UserRepository.GetUserByUsername(username);
            singleAppointment.appointmentSheet = new AppointmentSheet()
            {
                ParentLeadId = LeadId
            };
            singleAppointment.SAUsersDropdown = saUsersResult.Select(row => new SelectListItem()
            {
                Text  = row.LastName,
                Value = row.UserId.ToString()
            });


            return(View(singleAppointment));
        }
 public void SaveAppointmentSheet(ViewModel.AppointmentSheetViewModel asvm)
 {
     _AppointmentSheetRepository.SaveAppointmentSheet(asvm.appointmentSheet);
 }