Пример #1
0
        protected override bool AcceptCreate(BL.BaseManager manager)
        {
            Ad adImage = new Ad();

            UCFormAd.PopulateModel(adImage);
            return(((AdImageManager)manager).Save(adImage));
        }
Пример #2
0
        protected override bool AcceptCreate(BL.BaseManager manager)
        {
            Map map = new Map();

            UCFormMap.PopulateModel(map);
            return(((MapManager)manager).Save(map));
        }
Пример #3
0
        protected override bool AcceptModify(BL.BaseManager manager, int id)
        {
            Map map = ((MapManager)manager).Get(id);

            UCFormMap.PopulateModel(map);
            return(((MapManager)manager).Edit(map));
        }
Пример #4
0
        protected override bool AcceptModify(BL.BaseManager manager, int id)
        {
            User user = ((UserManager)manager).Get(id);

            UCFormNewMember.PopulateModel(user);
            return(((UserManager)manager).Edit(user));
        }
Пример #5
0
        protected override bool AcceptModify(BL.BaseManager manager, int id)
        {
            Poll poll = ((PollManager)manager).Get(id);

            UCFormPoll.PopulateModel(poll);
            return(((PollManager)manager).Edit(poll));
        }
Пример #6
0
        protected override bool AcceptModify(BL.BaseManager manager, int id)
        {
            Category category = ((CategoryManager)manager).Get(id);

            UCFormCategory.PopulateModel(category);
            return(((CategoryManager)manager).Edit(category));
        }
Пример #7
0
        protected override bool AcceptCreate(BL.BaseManager manager)
        {
            Poll poll = new Poll();

            UCFormPoll.PopulateModel(poll);
            return(((PollManager)manager).Save(poll));
        }
Пример #8
0
        protected override bool AcceptCreate(BL.BaseManager manager)
        {
            Category category = new Category();

            UCFormCategory.PopulateModel(category);
            return(((CategoryManager)manager).Save(category));
        }
Пример #9
0
        protected override bool AcceptModify(BL.BaseManager manager, int id)
        {
            News news = ((NewsManager)manager).Get(id);

            UCFormNews.PopulateModel(news);
            return(((NewsManager)manager).Edit(news));
        }
Пример #10
0
        protected override bool AcceptCreate(BL.BaseManager manager)
        {
            News news = new News();

            UCFormNews.PopulateModel(news);
            return(((NewsManager)manager).Save(news));
        }
Пример #11
0
        protected override bool AcceptModify(BL.BaseManager manager, int id)
        {
            Role role = ((RoleManager)manager).Get(id);

            UCFormRolePermission.PopulateModel(role);
            role.Permissions = RetrievePermissionFromSession("granted");
            return(((RoleManager)manager).Edit(role));
        }
Пример #12
0
        protected override bool AcceptCreate(BL.BaseManager manager)
        {
            Role role = new Role();

            UCFormRolePermission.PopulateModel(role);
            role.Permissions = RetrievePermissionFromSession("granted");
            return(((RoleManager)manager).Save(role));
        }
Пример #13
0
        protected override bool AcceptModify(BL.BaseManager manager, int id)
        {
            RoleManager roleManager = new RoleManager();
            User        user        = ((UserManager)manager).Get(id);

            if (user == null && manager.HasErrors)
            {
                return(false);
            }

            user.Roles = RetrieveFromSession("granted");
            bool success = roleManager.EditRoleForUser(user);

            if (!success && roleManager.HasErrors)
            {
                Alert.Show("Error", roleManager.ErrorDescription);
            }

            return(success);
        }
Пример #14
0
        protected override bool AcceptCreate(BL.BaseManager manager)
        {
            User user = new User();

            UCFormNewMember.PopulateModel(user);

            //TODO - LA VALIDACIÓN DEL PASSWORD Y LA REPETICIÓN, DEBERÍA HACERSE POR FRONT
            //Por otro lado, notar que como está el break, el mensaje no se muestra y debe implementarse un workaround
            bool success = true;

            if (IsValidForSave())
            {
                user.Password = SecurityHelper.Encrypt(user.Password);
                success       = ((UserManager)manager).Save(user);
            }
            else
            {
                success = false;
                Alert.Show("Error", "El password y su verificación, deben coincidir.");
            }

            return(success);
        }
Пример #15
0
 protected virtual bool AcceptModify(BL.BaseManager manager, int id)
 {
     return(true);
 }
Пример #16
0
 protected virtual bool AcceptCreate(BL.BaseManager manager)
 {
     return(true);
 }