Exemplo n.º 1
0
        public ActionResult Create(FormCollection collection)
        {
            bool success = false;

            try
            {
                UserOrganization membership = EntityPropertiesLoader.PopulateProperties <UserOrganization>(collection);
                success = manager.CreateMembership(membership);
            }
            catch
            {
            }

            if (success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Exemplo n.º 2
0
        public ActionResult Create(FormCollection collection)
        {
            bool success = false;

            try
            {
                Area area = EntityPropertiesLoader.PopulateProperties <Area>(collection);
                success = manager.CreateArea(area);
            }
            catch
            {
            }

            if (success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Exemplo n.º 3
0
        public ActionResult Create(FormCollection collection)
        {
            LoadViewData();

            bool success = false;

            try
            {
                Module m = EntityPropertiesLoader.PopulateProperties <Module>(collection);
                success = manager.CreateModule(m);
            }
            catch
            {
            }

            if (success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Exemplo n.º 4
0
        public ActionResult Create(FormCollection collection)
        {
            bool success = false;

            try
            {
                User user = EntityPropertiesLoader.PopulateProperties <User>(collection);
                // TODO: set password if not AD integrated
                user.Password = string.Empty;
                success       = manager.CreateUser(string.Empty, user);
            }
            catch
            {
            }

            if (success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }