Example #1
0
        public async Task <IActionResult> AddOrUpdate(TipEntry tipEntry)
        {
            ViewData["DataType"] = typeof(TipEntry);
            await tipEntryBussiness.CreateOrUpdateTipEntry(tipEntry);

            return(RedirectToAction("Index"));
        }
Example #2
0
        public void NextTip()
        {
            Random rnd = new Random();

            int portraitId = rnd.Next(0, 3);

            this.IsHydaelyn   = portraitId == 0;
            this.IsZodiark    = portraitId == 1;
            this.IsAmaurotine = portraitId == 2;
            ////this.IsAnamTan = portraitId == 3;

            if (this.tips == null)
            {
                TipEntry tip = new TipEntry();
                tip.Text = "I couldn't find any tips. =(";
                this.Tip = tip;
                return;
            }

            int index = rnd.Next(0, this.tips.Count);

            this.Tip = this.tips[index];
        }