locked
Help with query RRS feed

  • Question

  • Hi, i have this query

    PrivateSub ExcesosHorasAFacturar_PreprocessQuery(ByRef query As System.Linq.IQueryable(Of LightSwitchApplication.CuotasMantenimientoItem))             query = query.Where(Function(bb) bb.RelaciónHoras.Where(Function(CC) CC.HorasAFacturar <> 0 And CC.ProcedeFacturación = True))         EndSub

    its based on table CuotasMantenimientoItem with a other related table named RelaciónHoras.. i need if horasafacturar it's diferent from 0 and procedefacturacion = true, then show me result...

    how can i do it?

      

    Tuesday, April 22, 2014 4:15 PM

All replies

  • anyone can help me to make these query possible?

    Thursday, April 24, 2014 9:38 PM
  • Hi Is CuotasMantenimientoItem parent to RelaciónHoras?

    Sven Elm


    • Edited by Sven Elm Saturday, April 26, 2014 3:15 PM
    Saturday, April 26, 2014 3:14 PM
  • Yes Sven
    Saturday, April 26, 2014 3:55 PM
  • Ivan,

    Just a hint: It's sometimes better to transpose such a question to the canonical Customers - Orders - Orderlines - products data structure. Point is, although it is a beautiful language, not every one understands Spanish. Also you specific table structure is not known by everyone, as Sven illustrated.

    Besides, the sole act of doing this transposition often leads to the solution auto-magically :)


    paul van bladel

    Saturday, April 26, 2014 5:15 PM
  • Hi Paul, thanks for your suggestion:

    I Explain:

    I have a table of (Contracts ((CuotasMantenimientoItem))and then there are a table of accumulated hours for a Month. Every action in any contract adds month / hours or make an update to table RelacionHoras (Accumulated).

    At the end of month, i need to make an invoice for the Excess of hours especified on each contract.

    To make this one possible, i've added to RelacionHoras a booleen (Computed) With:

    Hours in Contract // Worked hours // Invoice Date, if these parameters are on line of the booleen, this make's True or False.

    I need to give a List of Contracts with Any Excess of Hours to make Invoice.

    Thanks!

    Saturday, April 26, 2014 9:29 PM