示例#1
0
        public virtual ActionResult Index()
        {
            ViewBag.ShowNavigation = false;

            var initiatives = _documentSession.Query<Initiative>().ToList();

            var initiativesCount = initiatives.Count;
            var fakeInitiative = new Initiative("Вакантное место", "Скоро здесь что-то будет, а пока здесь ничего нет", "#");
            for (var i = 0; i < 9 - initiativesCount; i++)
                initiatives.Add(fakeInitiative);

            return View(initiatives);
        }
示例#2
0
 public bool HasRight(RightType rightType, Initiative initiative)
 {
     return HasRight(rightType, AdministrativeDivision.RootAdministrativeDivisionId, initiative.Id);
 }