示例#1
0
        public async Task DodajNovoOceno()
        {
            await PridobiVse();

            OcenaSmeri            novaOcena = new OcenaSmeri();
            Ocena                 ocena     = VseOceneSmeri.FirstOrDefault(o => o.OcenaSmeri == OcenaNoveSmeri);
            NacinPreplezanjaSmeri novNacin  = VsiNacini.FirstOrDefault(n => n.Nacin == NacinPreplezanja);

            novaOcena.OcenaId = ocena.Id;
            novaOcena.SmerId  = NovaSmer.Id;
            novaOcena.NacinPreplezanjaSmeriId = novNacin.Id;
            novaOcena.PlezalecId = await VrniPrijavljenPlezalecId();

            novaOcena.OcenaSmeriDatum = DateTime.UtcNow;
            await DataRepository.AddOcena(novaOcena);
        }
示例#2
0
 protected async Task OdpriObrazec()
 {
     NovaOcenaSmeri = new OcenaSmeri();
     await PridobiVse();
 }
示例#3
0
        protected async Task ConfirmationChange(bool value)
        {
            await ModalComponentChange.OnConfirmationChange(value);

            NovaOcenaSmeri = new OcenaSmeri();
        }
示例#4
0
        public async Task AddOcena(OcenaSmeri novaOcena)
        {
            await appDbContext.OcenaSmeri.AddAsync(novaOcena);

            await appDbContext.SaveChangesAsync();
        }