private void LoadGrid() { BookingResourceHandler h = new BookingResourceHandler(); IList l = h.GetAll(); gridControl1.DataSource = l; }
private void LoadResourcesCombo() { //preparo la combo delle zone chkResources.Properties.Items.Clear(); BookingResourceHandler h = new BookingResourceHandler(); //la riempio chkResources.Properties.Items.AddRange(h.GetAll()); //seleziono quella iniziale chkResources.SelectedIndex = 0; }
public BookingStatsControl(MainForm form) : base(form) { InitializeComponent(); comboBoxEdit1.EditValue = DateTime.Now.Year.ToString(); CustomGUI_SetCommandBarVisibility(false); BookingResourceHandler h = new BookingResourceHandler(); ressourceCount = h.GetAll().Count; if (ressourceCount == 0) { ressourceCount = 1; } SetDataPivotSource(); }
public BookingControl(MainForm form) : base(form) { try { DataAccessServices.Instance().PersistenceFacade.EmptyCacheAll(); _initializing = true; InitializeComponent(); schedulerStorage1.FetchAppointments += new FetchAppointmentsEventHandler(schedulerStorage1_FetchAppointments); CustomGUI_SetCommandBarVisibility(false); //non permetto nessuna operazione dalla toolbar base.m_ChangeStateEnabled = false; schedulerControl1.Start = DateTime.Now; schedulerControl1.ActiveViewType = SchedulerViewType.Timeline; BookingResourceHandler h = new BookingResourceHandler(); schedulerStorage1.Resources.DataSource = h.GetAll(); ////imposto il raggruppamento del calendario //if (Properties.Settings.Default.Main_CalendarGroupType == 0) //{ // schedulerControl1.GroupType = SchedulerGroupType.None; // comboBoxEdit1.SelectedIndex = 0; //} //else if (Properties.Settings.Default.Main_CalendarGroupType == 1) //{ // schedulerControl1.GroupType = SchedulerGroupType.Date; // comboBoxEdit1.SelectedIndex = 1; //} //else if (Properties.Settings.Default.Main_CalendarGroupType == 2) //{ schedulerControl1.GroupType = SchedulerGroupType.Resource; // comboBoxEdit1.SelectedIndex = 2; //} //else //{ // schedulerControl1.GroupType = SchedulerGroupType.None; // comboBoxEdit1.SelectedIndex = 0; //} if (Properties.Settings.Default.Main_ZoomTemporale != 0) { schedulerControl1.TimelineView.GetBaseTimeScale().Width = Properties.Settings.Default.Main_ZoomTemporale; trackBarControl1.Value = Properties.Settings.Default.Main_ZoomTemporale; } if (Properties.Settings.Default.Main_ZoomSpaziale != 0) { schedulerControl1.TimelineView.AppointmentDisplayOptions.AppointmentHeight = Properties.Settings.Default.Main_ZoomSpaziale; trackBarControl2.Value = Properties.Settings.Default.Main_ZoomSpaziale; } } finally { _initializing = false; } }