示例#1
0
        private void Ord_click(object sender, RoutedEventArgs e)
        {
            var cds = new OrdersWindow(_connectionSettings, true);

            cds.Owner = this;
            cds.ShowDialog();
            if (TemporaryStorage.Holder.TryGetValue("ID", out string ID))
            {
                tempOrdID    = Convert.ToInt32(ID);
                OrderID.Text = tempOrdID.ToString();
            }
            TemporaryStorage.Holder.Remove("ID");
            var temp = new Data.Order(_connectionSettings, tempOrdID);

            OrderInfo.Text = "Осталось выплатить: " + (temp.Summ - temp.SummPayed);
            temp           = null;
        }
示例#2
0
        private void Ord_click(object sender, RoutedEventArgs e)
        {
            var cds = new OrdersWindow(_connectionSettings, true);

            cds.Owner = this;
            cds.ShowDialog();
            if (TemporaryStorage.Holder.TryGetValue("ID", out string ID))
            {
                SetFiltersToNull();
                Filter.OrderNumFilterText = ID;
                CountPages();
                var _connection = new SqlConnection(_connectionSettings.ConnectionString);
                listSortDirection          = Order.SelectedIndex == 0 ? ListSortDirection.Ascending : ListSortDirection.Descending;
                _BufCommand                = new SqlCommand(DBHelper.FormSqlGrid(displayIndex, listSortDirection, Filter._filters, Filter.TableSourceForSort, SqlCommands.GridPart1, SqlCommands.GridByPagePart2), _connection);
                _BufCommand.CommandTimeout = 30;
                UpdateGrid();
            }
            TemporaryStorage.Holder.Remove("ID");
        }
 public void GetOrders()
 {
     Orders = DataAccess.GetOrders(Customer);
     OrdersWindow orderWindow = new OrdersWindow(Orders);
     orderWindow.ShowDialog();
 }