Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
                }
            }
        }
Example #4
0
 public override void Drop()
 {
     RoomStandardItem.Delete(this.Id, true);
     RoomStandardItem.Delete(this.Id, false);
     base.Drop();
 }