Beispiel #1
0
        private void AddProductButton_Click(object sender, EventArgs e)
        {
            AddProducts AddProducts = new AddProducts(this);

            AddProducts.AddNewProduct += AddProducts_AddNewProduct;
            AddProducts.Show();
        }
        private void go_add(object sender, RoutedEventArgs e)
        {
            AddProducts add = new AddProducts();

            this.Close();
            add.Show();
        }
Beispiel #3
0
 private void MainGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (_currentTable.Equals(db.Orders.GetType()))
     {
         if (e.ColumnIndex == 1)
         {
             AddMenuPoint VeiwMenuPointForm = new AddMenuPoint(
                 db.Menu.Find
                     (MainGrid.CurrentCell.Value)
                 , this, true);
             VeiwMenuPointForm.Show();
         }
         if (e.ColumnIndex == 2)
         {
             AddChef VeiwChefForm = new AddChef(
                 db.Chefs.Find
                     (MainGrid.CurrentCell.Value)
                 , true);
             VeiwChefForm.Show();
         }
     }
     if (_currentTable.Equals(db.Menu.GetType()))
     {
         if (e.ColumnIndex == 2)
         {
             int          no = (int)MainGrid.CurrentCell.Value;
             AddReception VeiwReceptionForm = new AddReception(
                 db.Receptions.Where
                     (recept => recept.No == no).ToList()
                 , this, true);
             VeiwReceptionForm.Show();
         }
     }
     if (_currentTable.Equals(db.Receptions.GetType()))
     {
         if (e.ColumnIndex == 1)
         {
             AddProducts VeiwProductFrom = new AddProducts(
                 db.Products.Single
                     (item => item.Id.ToString().Equals(MainGrid.CurrentCell.Value.ToString()))
                 , true);
             VeiwProductFrom.Show();
         }
     }
     if (_currentTable.Equals(db.Cheks.GetType()))
     {
         if (e.ColumnIndex == 1)
         {
             AddOrder VeiwOrderForm = new AddOrder(
                 db.Orders.Single
                     (item => item.Id == (int)MainGrid.CurrentCell.Value)
                 , this, true);
             VeiwOrderForm.Show();
         }
     }
 }
Beispiel #4
0
        private void AddProducts(object obj)
        {
            AddProducts addWindow = new AddProducts();

            addWindow.Show();
        }