コード例 #1
0
        private void Update(IDBRow tradePolicyDetailRow, SpecialTradePolicy specialTradePolicy)
        {
            this.instrumentId       = (Guid)tradePolicyDetailRow["InstrumentID"];
            this.autoLimitBase      = (OrderLevelRiskBase)tradePolicyDetailRow["AutoLimitBase"];
            this.autoLimitThreshold = (decimal)tradePolicyDetailRow["AutoLimitThreshold"];
            this.autoStopBase       = (OrderLevelRiskBase)tradePolicyDetailRow["AutoStopBase"];
            this.autoStopThreshold  = (decimal)tradePolicyDetailRow["AutoStopThreshold"];

            this.isFractionCommissionOn = (bool)tradePolicyDetailRow["IsFractionCommissionOn"];
            this.commissionOpen         = (decimal)tradePolicyDetailRow["CommissionOpen"];
            this.commissionCloseD       = (decimal)tradePolicyDetailRow["CommissionCloseD"];
            this.commissionCloseO       = (decimal)tradePolicyDetailRow["CommissionCloseO"];

            this.isFractionLevyOn = (bool)tradePolicyDetailRow["IsFractionLevyOn"];
            this.levyOpen         = (decimal)tradePolicyDetailRow["LevyOpen"];
            this.levyClose        = (decimal)tradePolicyDetailRow["LevyClose"];

            this.cgseNewLevyMultipler   = (decimal)tradePolicyDetailRow["CGSENewLevyMultipler"];
            this.cgseCloseLevyMultipler = (decimal)tradePolicyDetailRow["CGSECloseLevyMultipler"];
            this.cgseNewLevyRemainder   = (decimal)tradePolicyDetailRow["CGSENewLevyRemainder"];
            this.cgseCloseLevyRemainder = (decimal)tradePolicyDetailRow["CGSECloseLevyRemainder"];
            this.cgseLevyCurrecyType    = (CGSELevyCurrecyType)Enum.ToObject(CGSELevyCurrecyType.GetType(), tradePolicyDetailRow["CGSELevyCurrecyType"]);

            specialTradePolicy.Add(this);
        }
コード例 #2
0
        internal void Update(XElement tradePolicyDetailNode, SpecialTradePolicy specialTradePolicy)
        {
            this.specialTradePolicy.Remove(this);

            this.InternalUpdate(tradePolicyDetailNode, specialTradePolicy);

            specialTradePolicy.Add(this);
        }
コード例 #3
0
        private void InternalUpdate(XElement tradePolicyDetailNode, SpecialTradePolicy specialTradePolicy)
        {
            foreach (XAttribute attribute in tradePolicyDetailNode.Attributes())
            {
                switch (attribute.Name.ToString())
                {
                case "InstrumentID":
                    this.instrumentId = XmlConvert.ToGuid(attribute.Value);
                    break;

                case "AutoLimitBase":
                    this.autoLimitBase = (OrderLevelRiskBase)XmlConvert.ToInt32(attribute.Value);
                    break;

                case "AutoLimitThreshold":
                    this.autoLimitThreshold = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "AutoStopBase":
                    this.autoStopBase = (OrderLevelRiskBase)XmlConvert.ToInt32(attribute.Value);
                    break;

                case "AutoStopThreshold":
                    this.autoStopThreshold = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "IsFractionCommissionOn":
                    this.isFractionCommissionOn = XmlConvert.ToBoolean(attribute.Value);
                    break;

                case "CommissionOpen":
                    this.commissionOpen = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "CommissionCloseD":
                    this.commissionCloseD = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "CommissionCloseO":
                    this.commissionCloseO = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "IsFractionLevyOn":
                    this.isFractionLevyOn = XmlConvert.ToBoolean(attribute.Value);
                    break;

                case "LevyOpen":
                    this.levyOpen = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "LevyClose":
                    this.levyClose = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "CGSENewLevyMultipler":
                    this.cgseNewLevyMultipler = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "CGSECloseLevyMultipler":
                    this.cgseCloseLevyMultipler = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "CGSENewLevyRemainder":
                    this.cgseNewLevyRemainder = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "CGSECloseLevyRemainder":
                    this.cgseCloseLevyRemainder = XmlConvert.ToDecimal(attribute.Value);
                    break;

                case "CGSELevyCurrecyType":
                    this.cgseLevyCurrecyType = (CGSELevyCurrecyType)XmlConvert.ToInt32(attribute.Value);
                    break;
                }
            }
        }
コード例 #4
0
 internal SpecialTradePolicyDetail(XElement tradePolicyDetailNode, SpecialTradePolicy specialTradePolicy)
 {
     this.specialTradePolicy = specialTradePolicy;
     this.InternalUpdate(tradePolicyDetailNode, specialTradePolicy);
 }
コード例 #5
0
 internal SpecialTradePolicyDetail(IDBRow tradePolicyDetailRow, SpecialTradePolicy specialTradePolicy)
 {
     this.specialTradePolicy = specialTradePolicy;
     this.Update(tradePolicyDetailRow, specialTradePolicy);
 }