Example #1
0
        public ActionResult Index(Index model, Command? command)
        {
            string filterName;
            Extent<Organisation> filterOrganisations;

            this.GetFilter(model, out filterOrganisations, out filterName);

            if (command == Command.Filter)
            {
                this.ModelState.Clear();
            }

            this.Map(model, filterOrganisations);
            this.MapFilter(model, filterName);
            return this.View(model);
        }
Example #2
0
 private void Map(Index model, Extent<Organisation> organisations)
 {
     model.Organisations = organisations.Select(x => new Index_Organisation
     {
         Id = x.Id.ToString(),
         Name = x.Name,
         Owner = x.ExistOwner ? x.Owner.UserName : null,
     }).ToArray();
 }
Example #3
0
 public ActionResult Index()
 {
     var model = new Index();
     this.MapFilter(model, null);
     var organisations = new Organisations(this.AllorsSession).Extent();
     this.Map(model, organisations);
     return this.View(model);
 }