Exemplo n.º 1
0
        public static bool ProcessControls(List <RoleControl> _editingRoleControls)
        {
            bool success = true;

            foreach (RoleControl control in _editingRoleControls)
            {
                if (control.status == "NEW")
                {
                    if (!RoleDAL.AddControlToRole(control, control.RoleID))
                    {
                        success = false;
                    }
                    ;
                }
                else if (control.status == "UPDATE")
                {
                    if (!RoleDAL.UpdateControl(control, control.RoleID))
                    {
                        success = false;
                    }
                    ;
                }
            }
            return(success);
        }