public OpenInterestSummary(CommonOpenInterestSummary commonEntity,OpenInterestSummaryType type) { this._Type = type; this._ChildSummaryItems = new ObservableCollection<OpenInterestSummary>(); if (commonEntity != null) { this.Update(commonEntity); } }
internal void Update(CommonOpenInterestSummary openInterestSummary) { this._Id = openInterestSummary.Id; this._InstrumentId = openInterestSummary.InstrumentId; this._Code = openInterestSummary.Code; this._GroupId = openInterestSummary.GroupId; this._GroupCode = openInterestSummary.GroupCode; this._AccountType = openInterestSummary.AccountType; this._MinNumeratorUnit = openInterestSummary.MinNumeratorUnit; this._MaxDenominator = openInterestSummary.MaxDenominator; this._BuyLot = openInterestSummary.BuyLot; this._BuyAvgPrice = openInterestSummary.BuyAvgPrice; this._BuyContractSize = openInterestSummary.BuyContractSize; this._SellLot = openInterestSummary.SellLot; this._SellAvgPrice = openInterestSummary.SellAvgPrice; this._SellContractSize = openInterestSummary.SellContractSize; this._NetLot = openInterestSummary.NetLot; this._NetAvgPrice = openInterestSummary.NetAvgPrice; this._NetContractSize = openInterestSummary.NetContractSize; this._BuyLotMultiplyAvgPriceSum = openInterestSummary.BuyLot * decimal.Parse(openInterestSummary.BuyAvgPrice); this._SellLotMultiplyAvgPriceSum = openInterestSummary.SellLot * decimal.Parse(openInterestSummary.SellAvgPrice); this._NetLotMultiplyAvgPriceSum = openInterestSummary.NetLot * decimal.Parse(openInterestSummary.NetAvgPrice); this.CreateEmptySummary(); }