Ejemplo n.º 1
0
 private GroupFilterRepository()
 {
     EndSaveCallback = (obj) =>
     {
         lock (Types)
         {
             lock (Changes)
             {
                 Types[obj.GroupFilterID] = obj.Types;
                 Changes.AddOrUpdate(obj.GroupFilterID);
             }
         }
     };
     EndDeleteCallback = (obj) =>
     {
         lock (Types)
         {
             lock (Changes)
             {
                 Types.Remove(obj.GroupFilterID);
                 Changes.Remove(obj.GroupFilterID);
             }
         }
     };
 }
Ejemplo n.º 2
0
 internal override void EndDelete(SVR_GroupFilter entity, object returnFromBeginDelete, bool onlyconditions)
 {
     lock (Types)
     {
         lock (Changes)
         {
             Types.Remove(entity.GroupFilterID);
             Changes.Remove(entity.GroupFilterID);
         }
     }
 }
Ejemplo n.º 3
0
 public GroupFilterRepository()
 {
     EndSaveCallback = obj =>
     {
         Types[obj.GroupFilterID] = obj.Types;
         Changes.AddOrUpdate(obj.GroupFilterID);
     };
     EndDeleteCallback = obj =>
     {
         Types.Remove(obj.GroupFilterID);
         Changes.Remove(obj.GroupFilterID);
     };
 }
Ejemplo n.º 4
0
 public void Delete(int id)
 {
     using (var session = JMMService.SessionFactory.OpenSession())
     {
         // populate the database
         using (var transaction = session.BeginTransaction())
         {
             GroupFilter cr = GetByID(id);
             if (cr != null)
             {
                 Cache.Remove(cr);
                 Changes.Remove(cr.GroupFilterID);
                 Types.Remove(cr.GroupFilterID);
                 session.Delete(cr);
                 transaction.Commit();
             }
         }
     }
 }