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 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); } }