public static InputDeliveryLineList GetByExpedienteStockList(long oid, bool childs, InputDeliveryInfo albaran) { QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oid), TipoAcreedor = new ETipoAcreedor[1] { ETipoAcreedor.Proveedor } }; InputDeliveryLineList list = GetList(InputDeliveryLineSQL.SELECT_STOCK(conditions, false), childs); List <InputDeliveryLineInfo> merge = new List <InputDeliveryLineInfo>(); foreach (InputDeliveryLineInfo ca in albaran.ConceptoAlbaranes) { if (ca.OidExpediente == oid) { merge.Add(ca); } } foreach (InputDeliveryLineInfo ca in list) { if (ca.OidAlbaran != albaran.Oid) { merge.Add(ca); } } return(InputDeliveryLineList.GetChildList(merge)); }
public static WorkReportList GetByExpedientList(long oidExpedient, bool childs) { QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oidExpedient) }; return(GetList(SELECT(conditions), childs)); }
public static LivestockBookLineList GetByExpedienteList(long oidExpedient, bool childs) { QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oidExpedient) }; return(GetList(SELECT_BY_EXPEDIENTE(conditions), false)); }
public static InputDeliveryList GetListByPartidasExpediente(bool childs, long oidExp) { QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oidExp) }; return(GetList(childs, SELECT(conditions))); }
public static LivestockBooks GetByExpedienteList(long oidExpediente, bool childs) { QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oidExpediente), TipoExpediente = ETipoExpediente.Ganado }; return(GetList(LivestockBooks.SELECT(conditions), childs)); }
public static InputInvoiceList GetCostesByExpedienteList(long oid, bool childs) { QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oid), TipoAcreedor = new ETipoAcreedor[1] { ETipoAcreedor.Proveedor }, }; return(GetList(InputInvoiceSQL.SELECT_COSTES_EXPEDIENTE(conditions), childs)); }
public static InputDeliveryLineList GetByExpedienteList(long oid, bool childs) { QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oid), TipoAcreedor = new ETipoAcreedor[1] { ETipoAcreedor.Proveedor } }; return(GetList(InputDeliveryLineSQL.SELECT(conditions, false), childs)); }
public static Batchs GetChildListByExpediente(Almacen parent, long oidExpedient, bool childs) { CriteriaEx criteria = Stock.GetCriteria(parent.SessionCode); criteria.Childs = childs; QueryConditions conditions = new QueryConditions { Almacen = parent.GetInfo(false), Expedient = ExpedientInfo.New(oidExpedient) }; criteria.Query = Batchs.SELECT(conditions); return(DataPortal.Fetch <Batchs>(criteria)); }
public static LivestockBookLines GetChildListByExpediente(LivestockBook parent, long oidExpediente, bool childs) { CriteriaEx criteria = Stock.GetCriteria(parent.SessionCode); criteria.Childs = childs; QueryConditions conditions = new QueryConditions { LibroGanadero = parent.GetInfo(false), Expedient = ExpedientInfo.New(oidExpediente) }; criteria.Query = LivestockBookLines.SELECT(conditions); return(DataPortal.Fetch <LivestockBookLines>(criteria)); }
public static InputInvoiceList GetListByExpediente(long oid, bool childs) { CriteriaEx criteria = InputInvoice.GetCriteria(InputInvoice.OpenSession()); criteria.Childs = childs; QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oid) }; criteria.Query = InputInvoiceSQL.SELECT_EXPEDIENTES(conditions); InputInvoiceList list = DataPortal.Fetch <InputInvoiceList>(criteria); CloseSession(criteria.SessionCode); return(list); }
public static WorkReportResourceList GetList(long oidExpedient, ETipoEntidad entityType, bool clustered, bool childs = true) { QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oidExpedient), EntityType = entityType }; if (clustered) { conditions.Groups = new GroupList(); conditions.Groups.NewGroup("OidResource", typeof(WorkReportResource)); conditions.Groups.NewGroup("EntityType", typeof(WorkReportResource)); } return(GetList(SELECT(conditions), childs)); }
public static WorkReportResourceList GetByCategoryList(long oidCategory, long oidExpedient, bool clustered, bool childs = true) { QueryConditions conditions = new QueryConditions { Expedient = (oidExpedient != 0) ? ExpedientInfo.New(oidExpedient) : null, WorkReportCategory = (oidCategory != 0) ? WorkReportCategoryInfo.New(oidCategory) : null, Orders = new OrderList() }; conditions.Orders.NewOrder("CategoryMax", ListSortDirection.Ascending, typeof(WorkReportCategory)); if (clustered) { conditions.Groups = new GroupList(); conditions.Groups.NewGroup("OidCategory", typeof(WorkReportResource)); } return(GetList(SELECT(conditions), childs)); }
public static Stocks GetListByExpediente(long oidExpedient) { if (!Stock.CanEditObject()) { throw new System.Security.SecurityException(moleQule.Resources.Messages.USER_NOT_ALLOWED); } CriteriaEx criteria = Stock.GetCriteria(Stock.OpenSession()); criteria.Childs = false; QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oidExpedient) }; criteria.Query = Stocks.SELECT(conditions); Stock.BeginTransaction(criteria.SessionCode); return(DataPortal.Fetch <Stocks>(criteria)); }
public static InputInvoiceLineList GetCostesByExpedienteList(long oidExpediente, bool childs, bool cache) { InputInvoiceLineList list; if (!Cache.Instance.Contains(typeof(InputInvoiceLineList))) { QueryConditions conditions = new QueryConditions { Expedient = ExpedientInfo.New(oidExpediente), TipoAcreedor = new ETipoAcreedor[1] { ETipoAcreedor.Proveedor } }; list = GetList(InputInvoiceLine.SELECT_COSTES(conditions, false), childs); Cache.Instance.Save(typeof(InputInvoiceLineList), list); } else { list = Cache.Instance.Get(typeof(InputInvoiceLineList)) as InputInvoiceLineList; } return(list); }