// GET: Vereniging
        public ActionResult Index()
        {
            if (User.Identity.Name == "")
            {
                return(RedirectToAction("ErrorLogin", "Home"));
            }
            List <Organisation> organisations = DAOrganisation.GetOrganisations();

            ViewBag.Organisations = organisations;

            return(View());
        }
        public ActionResult EditRegister(int organisationID, int registerID)
        {
            if (User.Identity.Name == "")
            {
                return(RedirectToAction("ErrorLogin", "Home"));
            }
            PMOrganisationRegister organisationRegister = new PMOrganisationRegister();

            organisationRegister.NewOrganisation = new MultiSelectList(DAOrganisation.GetOrganisations(), "Id", "OrganisationName");
            OrganisationRegister or = DAOrganisationRegister.GetOrganisationRegisterByIds(organisationID, registerID);

            organisationRegister.Device           = or.Device;
            organisationRegister.FromDate         = or.FromDate;
            organisationRegister.Login            = or.Login;
            organisationRegister.OrganisationID   = or.OrganisationID;
            organisationRegister.OrganisationName = or.OrganisationName;
            organisationRegister.RegisterID       = or.RegisterID;
            organisationRegister.RegisterName     = or.RegisterName;
            organisationRegister.UntilDate        = or.UntilDate;

            ViewBag.Organisation = DAOrganisation.GetOrganisationById(organisationID);
            ViewBag.oldId        = organisationID;
            return(View(organisationRegister));
        }