Exemplo n.º 1
0
        private void Dodaj_Click(object sender, EventArgs e)
        {
            if (PustePola())
            {
                var path = "";
                if (App._file != null)
                {
                    path = App._file.Path;
                }


                Przedmiot dodajPrzedmiot = new Przedmiot
                {
                    nazwa        = editText1.Text,
                    cena         = Convert.ToDouble(editText2.Text.Replace(".", ",")),
                    opis         = editText3.Text,
                    kategorie    = kategorie.SelectedItem.ToString(),
                    podkategorie = podkategorie.SelectedItem.ToString(),
                    cenaZa       = cena.SelectedItem.ToString(),
                    ocena        = ocena.Rating,
                    zdjecie      = path
                };
                poDodaniuPrzedmiotu.Invoke(this, new PoDodaniuPrzedmiotuEvent(dodajPrzedmiot));
                this.Dismiss();
            }
        }
Exemplo n.º 2
0
 public Dialog_Przedmiot(Przedmiot przedmiot1)
 {
     this.przedmiot = przedmiot1;
 }
Exemplo n.º 3
0
 public Dialog_Dodaj(Przedmiot Przedmiot)
 {
     przedmiot = Przedmiot;
 }
Exemplo n.º 4
0
 public PoDodaniuPrzedmiotuEvent(Przedmiot przedmiot)
 {
     this.przedmiot = przedmiot;
 }