private void ConfigureLightBox(DHXScheduler scheduler, List <ResourceViewModel> rooms) { var name = new LightboxText("text", "Name"); name.Height = 24; scheduler.Lightbox.Add(name); var roomsSelect = new LightboxSelect("room_number", "Room"); roomsSelect.AddOptions(rooms.ToList()); scheduler.Lightbox.Add(roomsSelect); //var status = new LightboxRadio("status", "Status"); //var statuses = new List<object>(); // new Repository<BookingStatus>().ReadAll().Select(s => new { key = s.Id, label = s.Title }); //status.AddOptions(statuses); //scheduler.Lightbox.Add(status); //scheduler.InitialValues.Add("status", statuses.First().key); var isPaid = new LightboxCheckbox("is_paid", "Paid"); scheduler.Lightbox.Add(isPaid); scheduler.InitialValues.Add("is_paid", false); var date = new LightboxMiniCalendar("time", "Time"); scheduler.Lightbox.Add(date); scheduler.InitialValues.Add("text", String.Empty); }
public ActionResult Index() { var scheduler = new DHXScheduler(); scheduler.DataAction = Url.Action("Data"); scheduler.SaveAction = Url.Action("Save"); var selectDoctor = new LightboxSelect("DoctorID", "Doctor"); var items = new List <object>(); IEnumerable <DoctorMiniInfoViewModel> doctorList = doctorRepository.getDoctorMiniInfoList(); foreach (DoctorMiniInfoViewModel item in doctorList) { items.Add(new { key = item.DoctorID, label = item.DoctorName }); } selectDoctor.AddOptions(items); var selectPatientStatus = new LightboxSelect("Status", "Status"); var Statusitems = new List <object>(); //Statusitems.Add(new { key = PatientSchduelStatus.canceled, label = PatientSchduelStatus.canceled }); Statusitems.Add(new { key = PatientSchduelStatus.Finished, label = PatientSchduelStatus.Finished }); Statusitems.Add(new { key = PatientSchduelStatus.Postponed, label = PatientSchduelStatus.Postponed }); Statusitems.Add(new { key = PatientSchduelStatus.InProgress, label = PatientSchduelStatus.InProgress }); Statusitems.Add(new { key = PatientSchduelStatus.waiting, label = PatientSchduelStatus.waiting }); selectPatientStatus.AddOptions(Statusitems); var Reason = new LightboxText("reason", "Reason"); var Define = new LightboxText("text", "Define"); var date = new LightboxMiniCalendar("Date"); scheduler.Lightbox.Add(Define); scheduler.Lightbox.Add(Reason); scheduler.Lightbox.Add(selectDoctor); scheduler.Lightbox.Add(selectPatientStatus); scheduler.Lightbox.Add(date); scheduler.Config.hour_size_px = 100; scheduler.LoadData = true; scheduler.EnableDataprocessor = true; return(View(scheduler)); }