private void UpdateOrdersDtg() { dtgOrders.Rows.Clear(); _items = _empService.GetAllOrders(); 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); } } }