private static ModeloList GetList(string query, bool childs) { CriteriaEx criteria = OutputInvoice.GetCriteria(OutputInvoice.OpenSession()); criteria.Childs = childs; criteria.Query = query; ModeloList list = DataPortal.Fetch <ModeloList>(criteria); CloseSession(criteria.SessionCode); return(list); }
public static CobroFacturaList GetChildList(OutputInvoiceInfo parent, bool childs) { CriteriaEx criteria = CobroFactura.GetCriteria(OutputInvoice.OpenSession()); criteria.Query = CobroFacturaList.SELECT_BY_FACTURA(parent.Oid); criteria.Childs = childs; CobroFacturaList list = DataPortal.Fetch <CobroFacturaList>(criteria); list.CloseSession(); return(list); }
public static FacREAList GetNoCobradas() { CriteriaEx criteria = OutputInvoice.GetCriteria(OutputInvoice.OpenSession()); criteria.Childs = false; if (nHManager.Instance.UseDirectSQL) { criteria.Query = FacREAList.SELECT_NO_COBRADAS(); } FacREAList list = DataPortal.Fetch <FacREAList>(criteria); CloseSession(criteria.SessionCode); return(list); }
public static REAResumen Get(Expedient expediente) { CriteriaEx criteria = OutputInvoice.GetCriteria(OutputInvoice.OpenSession()); if (nHManager.Instance.UseDirectSQL) { criteria.Query = REAResumen.SELECT(expediente); } OutputInvoice.BeginTransaction(criteria.Session); REAResumen obj = DataPortal.Fetch <REAResumen>(criteria); OutputInvoice.CloseSession(criteria.SessionCode); return(obj); }
public static FacREAList GetListByCobro(long oid_cobro) { CriteriaEx criteria = OutputInvoice.GetCriteria(OutputInvoice.OpenSession()); criteria.Childs = false; //No criteria. Retrieve all de List if (nHManager.Instance.UseDirectSQL) { criteria.Query = FacREAList.SELECT_BY_COBRO(oid_cobro); } FacREAList list = DataPortal.Fetch <FacREAList>(criteria); CloseSession(criteria.SessionCode); return(list); }
public override void PrintObject() { _action_result = SaveObject() ? DialogResult.OK : DialogResult.Ignore; if (_action_result == DialogResult.OK) { base.PrintObject(); _entity.SessionCode = OutputInvoice.OpenSession(); _entity.BeginEdit(); _entity.BeginTransaction(); _entity.EEstado = EEstado.Emitido; _action_result = SaveObject() ? DialogResult.OK : DialogResult.Ignore; DialogResult = _action_result; ExecuteAction(molAction.Close); } }