internal void DeleteSelf(Tipodocumentos parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } // if we're new then don't update the database if (this.IsNew) { return; } try { SessionCode = parent.SessionCode; Session().Delete(Session().Get <DocumentTypeRecord>(Oid)); MarkNew(); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } }
internal void Insert(Tipodocumentos parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } try { parent.Session().Save(Base.Record); MarkOld(); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } }
internal void Update(Tipodocumentos parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } try { SessionCode = parent.SessionCode; DocumentTypeRecord obj = Session().Get <DocumentTypeRecord>(Oid); obj.CopyValues(Base.Record); Session().Update(obj); MarkOld(); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } }