Exemple #1
0
        // GET: DessingRoom
        private void Create()
        {
            DRPers pers                = new DRPers();
            int    selectedIndex       = 1;
            List <SelectListItem> lvls = new List <SelectListItem>();

            for (int i = 1; i <= 20; i++)
            {
                lvls.Add(new SelectListItem {
                    Text = i.ToString(), Value = i.ToString()
                });
            }
            ViewBag.Lvl = lvls;
            SelectList ranks = new SelectList(pers.GetRank(selectedIndex), "Id", "Name");

            Session["Pers"] = pers;
            ViewBag.Rank    = ranks;
        }
Exemple #2
0
        public ActionResult GetRank(int lvls)
        {
            DRPers pers = (DRPers)Session["Pers"];

            return(PartialView(pers.GetRank(lvls).ToList()));
        }