コード例 #1
0
        private void UpdateOrdersDtg()
        {
            dtgOrders.Rows.Clear();
            _items = _empService.GetOrders(Settings.CurrentUser.ID);

            if (_items != null)
            {
                foreach (var order in _items)
                {
                    dtgOrders.Rows.Add(order.ID, order.EmployeeFullName, order.CustomerFullName,
                                       order.Items.Count, order.DateCreated, order.DateClosed, order.Items.Sum(x => x.Price).ToString("N2") + " р.",
                                       order.State == RecordState.Editing ? ORDER_EDITING : ORDER_CLOSED);
                }
            }
        }