| 1234567891011121314151617181920212223242526272829303132333435363738394041 | 
							- namespace Comal.Stores
 
- {
 
- }
 
- //class CalendarStore : BaseStore<Calendar>
 
- //{
 
- //	protected override void BeforeSave(Calendar entity)
 
- //	{
 
- //		base.BeforeSave(entity);
 
- //		if (entity.IsActive)
 
- //		{
 
- //			var calendars = Load(new Filter<Calendar>(x => x.IsActive).IsEqualTo(true));  
 
- //               foreach (var calendar in calendars)
 
- //			{
 
- //				calendar.IsActive = false;
 
- //				Save(calendar, "Active Calendar Changed");
 
- //			}
 
- //		}
 
- //	}
 
- //       protected override void AfterSave(Calendar entity)
 
- //       {
 
- //           base.AfterSave(entity);
 
- //           var packets = FindSubStore<ManufacturingPacket>().Load(new Filter<ManufacturingPacket>(x => x.Issued).IsNotEqualTo(DateTime.MinValue).And(x => x.Completed).IsEqualTo(DateTime.MinValue), new SortOrder<ManufacturingPacket>(x => x.DueDate));
 
- //           foreach (var booking in entity.Bookings)
 
- //           {
 
- //               List<ManufacturingPacket> modified = new List<ManufacturingPacket>();
 
- //               var packet = packets.FirstOrDefault(x => x.ID.Equals(booking.Packet));
 
- //               if ((packet != null) && (packet.EstimatedDate != booking.End))
 
- //               {
 
- //                   packet.EstimatedDate = booking.End;
 
- //                   modified.Add(packet);
 
- //               }
 
- //               FindSubStore<ManufacturingPacket>().Save(modified, "Updated from Calendar");
 
- //           }
 
- //       }
 
- //   }
 
 
  |