Пример #1
0
        /// <summary>
        ///     This method allows to delete the list with the specified id
        /// </summary>
        /// <param name="id">
        ///     The list's id we want to delete
        /// </param>
        /// <author>
        ///     Luis Gonzalo Quijada Romero
        /// </author>
        /// <returns></returns>
        public void deleteList(String id)
        {
            String dataPermissions       = Session["Permissions"].ToString();
            String dataPermissionsClient = Session["PermissionsClient"].ToString();
            bool   access       = false;
            bool   accessClient = false;

            //  access = getpermissions("users", "r");
            access       = validatepermissions.getpermissions("lists", "d", dataPermissions);
            accessClient = validatepermissions.getpermissions("lists", "d", dataPermissionsClient);

            if (access == true && accessClient == true)
            {
                if (this.Request.IsAjaxRequest())
                {
                    listTable.deleteRow(id);
                    return;
                }
                return;
            }
            return;
        }