コード例 #1
0
        private void Add_Click(object sender, EventArgs e)
        {
            var insertor = new Insertor();

            switch (CurrentTable)
            {
            case Table.Orders:
                insertor.InsertOrder(lvData);
                break;

            case Table.Customers:
                insertor.InsertCustomer(lvData);
                break;

            case Table.Operators:
                insertor.InsertOperator(lvData);
                break;

            case Table.Couriers:
                insertor.InsertCourier(lvData);
                break;

            case Table.Employees:
                insertor.InsertEmployee(lvData);
                break;

            case Table.Restaurants:
                insertor.InsertNewRestaurants(lvData);
                break;

            case Table.Users:
                UsersCode.Insert(lvData);
                break;
            }
        }
コード例 #2
0
ファイル: Description.cs プロジェクト: sad-dw4rf/DeliveryClub
        private void button1_Click(object sender, EventArgs e)
        {
            var insert = new Insertor();

            insert.InsertDish(listView1, _order);
            //var insert_dish = new InsertDish(_order, listView1);
            //insert_dish.ShowDialog();
            _lvData.Clear();
            var filler = new ListViewFiller();

            filler.FillOrders(_lvData);
        }
コード例 #3
0
        private void изменитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // add order
            GoOrders();
            if (CurrentTable != Table.Orders)
            {
                return;
            }

            var insertor = new Insertor();

            insertor.InsertOrder(lvData);
        }
コード例 #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (lvData.SelectedItems.Count == 0)
            {
                return;
            }
            var rest_for_transfer = lvData.SelectedItems[0].Tag as  естораны; // хранится выделенный ресторан

            if (rest_for_transfer == null)
            {
                return;
            }
            var insert_new_dish = new Insertor();

            insert_new_dish.InsertNewDish(lvDish, rest_for_transfer);
        }