Skip to content

Instantly share code, notes, and snippets.

View moaschterle's full-sized avatar

Rudi Thoeni moaschterle

View GitHub Profile
//also des isch der Index
public class EventMegaFilter : AbstractIndexCreationTask<Event>
{
/// <summary>
/// Filter ACtivities and POIs by
/// SMGActive, Type, Subtype, Region, TV, SMG Tags
/// </summary>
public EventMegaFilter()
{
private IEnumerable<ActivityPoiReduced> GetAllPoiReduced(string language, string activitytype, List<string> tvlist, List<string> subtypelist, List<string> arealist, List<string> mysmgtaglist, bool highlight)
{
using (var session = documentStore.OpenSession())
{
var activityquery = session.Query<PoiBaseInfos, ActivityPoiMegaFilterMM>()
.Where(x => x.Type == activitytype)
.WhereIf(tvlist.Count > 0, x => x.TourismorganizationId.In(tvlist))
.WhereIf(subtypelist.Count > 0, x => x.SubType.In(subtypelist))
.WhereIf(mysmgtaglist.Count > 0, x => x.SmgTags.In(mysmgtaglist))
.WhereIf(highlight, x => x.Highlight == true)
[HttpGet, Route("api/Huette/All/{elements}")]
public IEnumerable<Huette> Get(int elements)
{
//using (var session = RavenSession.OpenSession())
//{
// var huettenliste = session.Query<Huette>().Take(elements).OrderBy(x => x.Name).ThenBy(x => x.Region);
// return huettenliste.ToList();
//}
[HttpPost, Route("api/Accommodation/Available/{language}/{boardfilter}/{arrival}/{departure}/{roominfo}/{bokfilter}/{seed}")]
public async Task<Result<Accommodation>> PostAvailableAsync(string language, string boardfilter, string arrival, string departure, string roominfo, string bokfilter, int seed, [FromBody] string idfilter)
<div class="container">
<img class="visible-md visible-lg img-responsive" src="images/dummies/24994680.footer-desktop.png">
<img class="visible-sm" src="images/dummies/72b10f00.footer-tablet.png">
<img class="visible-xs img-responsive" src="images/dummies/6e33156f.footer-mobile.png">
</div>
var myareaorder = skiarea.Elements("Area").OrderBy(x => x.Attribute("Order").Value).ToList();
//Neu Gruppierung auf Skigebiets Area
var liftlistjoined = (from lift in liftlist
join area in myareaorder
on lift.Element("Memberships").Elements("Membership").FirstOrDefault().Elements("Area").FirstOrDefault().Attribute("RID").Value equals area.Value
orderby area.Attribute("Order").Value
select new { lift, area});
foreach (var liftarea in liftlistjoined)
ANSWER:
<?xml version="1.0" encoding="utf-8"?>
<root>
<header>
<error>
<code>0</code>
<message>OK</message>
</error>
<result_id>ea7f1f00511c56fe3d2ddb35f96b2ddc</result_id>
using Raven.Client;
using Raven.Client.Document;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;
using System.Net.Http;
using System.IO;
var mysorted = (from x in mysoapclient.AllGames().OrderBy(x => x.dPlayDate).ThenBy(x => x.tPlayTime)
let y = x.Goals.OrderBy(z => z.iMinute)
select new ServiceReferenceFootBallPool.tGameInfo
{
bChampion = x.bChampion,
Cards = x.Cards,
dPlayDate = x.dPlayDate,
Goals = y.ToArray(),
iId = x.iId,
iRedCards = x.iRedCards,
/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
public partial class Wiese
{
private string codeField;
private string wiesennameField;