예제 #1
0
        public ActionResult ListPeople()
        {
            List <NRMembership> people = reposetory.GetAssociationActivePersons(CurrentProfile.AssociationID);


            Response.ClearContent();
            Response.AddHeader("Content-Type", "application/vnd.ms-excel");
            Response.AddHeader("content-disposition", @"attachment;filename=""Natteravne Frivillige.xls""");

            return(View(people));
        }
예제 #2
0
        public ActionResult NewMessage()
        {
            List <SelectListItem> AssItems = reposetory.GetAssociationActivePersons(CurrentProfile.AssociationID).Select(d => new SelectListItem {
                Value = d.Person.PersonID.ToString(), Text = d.Person.FullName
            }).ToList();

            AssItems.Insert(0, new SelectListItem {
                Text = General.GenderMale, Value = MistConversations.Int2Guid(4).ToString()
            });
            AssItems.Insert(0, new SelectListItem {
                Text = General.GenderFemale, Value = MistConversations.Int2Guid(3).ToString()
            });
            AssItems.Insert(0, new SelectListItem {
                Text = General.Board, Value = MistConversations.Int2Guid(2).ToString()
            });
            AssItems.Insert(0, new SelectListItem {
                Text = General.Teamleaders, Value = MistConversations.Int2Guid(1).ToString()
            });
            AssItems.Insert(0, new SelectListItem {
                Text = General.All, Value = MistConversations.Int2Guid(0).ToString()
            });


            MessageListModel Messages = new MessageListModel()
            {
                List         = AssItems,
                NewMessageTo = new List <Guid>()
            };

            return(View(Messages));
        }
예제 #3
0
        public PartialViewResult _FolderPlanning(Guid Id)
        {
            Folder Folder = reposetory.GetFolder(Id);

            if (Folder == null)
            {
                throw new NullReferenceException("Folder is null");
            }
            Folder.Teams = Folder.Teams != null ? Folder.Teams = Folder.Teams.OrderBy(m => m.Start).ToList() : Folder.Teams = new List <Team>();
            FolderPlanningModel Plannig = new FolderPlanningModel
            {
                Folder         = Folder,
                Active         = reposetory.GetAssociationActivePersons(Folder.Association.AssociationID),
                FeedBack       = reposetory.GetFolderUserAnswers(Folder.FolderID),
                minTeammembers = int.Parse(ConfigurationManager.AppSettings["TeamMin"]),
                maxTeammembers = int.Parse(ConfigurationManager.AppSettings["TeamMax"])
            };

            return(PartialView(Plannig));
        }