Exemple #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,ZvanjaMi,BodoviMi,BodoviVi,ZvanjaVi,PartijaId")] Bela bela)
        {
            if (id != bela.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bela);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BelaExists(bela.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PartijaId"] = new SelectList(_context.Partija, "Id", "Naziv", bela.PartijaId);
            return(View(bela));
        }
Exemple #2
0
        public async Task <IActionResult> Create([Bind("Id,ZvanjaMi,BodoviMi,BodoviVi,ZvanjaVi,PartijaId")] Bela bela)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bela);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PartijaId"] = new SelectList(_context.Partija, "Id", "Naziv", bela.PartijaId);
            return(View(bela));
        }
Exemple #3
0
            static void Main(string[] args)
            {
                //try
                //{
                //    decimal price = 169.32m;
                //    Console.WriteLine("The cost is {0.2}.", price);
                //}
                //catch (System.FormatException ex)
                //{
                //    //System.Console.WriteLine(ex );
                //    Console.WriteLine("Hello",ex);
                //}
                Bela d = new Bela();

                d.phepChia(25, 5);
                Console.ReadKey();
            }
    void Start()
    {
        List <string> deck = Bela.KreirajSpil();

        bela = FindObjectOfType <Bela>();

        int i = 0;

        foreach (string card in deck)
        {
            if (this.name == card)
            {
                KarteIzgled = bela.KarteIzgled[i];
                break;
            }
            i++;
        }
        spriteRenderer = GetComponent <SpriteRenderer>();
        selectable     = GetComponent <Selectable>();
    }