Exemplo n.º 1
0
        private void btn_byItem_Click(object sender, RoutedEventArgs e)
        {
            dataGrid.Items.Refresh();
            var list = _orderManager.FindOrdersByItem(_orderManager.GetItemIdByIdTitle(txtB_byItem.Text));

            dataGrid.ItemsSource = _orderListView.ToMyOrderList(list);
        }
Exemplo n.º 2
0
        private void FindOrdersByItem_Click(object sender, EventArgs e)
        {
            FindOrdersView.Items.Clear();
            var list = _ordersManager.FindOrdersByItem(_ordersManager.GetItemIdByIdTitle(textBox_byItem.Text));

            foreach (var i in list)
            {
                string[] row = { i.MainOrderID.ToString(),
                                 _ordersManager.GetUsersFullNameById(i.CustomerID),
                                 i.Date.ToString(),
                                 _ordersManager.GetStatusName(i.StatusID),
                                 i.LastUpdate.ToString(),
                                 _ordersManager.GetUsersFullNameById(i.LastStaffUpdated != null ? i.LastStaffUpdated.Value : 0),
                                 i.Comments };
                var      listViewItem = new ListViewItem(row);
                FindOrdersView.Items.Add(listViewItem);
            }
        }