static void Main(string[] args) { //Kupac k = new Kupac(); //k.Ime = "Pero"; //k.Prezime = "Perić"; //k.spol = Spol.Muško; ////Console.WriteLine((int)k.spol); //Tjedan t = new Tjedan(); //t.TrenutniDanUTjednu = Dan.Srijeda; //t.PocetniDanUTjednu = Dan.Ponedjeljak; //t.PrikaziTrenutniDan(); Trgovina t = new Trgovina(); t.BrojRadnika = 10; t.Ime = "Lidl"; t.Lokacija = "Osijek"; t.Telefon = "095121212"; Autobus a = new Autobus(); a.Godiste = 1999; Console.ReadLine(); }
public async Task <IActionResult> Edit(int id, [Bind("IdTrgovina,NazivTrgovina,VrstaRobe")] Trgovina trgovina) { if (id != trgovina.IdTrgovina) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(trgovina); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TrgovinaExists(trgovina.IdTrgovina)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["VrstaRobe"] = new SelectList(_context.VrstaRobes, "Id", "Naziv", trgovina.VrstaRobe); return(View(trgovina)); }
public async Task <IActionResult> Create([Bind("IdTrgovina,NazivTrgovina,VrstaRobe")] Trgovina trgovina) { if (ModelState.IsValid) { _context.Add(trgovina); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["VrstaRobe"] = new SelectList(_context.VrstaRobes, "Id", "Naziv", trgovina.VrstaRobe); return(View(trgovina)); }
public MainWindow() { InitializeComponent(); // popuni combobox za trgovine List <Trgovina> stores = new List <Trgovina>(); stores = StoreFactory.getAllStores(); comboxStoreNames.ItemsSource = stores; comboxStoreNames.DisplayMemberPath = "ime_trg"; comboxStoreNames.SelectedValuePath = "id"; // popuni combobox za payment type comboxShoppingPaymentType.Items.Add("Cash"); comboxShoppingPaymentType.Items.Add("Card"); }