예제 #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);
 }