コード例 #1
0
ファイル: ShadowParser.cs プロジェクト: Transcanada-TRPS/TBOT
        private void ParseNodePrices(XContainer xEle)
        {
            var i = 0;
            var resourceId =
                _context.HhResources.Single(s => s.ResourceName == xEle.Element(_sdNs + "NodeName").Value)
                    .ResourceID;
            var hhPdDetail = new HhShadowDetail[24];

            foreach (
                var ele in
                    xEle.Elements(_sdNs + "HourlyPrices"))
            {
                hhPdDetail[i] = new HhShadowDetail
                {
                    ResourceID = resourceId,
                    ScheHour = Convert.ToInt32(ele.Element(_sdNs + "DeliveryHour").Value),
                    ScheMW = Convert.ToDecimal(ele.Elements(_sdNs + "Prices").First(p => p.Element(_sdNs + "PriceType").Value.Equals("Energy"))
                            .Element(_sdNs + "MCP").Value)
                };
                _hhSdMain.HhShadowDetails.Add(hhPdDetail[i]);
                i++;
            }
        }
コード例 #2
0
		private void detach_HhShadowDetails(HhShadowDetail entity)
		{
			this.SendPropertyChanging();
			entity.HhShadowMain = null;
		}
コード例 #3
0
 partial void DeleteHhShadowDetail(HhShadowDetail instance);
コード例 #4
0
 partial void UpdateHhShadowDetail(HhShadowDetail instance);
コード例 #5
0
 partial void InsertHhShadowDetail(HhShadowDetail instance);
コード例 #6
0
		private void attach_HhShadowDetails(HhShadowDetail entity)
		{
			this.SendPropertyChanging();
			entity.HhResource = this;
		}