private void CustomerSelectedHandler(Object sender, EventArgs e) { IEnumerable <IPrenotation> prenotations = new IPrenotation[0]; if (_customersBox.SelectedIndex >= 0) { prenotations = _prenotationRetriever((_customersBox.Items[_customersBox.SelectedIndex] as ICustomer).FiscalCode); } _prenotationControl.Populate(prenotations); }
/// <summary> /// Visita ad un nodo di tipo IPrenotation /// </summary> /// <param name="prenotation"></param> public void Visit(IPrenotation prenotation) { _prenotationNode.Text = "Prenotazione dal " + prenotation.PrenotationDate.StartDate.ToShortDateString() + " al " + prenotation.PrenotationDate.EndDate.ToShortDateString() + ", prezzo corrente : " + prenotation.Price; }
public PrenotationEventArgs(IPrenotation prenotation) { _prenotation = prenotation; }