예제 #1
0
        public ActionResult Index()
        {
            var scheduler = new DHXScheduler(this);
            var sched     = new DHXBlockTime();

            scheduler.LoadData = true;
            scheduler.InitialValues.Add("text", "Amisi");
            scheduler.EnableDataprocessor        = true;
            scheduler.Config.click_form_details  = false;
            scheduler.Config.drag_create         = false;
            scheduler.Config.drag_resize         = false;
            scheduler.Config.drag_move           = true;
            scheduler.Config.details_on_dblclick = false;
            scheduler.Config.details_on_create   = false;
            scheduler.Config.event_duration      = 20;
            scheduler.Config.collision_limit     = 1;
            scheduler.Config.check_limits        = true;
            scheduler.Config.limit_time_select   = true;
            scheduler.Config.select                = false;
            scheduler.Config.edit_on_create        = false;
            scheduler.Config.first_hour            = 7;
            scheduler.Config.last_hour             = 19;
            scheduler.Config.show_quick_info       = true;
            scheduler.Config.separate_short_events = true;
            scheduler.Config.readonly_form         = true;
            scheduler.Config.click_form_details    = false;
            scheduler.Config.drag_move             = false;
            scheduler.Config.isReadonly            = true;
            var t = b.TimeAvalOfDoc();

            scheduler.TimeSpans.Add(new DHXBlockTime()
            {
                StartDate = Convert.ToDateTime(t.from),
                EndDate   = Convert.ToDateTime(t.to)
            });
            scheduler.TimeSpans.Add(new DHXBlockTime()
            {
                StartDate = new DateTime(2000, 8, 13),
                EndDate   = DateTime.Now
            });
            scheduler.TimeSpans.Add(new DHXBlockTime()
            {
                Day = DayOfWeek.Sunday,
            });

            return(View(scheduler));
        }