//запуск менеджера с выбранным устройством public Configuration_Manager(string hostname) { //необходимо выбрать переданное устройство InitializeComponent(); prevHostname = hostname; filter = FavoriteFilter.ByHostname; checkBoxHostname.Checked = true; LoadData(); }
//запуск менеджера с выбранным устройством public Configuration_Manager(string hostname) { //необходимо выбрать переданное устройство InitializeComponent(); prevHostname = hostname; filter = FavoriteFilter.ByHostname; checkBoxHostname.Checked = true; LoadData(); }
//проверка изменения фильтра устройства private void checkBoxHostname_CheckStateChanged(object sender, EventArgs e) { if (checkBoxHostname.Checked) { filter = FavoriteFilter.ByHostname; LoadData(); } else { filter = FavoriteFilter.ByIPAddress; LoadData(); } }
public IActionResult Get() { try { var filter = new FavoriteFilter { UserId = this.UserId.Value }; var results = this.appService.GetBy(filter, f => f.TouristSpot); return(this.Response(results)); } catch (SnowmanLabsChallengeException slcex) { return(this.Response(slcex)); } catch (Exception ex) { return(this.Response(ex)); } }
public IActionResult FavoriteCount([FromRoute] int touristSpotId) { try { var filter = new FavoriteFilter { TouristSpotId = touristSpotId }; var results = this.favoriteAppService.GetBy(filter); var count = results.Page.TotalElements; return(this.Response(count)); } catch (SnowmanLabsChallengeException slcex) { return(this.Response(slcex)); } catch (Exception ex) { return(this.Response(ex)); } }
public IActionResult Favorite([FromRoute] int touristSpotId) { try { var userId = this.UserId.Value; var filter = new FavoriteFilter { TouristSpotId = touristSpotId, HasPagination = false }; var results = this.favoriteAppService.GetBy(filter); return(this.Response(results)); } catch (SnowmanLabsChallengeException slcex) { return(this.Response(slcex)); } catch (Exception ex) { return(this.Response(ex)); } }
public static FavoriteListRequestBuilder List(FavoriteFilter filter = null) { return(new FavoriteListRequestBuilder(filter)); }
public FavoriteListRequestBuilder(FavoriteFilter filter) : this() { this.Filter = filter; }
//проверка изменения фильтра устройства private void checkBoxHostname_CheckStateChanged(object sender, EventArgs e) { if (checkBoxHostname.Checked) { filter = FavoriteFilter.ByHostname; LoadData(); } else { filter = FavoriteFilter.ByIPAddress; LoadData(); } }