private void LoadGrid() { ResourceHandler h = new ResourceHandler(); IList l = h.GetAll(); gridControl1.DataSource = l; }
private void LoadListaRisorse() { lstRes.Items.Clear(); ResourceHandler h = new ResourceHandler(); foreach (Resource item in h.GetAll()) { lstRes.Items.Add(item); } }
private void LoadComboZone() { //preparo la combo delle zone cboZon.Properties.Items.Clear(); ResourceHandler h = new ResourceHandler(); //la riempio cboZon.Properties.Items.AddRange(h.GetAll()); //seleziono quella iniziale cboZon.SelectedIndex = 0; }
public CalendarioControl(MainForm form) : base(form) { try { _initializing = true; InitializeComponent(); if (Properties.Settings.Default.Main_ActivateTaskPanelOnCalendar) { splitContainerControl2.Collapsed = false; } else { splitContainerControl2.Collapsed = true; } 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 = CalendarProperties.GetViewType(Properties.Settings.Default.Main_Calendar_ViewType); schedulerControl1.DayView.TopRowTime = new TimeSpan(8, 0, 0); schedulerControl1.WorkWeekView.TopRowTime = new TimeSpan(8, 0, 0); ResourceHandler h = new ResourceHandler(); schedulerStorage1.Resources.DataSource = h.GetAll(); //AppointmentHandler h1 = new AppointmentHandler(); //h1.ExecuteQuery(new List<IsearchDTO>(), -1, Properties.Settings.Default.Main_DeadlineDaysBefore); //schedulerStorage1.Appointments.DataSource = h1.BindableResults; //schedulerStorage1.RefreshData(); //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; } } finally { _initializing = false; } PopulateGrid(); }