Ejemplo n.º 1
0
        private void lviCustomer_SelectedIndexChanged(object sender, EventArgs e)
        {
            lviHistory.Items.Clear();
            string         searchString   = lviCustomer.SelectedItems[0].Text;
            SlotController slotController = new SlotController();
            List <Slot>    listSlot       = slotController.getBySearchString(searchString);
            ListViewItem   dummyItem      = new ListViewItem();

            foreach (Slot slot in listSlot)
            {
                dummyItem.Text = slot.Name;
                dummyItem.SubItems.Add(slot.Date);
                dummyItem.SubItems.Add(slot.Service);
                dummyItem.SubItems.Add(slot.Product);
                dummyItem.SubItems.Add(slot.Staff);
                dummyItem.SubItems.Add(slot.Note);
                lviHistory.Items.Add(dummyItem);
            }
        }