Exemplo n.º 1
0
        public Products()
        {
            InitializeComponent();
            var db      = new newDigitalXDBEntities();
            int numlock = 1;

            if (numlock == 0)
            {
                dgdProducts.ItemsSource = (from productVariable in db.Products
                                           select new
                {
                    productVariable.ProductID,
                    productVariable.RetailerID,
                    productVariable.SubCategoryID,
                    productVariable.ProductName,
                    productVariable.ProductDescription,
                    productVariable.Price,
                    productVariable.UnitsInStock,
                    productVariable.IsDiscontinued
                }
                                           );
            }
            else
            {
                this.Visibility = Visibility.Visible;
            }
        }
Exemplo n.º 2
0
        public Customers()
        {
            InitializeComponent();
            var db = new newDigitalXDBEntities();

            dgdCustomer.ItemsSource = (from customerVariable in db.Customers
                                       select new
            {
                customerVariable.CustomerID,
                customerVariable.FirstName,
                customerVariable.LastName,
                customerVariable.UserName
            }
                                       );
        }
Exemplo n.º 3
0
        public Orders()
        {
            InitializeComponent();
            var db = new newDigitalXDBEntities();

            dgdOrders.ItemsSource = (from orderVariable in db.Orders
                                     select new
            {
                orderVariable.OrderID,
                orderVariable.CustomerID,
                orderVariable.AddressID,
                orderVariable.OrderDate,
                orderVariable.Complete
            }
                                     );
        }