protected override void UpdateEntityFieldsInternal(InspektionsRouteGISModel model, InspektionsRouteGIS entity) { base.UpdateEntityFieldsInternal(model, entity); IGeometry shape = null; entity.InspektionsRtStrAbschnitteList.Clear(); foreach (InspektionsRtStrAbschnitteModel irsa in model.InspektionsRtStrAbschnitteModelList) { var str = GetEntityById <StrassenabschnittGIS>(irsa.StrassenabschnittId); if (shape != null) { shape = shape.Union(str.Shape); } else { shape = str.Shape; } entity.AddStrassenabschnittGIS(str); } entity.Shape = shape; CurrentSession.Flush(); //Make sure that InspektionsRtStrAbschnitten are created if (entity.LegendNumber == null) { entity.LegendNumber = GetLegendNumber(); } }
/// <summary> /// Commit NHibernate transaction. /// </summary> public static void CommitTransaction() { _logger.Debug("Commit NHibernate transaction."); if (CurrentSession != null && CurrentSession.Transaction.IsActive) { CurrentSession.Flush(); CurrentSession.Transaction.Commit(); } }
public static void FlushSessionToDbAndClear() { CurrentSession.Flush(); if (DoNotClearSession) { return; } CurrentSession.Clear(); }
public void DeleteByTitle(String title) { var queryResult = CurrentSession.QueryOver <AnnouncementDTO>() .Where(p => p.Title == title); if (queryResult != null && queryResult.RowCount() > 0) { IList <AnnouncementDTO> peopleToBeDeleted = queryResult.List(); peopleToBeDeleted.ForEach(personToBeDeleted => CurrentSession.Delete(personToBeDeleted)); CurrentSession.Flush(); } }
public void Save(IDamageHandlingMethodState state) { IDamageHandlingMethodState s = state; CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
public void Save(IMovementTypeState state) { IMovementTypeState s = state; CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
public void Save(ISellableInventoryItemState state) { ISellableInventoryItemState s = state; CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
/// <summary> /// The commit. /// </summary> /// <returns> /// The <see cref="int" />. /// </returns> public virtual int Commit() { if (currentSession?.Transaction != null && currentSession.Transaction.IsActive) { CurrentSession?.Transaction.Commit(); CloseTransaction(); } else { CurrentSession.Flush(); } return(1); }
public void Save(IInventoryPRTriggeredState state) { IInventoryPRTriggeredState s = state; CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
public void Save(IInventoryPostingRuleState state) { IInventoryPostingRuleState s = state; if (ReadOnlyProxyGenerator != null) { s = ReadOnlyProxyGenerator.GetTarget <IInventoryPostingRuleState>(state); } CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
public void Save(IMovementConfirmationState state) { IMovementConfirmationState s = state; if (ReadOnlyProxyGenerator != null) { s = ReadOnlyProxyGenerator.GetTarget <IMovementConfirmationState>(state); } CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
public void Save(IOrderItemMvoState state) { IOrderItemMvoState s = state; if (ReadOnlyProxyGenerator != null) { s = ReadOnlyProxyGenerator.GetTarget <IOrderItemMvoState>(state); } CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
public void Save(IProductCategoryMemberState state) { IProductCategoryMemberState s = state; if (ReadOnlyProxyGenerator != null) { s = ReadOnlyProxyGenerator.GetTarget <IProductCategoryMemberState>(state); } CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
public void Save(IAttributeSetInstanceExtensionFieldState state) { IAttributeSetInstanceExtensionFieldState s = state; if (ReadOnlyProxyGenerator != null) { s = ReadOnlyProxyGenerator.GetTarget <IAttributeSetInstanceExtensionFieldState>(state); } CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
public void Save(IShipmentMethodTypeState state) { IShipmentMethodTypeState s = state; if (ReadOnlyProxyGenerator != null) { s = ReadOnlyProxyGenerator.GetTarget <IShipmentMethodTypeState>(state); } CurrentSession.SaveOrUpdate(s); var saveable = s as ISaveable; if (saveable != null) { saveable.Save(); } CurrentSession.Flush(); }
public void Save(ProductionOrderMaterialsPackage entity) { CurrentSession.SaveOrUpdate(entity); CurrentSession.Flush(); }
public void Save(ExpenditureWaybill entity) { CurrentSession.SaveOrUpdate(entity); CurrentSession.Flush(); }
public void Save(MovementWaybill entity) { CurrentSession.SaveOrUpdate(entity); CurrentSession.Flush(); }
public void Save(ReturnFromClientWaybill entity) { CurrentSession.SaveOrUpdate(entity); CurrentSession.Flush(); }
public void Save(AccountingPriceList entity) { CurrentSession.SaveOrUpdate(entity); CurrentSession.Flush(); }
/// <summary> /// Flushes current nhibernate session /// </summary> public static void FlushSession() { CurrentSession.Flush(); }
public void Save(DealPaymentToClient value) { CurrentSession.SaveOrUpdate(value); CurrentSession.Flush(); }
/// <summary> /// Сохранение изменений /// </summary> public void Flush() { CurrentSession.Flush(); }
public void Save(DealCreditInitialBalanceCorrection value) { CurrentSession.SaveOrUpdate(value); CurrentSession.Flush(); }
public void Save(WriteoffWaybill entity) { CurrentSession.SaveOrUpdate(entity); CurrentSession.Flush(); }
public void Save(ChangeOwnerWaybill entity) { CurrentSession.SaveOrUpdate(entity); CurrentSession.Flush(); }