Пример #1
0
        private void btnSearchMagazine_Click(object sender, EventArgs e)
        {
            MagazineForm searchMagazine = new MagazineForm(dbContext, true);

            searchMagazine.magazineSaved += new EventHandler <List <Magazine> >(magazineSaved);
            searchMagazine.ShowDialog();
        }
Пример #2
0
        // Magazines

        private void btnAddMagazine_Click(object sender, EventArgs e)
        {
            MagazineForm addMagazine = new MagazineForm(dbContext);

            addMagazine.magazineSaved += new EventHandler <List <Magazine> >(magazineSaved);
            addMagazine.ShowDialog();
        }
Пример #3
0
        private void btnEditMagazine_Click(object sender, EventArgs e)
        {
            Magazine magazine = (Magazine)GuiUtils.GetSelected <Magazine>(lstViewMagazines, magazineTagSet);

            if (magazine != null)
            {
                MagazineForm editMagazine = new MagazineForm(dbContext, magazine);
                editMagazine.magazineSaved += new EventHandler <List <Magazine> >(magazineSaved);
                editMagazine.ShowDialog();
            }
            else
            {
                MessageBox.Show("Nie wybrano magazynu!", "Błąd");
            }
        }