コード例 #1
0
        private void btnDodadiMagacin_Click(object sender, EventArgs e)
        {
            AddWarehouseForm form2 = new AddWarehouseForm();

            form2.Text = "Додади нов магацин";
            if (form2.ShowDialog() == DialogResult.OK)
            {
                WarehouseAdapterSQL.SaveToDatabase(form2.magacin);
                listWarehouses();
            }
        }
コード例 #2
0
        private void btnIzmeniMagacin_Click(object sender, EventArgs e)
        {
            AddWarehouseForm form2 = new AddWarehouseForm();

            form2.Text = "Измени магацин";
            if (lbMagacini.SelectedIndex != -1)
            {
                Magacin       = (Warehouse)lbMagacini.SelectedItem;
                IzmeniMagacin = true;


                if (form2.ShowDialog() == DialogResult.OK)
                {
                    WarehouseAdapterSQL.EditToDatabase(form2.magacin, lbMagacini);
                    listWarehouses();
                }
            }
            else
            {
                MessageBox.Show("Ве молиме одберете магацин од листата", "Одберете магацин");
            }
        }