protected override void GetFormSourceData(object[] parameters) { moleQule.Store.Structs.ETipoExpediente tipo = (moleQule.Store.Structs.ETipoExpediente)parameters[0]; _entity = Expedient.New(tipo); _entity.BeginEdit(); }
public static ProductList GetListByExpediente(long oid, bool childs) { CriteriaEx criteria = Product.GetCriteria(Product.OpenSession()); criteria.Childs = childs; ExpedientInfo item = Expedient.New().GetInfo(); item.Oid = oid; criteria.Query = ProductList.SELECT(item); ProductList list = DataPortal.Fetch <ProductList>(criteria); CloseSession(criteria.SessionCode); return(list); }
public static StockList GetListByExpediente(long oid, bool throwStockException) { CriteriaEx criteria = Stock.GetCriteria(Stock.OpenSession()); criteria.Childs = true; Expedient item = Expedient.New(); item.Oid = oid; criteria.Query = StockList.SELECT(item.GetInfo(false)); StockList list = DataPortal.Fetch <StockList>(criteria); list.UpdateStocksByBatch(throwStockException); CloseSession(criteria.SessionCode); return(list); }