public Batch NewItem(Almacen parent, Expedient expediente, ETipoStock tipo) { Batch item = Batch.NewChild(expediente); this.AddItem(item); SetNextCode(item); Stock stock = parent.Stocks.NewItem(item, tipo); stock.Inicial = true; //expediente.UpdateTotalesProductos(); return(item); }
public static Stocks GetChildList(Almacen parent, bool childs, bool throwStockException) { CriteriaEx criteria = Stock.GetCriteria(parent.SessionCode); criteria.Query = Stocks.SELECT(parent); criteria.Childs = childs; Stocks list = DataPortal.Fetch <Stocks>(criteria); parent.UpdateStocks(throwStockException); return(list); }
public static Batchs GetChildListByAlbaranRecibido(Almacen parent, long oidDelivery, bool childs) { CriteriaEx criteria = Stock.GetCriteria(parent.SessionCode); criteria.Childs = childs; QueryConditions conditions = new QueryConditions { Almacen = parent.GetInfo(false), InputDelivery = InputDeliveryInfo.New(oidDelivery) }; criteria.Query = Batchs.SELECT(conditions); return(DataPortal.Fetch <Batchs>(criteria)); }
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 ProductList GetListByAlmacen(long oid, bool childs) { CriteriaEx criteria = Product.GetCriteria(Product.OpenSession()); criteria.Childs = childs; StoreInfo item = Almacen.New().GetInfo(); item.Oid = oid; criteria.Query = ProductList.SELECT(item); ProductList list = DataPortal.Fetch <ProductList>(criteria); CloseSession(criteria.SessionCode); return(list); }
public static Stocks GetChildListByProducto(Almacen parent, long oidPartida, bool childs) { CriteriaEx criteria = Stock.GetCriteria(parent.SessionCode); criteria.Childs = childs; QueryConditions conditions = new QueryConditions { Almacen = parent.GetInfo(false), Producto = Product.New().GetInfo(false) }; conditions.Producto.Oid = oidPartida; criteria.Query = Stocks.SELECT(conditions); return(DataPortal.Fetch <Stocks>(criteria)); }
public static StoreList GetList(bool retrieve_childs) { CriteriaEx criteria = Almacen.GetCriteria(Almacen.OpenSession()); criteria.Childs = retrieve_childs; //No criteria. Retrieve all de List if (nHManager.Instance.UseDirectSQL) { criteria.Query = StoreList.SELECT(); } StoreList list = DataPortal.Fetch <StoreList>(criteria); CloseSession(criteria.SessionCode); return(list); }
/// <summary> /// Actualiza un registro en la base de datos /// </summary> /// <param name="parent">Objeto padre</param> internal void Update(Almacen parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } //Debe obtener la sesion del padre pq el objeto es padre a su vez SessionCode = parent.SessionCode; OidAlmacen = parent.Oid; try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR); } InventarioAlmacenRecord obj = parent.Session().Get <InventarioAlmacenRecord>(Oid); obj.CopyValues(this._base.Record); parent.Session().Update(obj); _lineainventarios.Update(this); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
public static string SELECT(Almacen item, bool get_kit_components) { return(Batch.SELECT(item, get_kit_components, true)); }
public void Remove(Almacen almacen, long oid) { base.Remove(oid); }
public Batch NewItem(Almacen parent, Expedient expediente) { return(NewItem(parent, expediente, ETipoStock.Compra)); }
public void CopyFrom(Almacen source) { _base.CopyValues(source); }
public static string SELECT(QueryConditions conditions) { return(Almacen.SELECT(conditions, false)); }
/// <summary> /// Crea un nuevo elemento y lo añade a la lista /// </summary> /// <returns>Nuevo item</returns> public InventarioAlmacen NewItem(Almacen parent) { this.NewItem(InventarioAlmacen.NewChild(parent)); return(this[Count - 1]); }
public static string SELECT(Almacen item) { return(SELECT(new QueryConditions { Almacen = item.GetInfo() })); }
/// <summary> /// NO UTILIZAR DIRECTAMENTE. LO UTILIZA LA FUNCION DE CREACION DE LA LISTA DEL PADRE /// </summary> private InventarioAlmacen(Almacen parent) { OidAlmacen = parent.Oid; MarkAsChild(); }