public void PaymentListHasItemsOnlyFromAEmployee() { PaymentList list = null; QueryConditions conditions = new QueryConditions { Acreedor = ProviderBaseInfo.New(1, ETipoAcreedor.Empleado) }; list = PaymentList.GetList(conditions, false); Assert.IsNull(list.FirstOrDefault(x => x.OidAgente != conditions.Acreedor.Oid || x.ETipoAcreedor != ETipoAcreedor.Empleado)); }
public void InputInvoiceListHasItemsOnlyFromAClient() { InputInvoiceList list = null; QueryConditions conditions = new QueryConditions { Acreedor = ProviderBaseInfo.New(1, ETipoAcreedor.Proveedor) }; list = InputInvoiceList.GetList(conditions, false); Assert.IsNull(list.FirstOrDefault(x => x.OidAcreedor != conditions.Acreedor.Oid)); }
public static WorkReport GetByResource(long oidResource, ETipoEntidad entityType, bool childs = true) { QueryConditions conditions = new QueryConditions(); switch (entityType) { case ETipoEntidad.Empleado: conditions.Acreedor = ProviderBaseInfo.New(oidResource, ETipoAcreedor.Empleado); break; case ETipoEntidad.OutputDelivery: conditions.OutputDelivery = OutputDeliveryInfo.New(oidResource); break; case ETipoEntidad.Tool: conditions.Tool = ToolInfo.New(oidResource); break; } return(Get(SELECT(conditions, true), childs)); }
public static OutputInvoiceList GetByBranchList(long oidPartner, long oidBranch, DateTime from, DateTime till, EStepGraph step, CriteriaEx criteria, bool childs) { QueryConditions conditions = new QueryConditions() { PagingInfo = (criteria != null) ? criteria.PagingInfo : null, Filters = (criteria != null) ? criteria.Filters : null, Orders = (criteria != null) ? criteria.Orders : null, IAcreedor = ProviderBaseInfo.New(oidPartner, ETipoAcreedor.Partner), OidEntity = oidBranch, FechaIni = from, FechaFin = till, Step = step, }; string query = OutputInvoice.SELECT_BY_BRANCH(conditions, false); if (criteria != null) { criteria.PagingInfo = conditions.PagingInfo; } return(GetList(query, criteria, childs)); }