private static RoomStandardOldItem ConvertToOld(RoomStandardItem souce) { var oldItem = new RoomStandardOldItem(); oldItem.RoomId = souce.RoomId; oldItem.JyouConditionLower = souce.JyouConditionLower; oldItem.JyouConditionUpper = souce.JyouConditionUpper; oldItem.ItemName = souce.ItemName; oldItem.Quantity = souce.Quantity; oldItem.UpdatedDateTime = souce.UpdatedDateTime; return(oldItem); }
private static RoomStandardNewItem ConvertToNew(RoomStandardItem souce) { var newItem = new RoomStandardNewItem(); newItem.RoomId = souce.RoomId; newItem.JyouConditionLower = souce.JyouConditionLower; newItem.JyouConditionUpper = souce.JyouConditionUpper; newItem.ItemName = souce.ItemName; newItem.Quantity = souce.Quantity; newItem.UpdatedDateTime = souce.UpdatedDateTime; return(newItem); }
public void Store(bool isUsingNew) { var now = DateTime.Now; this.UpdatedDateTime = now; base.Store(); RoomStandardItem.Delete(this.Id, isUsingNew); if (this.StandardItems != null) { foreach (var item in this.StandardItems) { item.RoomId = this.Id; item.UpdatedDateTime = now; item.Store(isUsingNew); } } }
public override void Drop() { RoomStandardItem.Delete(this.Id, true); RoomStandardItem.Delete(this.Id, false); base.Drop(); }