예제 #1
0
        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;
		}