var query = QueryOver.Of<UserRoleMember>()
.Where(x => x.User.Id == userAlias.Id);
if (_queryParams.RoleId != null)
{
query = query
.Where(x => x.AppRole.Id == _queryParams.RoleId)
}
if (_queryParams.BranchId != null)
{
query = query
.Where(x => x.Branch.Id == _queryParams.BranchId)
}
var result = query.Select(x => 1);
filteredUsers = filteredUsers.WithSubquery.WhereExists(result);
await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultRevision);
_browser = await Puppeteer.LaunchAsync(new LaunchOptions { Headless = true });
_page = await _browser.NewPageAsync();
await _page.GoToAsync(_credentials.LoginUrl, WaitUntilNavigation.Load);
await _page.ClickAsync(_selectors.SignInPopup);
await _page.ClickAsync(_selectors.UsernameField);
await _page.Keyboard.TypeAsync(_credentials.Username);
await _page.ClickAsync(_selectors.PasswordField);
await _page.Keyboard.TypeAsync(_credentials.Password);
await _page.ClickAsync(_selectors.SignInButton);
await _page.WaitForNavigationAsync(new NavigationOptions() { Timeout = 120000});
function _send (s) {
var input = document.getElementById("input");
input.value=s;
var evt = document.createEvent("HTMLEvents");
evt.initEvent("input", false, true);
input.dispatchEvent(evt);
var t = document.querySelector('.well span')
console.log("%s => %s", s, (t.textContent.search ("true") > -1) );
}
for(var code = 0; code < 1000; code++) {
_send (String.fromCharCode(code));
}
$(".items > .item button").click(buttonClickHandler)
function buttonClickHandler(e) {
var $block = $(e.target).closest('.item');
var $images = $block.find("img");
var items_wrapper = $(".popup > .slide-items").get();
$(items_wrapper).trigger('destroy.owl.carousel');
$(items_wrapper).empty();
$images.each(function (index, image) {
$('<div>').attr("class", "slide-item").append($("img").attr("src", image.src)).appendTo(items_wrapper);
});
$(items_wrapper).owlCarousel();
}