public static void LinkGuestClaim(int userId, string name, int claim)
 {
     System.Collections.Generic.List <GuestClaim> claims = GuestProvider.FindGuestClaims("", userId, name, new int?(claim), null);
     if (claims != null && claims.FirstOrDefault((GuestClaim m) => m.claim == claim) != null)
     {
         DatabaseOperationProvider.ExecuteProcedure("up_guest_linkGuestClaim", new
         {
             userid = userId,
             claim  = claim
         });
         return;
     }
     throw new ExceptionWithCode(203, string.Format("claim {0} not found", claim));
 }
 public static System.Collections.Generic.List <GuestClaim> GetActiveClaims(string lang, int userId, System.DateTime firstDate, System.DateTime lastDate)
 {
     System.Collections.Generic.List <GuestClaim> claims = GuestProvider.GetLinkedClaims(lang, userId);
     System.Collections.Generic.List <GuestClaim> result2;
     if (claims != null)
     {
         System.Collections.Generic.List <GuestClaim> result = (
             from m in claims
             where m.period != null && firstDate <= m.period.end && lastDate >= m.period.begin
             select m).ToList <GuestClaim>();
         if (result != null && result.Count > 0)
         {
             result2 = result;
             return(result2);
         }
     }
     result2 = null;
     return(result2);
 }
 public static System.Collections.Generic.List <GuestOrder> GetActiveHotelOrders(string lang, int userId, System.DateTime firstDate, System.DateTime lastDate)
 {
     System.Collections.Generic.List <GuestOrder> result = new System.Collections.Generic.List <GuestOrder>();
     System.Collections.Generic.List <GuestClaim> claims = GuestProvider.GetLinkedClaims(lang, userId);
     return(GuestProvider.GetActiveHotelOrders(claims, firstDate, lastDate));
 }
 public static System.Collections.Generic.List <GuestOrder> GetActiveHotelOrders(string lang, int userId, System.DateTime date)
 {
     return(GuestProvider.GetActiveHotelOrders(lang, userId, date, date));
 }