Пример #1
0
        public void SaveOrders()
        {
            Order order = new Order();

            order.IdCustomer = Convert.ToInt32(cmbOrderCust.SelectedValue);
            order.IdProduct  = Convert.ToInt32(cmbProName.SelectedValue);
            order.Quantity   = Convert.ToInt32(txtQty.Text);
            order.OrderDate  = DateTime.Now;

            {
                Customer customer = new Customer();
                customer.Name = cmbOrderCust.Text;

                Product product = new Product();
                product.Name = cmbProName.Text;

                order.customer = customer;

                order.product = product;
            }

            logic.SaveOrder(order);
        }
Пример #2
0
        public void InsertOrder(Order order)
        {
            GetDataLogic logic = new GetDataLogic();

            logic.SaveOrder(order);
        }