Ejemplo n.º 1
0
        public ActionResult Edit(int id, FormCollection collection)
        {
            bool success = false;

            try
            {
                Module module = manager.GetModule(id);
                EntityPropertiesLoader.UpdateProperties(ref module, collection);
                success = manager.UpdateModule(module);
            }
            catch
            {
            }

            if (success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Ejemplo n.º 2
0
        public ActionResult Edit(int id, FormCollection collection)
        {
            bool success = false;

            try
            {
                User user = manager.GetUser(id);
                EntityPropertiesLoader.UpdateProperties <User>(ref user, collection);
                success = manager.UpdateUser(user);
            }
            catch
            {
            }

            if (success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Ejemplo n.º 3
0
        public ActionResult Edit(int id, FormCollection collection)
        {
            bool success = false;

            try
            {
                Area area = manager.GetArea(id);
                EntityPropertiesLoader.UpdateProperties <Area>(ref area, collection);
                success = manager.UpdateArea(area);
            }
            catch
            {
            }

            if (success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(Edit(id));
            }
        }
Ejemplo n.º 4
0
        public ActionResult Edit(int id, FormCollection collection)
        {
            bool success = false;

            try
            {
                Organization org = manager.GetOrganization(id);
                EntityPropertiesLoader.UpdateProperties <Organization>(ref org, collection);
                success = manager.UpdateOrganization(org);
            }
            catch
            {
            }

            if (success)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(Edit(id));
            }
        }
        public ActionResult Edit(int id, FormCollection collection)
        {
            bool success = false;

            try
            {
                mp.Action action = manager.GetAction(id);
                EntityPropertiesLoader.UpdateProperties <mp.Action>(ref action, collection);
                success = manager.UpdateAction(action);
            }
            catch
            {
            }

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