public int CancelSaleOrder(string pStrRequestId) { Documents lObjSaleOrder = null; try { lObjSaleOrder = GetSaleOrderByRequestId(pStrRequestId); return(lObjSaleOrder.Cancel()); } catch (Exception lObjException) { throw new DAOException(lObjException.Message, lObjException); } finally { MemoryUtility.ReleaseComObject(lObjSaleOrder); } }