public ActionResult Details() { var sched = new DHXScheduler(this); sched.XY.scroll_width = 0; sched.Config.first_hour = 8; sched.Config.last_hour = 19; sched.Config.time_step = 30; sched.Config.limit_time_select = true; var text = new LightboxText("text", "Description"); text.Height = 50; sched.Lightbox.Add(text); var select = new LightboxSelect("textColor", "Priority"); var items = new List<object>(); items.Add(new { key = "gray", label = "Low" }); items.Add(new { key = "blue", label = "Medium" }); items.Add(new { key = "red", label = "Hight" }); select.AddOptions(items); var check = new LightboxRadio("category", "Category"); check.AddOption(new LightboxSelectOption("job", "Job")); check.AddOption(new LightboxSelectOption("family", "Family")); check.AddOption(new LightboxSelectOption("other", "Other")); sched.Lightbox.Add(check); sched.Lightbox.Add(select); sched.Lightbox.Add(new LightboxMiniCalendar("time", "Time:")); sched.Lightbox.Add(new LightboxCheckbox("remind", "Remind")); sched.LoadData = true; sched.EnableDataprocessor = true; sched.InitialDate = new DateTime(2011, 9, 11); return View(sched); }
public ActionResult Details() { var sched = new DHXScheduler(this) { XY = { scroll_width = 0 }, Config = { first_hour = 7, last_hour = 20, time_step = 30, limit_time_select = true } }; var text = new LightboxText("text", "Description") { Height = 50 }; sched.Lightbox.Add(text); var select = new LightboxSelect("color", "Priority"); select.AddOptions(new List<object>{ new { key = "#ccc", label = "Low" }, new { key = "#76B007", label = "Medium" }, new { key = "#FE7510", label = "Hight" } }); sched.Lightbox.Add(select); var check = new LightboxRadio("category", "Category"); check.AddOption(new LightboxSelectOption("job", "Job")); check.AddOption(new LightboxSelectOption("family", "Family")); check.AddOption(new LightboxSelectOption("other", "Other")); sched.Lightbox.Add(check); var check2 = new LightboxRadio("category2", "Category2"); check2.AddOption(new LightboxSelectOption("test1", "test1")); check2.AddOption(new LightboxSelectOption("test2", "test2")); check2.AddOption(new LightboxSelectOption("test3", "test3")); sched.Lightbox.Add(check2); sched.Lightbox.Add(new LightboxMiniCalendar("time", "Time:")); sched.Lightbox.Add(new LightboxCheckbox("remind", "Remind")); sched.LoadData = true; sched.EnableDataprocessor = true; sched.InitialDate = new DateTime(2011, 9, 11); // ADD YEAR VIEW var year = new YearView(); sched.Views.Add(year); sched.LoadData = true; sched.EnableDataprocessor = true; // SET LOCALE var locale = SchedulerLocalization.Localizations.English; sched.Localization.Set(locale); return View(sched); }
public ActionResult Wide() { var sched = new DHXScheduler(this); sched.Config.wide_form = true; sched.XY.scroll_width = 0; sched.Config.first_hour = 8; sched.Config.last_hour = 19; sched.Config.time_step = 30; sched.Config.limit_time_select = true; var text = new LightboxText("text", "Description"); text.Height = 50; sched.Lightbox.Add(text); var select = new LightboxSelect("color", "Priority"); select.AddOptions(new List <object> { new { key = "#ccc", label = "Low" }, new { key = "#76B007", label = "Medium" }, new { key = "#FE7510", label = "Hight" } }); sched.Lightbox.Add(select); var check = new LightboxRadio("category", "Category"); check.AddOption(new LightboxSelectOption("job", "Job")); check.AddOption(new LightboxSelectOption("family", "Family")); check.AddOption(new LightboxSelectOption("other", "Other")); sched.Lightbox.Add(check); sched.Lightbox.Add(new LightboxMiniCalendar("time", "Time:")); sched.Lightbox.Add(new LightboxCheckbox("remind", "Remind")); sched.LoadData = true; sched.EnableDataprocessor = true; sched.InitialDate = new DateTime(2011, 9, 11); return(View(sched)); }
public ActionResult Details() { var sched = new DHXScheduler(this) { XY = { scroll_width = 0 }, Config = { first_hour = 7, last_hour = 20, time_step = 30, limit_time_select = true } }; var text = new LightboxText("text", "Description") { Height = 50 }; sched.Lightbox.Add(text); var select = new LightboxSelect("color", "Priority"); select.AddOptions(new List<object>{ new { key = "#ccc", label = "Low" }, new { key = "#76B007", label = "Medium" }, new { key = "#FE7510", label = "Hight" } }); sched.Lightbox.Add(select); // ------------------------- COMBOBOX ------------------------------ var select2 = new LightboxSelect("Test", "Test"); DataTable subjects = new DataTable(); List<Cust> columnCust = new List<Cust>(); using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString)) { string query = "SELECT * FROM SchedulerContext.dbo.ColoredEvents"; using (SqlCommand command = new SqlCommand(query, connection)) { connection.Open(); using (SqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { columnCust.Add(new Cust { key = reader.GetInt32(0), label = reader.GetString(1) }); } } connection.Close(); } } select2.AddOptions(columnCust); sched.Lightbox.Add(select2); // ------------------------- /COMBOBOX ----------------------------- var check = new LightboxRadio("category", "Category"); check.AddOption(new LightboxSelectOption("job", "Job")); check.AddOption(new LightboxSelectOption("family", "Family")); check.AddOption(new LightboxSelectOption("other", "Other")); sched.Lightbox.Add(check); var check2 = new LightboxRadio("category2", "Category2"); check2.AddOption(new LightboxSelectOption("test1", "test1")); check2.AddOption(new LightboxSelectOption("test2", "test2")); check2.AddOption(new LightboxSelectOption("test3", "test3")); sched.Lightbox.Add(check2); sched.Lightbox.Add(new LightboxMiniCalendar("time", "Time:")); sched.Lightbox.Add(new LightboxCheckbox("remind", "Remind")); sched.LoadData = true; sched.EnableDataprocessor = true; sched.InitialDate = new DateTime(2011, 9, 11); // ADD YEAR VIEW var year = new YearView(); sched.Views.Add(year); sched.LoadData = true; sched.EnableDataprocessor = true; // SET LOCALE var locale = SchedulerLocalization.Localizations.English; sched.Localization.Set(locale); // block each sunday sched.TimeSpans.Add(new DHXBlockTime() { Day = DayOfWeek.Sunday }); return View(sched); }