public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } OrderShipGroupId other = obj as OrderShipGroupId; if (other == null) { return(false); } return(true && Object.Equals(this.OrderId, other.OrderId) && Object.Equals(this.ShipGroupSeqId, other.ShipGroupSeqId) ); }
public virtual IOrderShipGroupState Get(long?shipGroupSeqId, bool forCreation, bool nullAllowed) { OrderShipGroupId globalId = new OrderShipGroupId(_orderState.OrderId, shipGroupSeqId); if (_loadedOrderShipGroupStates.ContainsKey(globalId)) { var state = _loadedOrderShipGroupStates[globalId]; if (this._orderState != null && this._orderState.ReadOnly == false) { ((IOrderShipGroupState)state).ReadOnly = false; } return(state); } if (forCreation || ForReapplying) { var state = new OrderShipGroupState(ForReapplying); state.OrderShipGroupId = globalId; _loadedOrderShipGroupStates.Add(globalId, state); if (this._orderState != null && this._orderState.ReadOnly == false) { ((IOrderShipGroupState)state).ReadOnly = false; } return(state); } else { var state = OrderShipGroupStateDao.Get(globalId, nullAllowed); if (state != null) { _loadedOrderShipGroupStates.Add(globalId, state); } if (this._orderState != null && this._orderState.ReadOnly == false) { ((IOrderShipGroupState)state).ReadOnly = false; } return(state); } }