private void LoadSpecs(string planNo) { var specs = new HouseSpecs(); List <Setting> settings; using (var service = new SocketPlanServiceNoTimeout()) { var siyoCode = service.GetSiyoCode(Static.ConstructionCode, Utilities.ConvertPlanNo(planNo)); settings = new List <Setting>(service.GetSettings(Static.ConstructionCode, siyoCode)); specs.Kanabakari = service.GetKanabakari(Static.ConstructionCode, siyoCode); if (specs.Kanabakari == Const.Kanabakari._240) { specs.CeilingHeight_1F = Const.CeilingHeight._2400; specs.CeilingHeight_2F = Const.CeilingHeight._2400; } else if (specs.Kanabakari == Const.Kanabakari._260) { specs.CeilingHeight_1F = Const.CeilingHeight._2600; specs.CeilingHeight_2F = Const.CeilingHeight._2400; } else if (specs.Kanabakari == Const.Kanabakari._265) { specs.CeilingHeight_1F = Const.CeilingHeight._2650; specs.CeilingHeight_2F = Const.CeilingHeight._2500; } else { throw new ApplicationException(Messages.InvalidKanabakari(Static.HouseSpecs.Kanabakari)); } specs.HouseTypeCode = service.GetHouseTypeCode(Static.ConstructionCode, Utilities.ConvertPlanNo(planNo)); var gropuDetail = service.GetHouseTypeGroupDetail(Static.ConstructionTypeCode); if (gropuDetail != null) { specs.HouseTypeGroupId = gropuDetail.HouseTypeGroupId; } else { specs.HouseTypeGroupId = 0; } if (!Static.IsBeforeKakouIrai) { //加工依頼後だったら、太陽光関連の情報を取得する。 //加工依頼前は、特に使わないので、デフォ値で問題なし。 specs.ExistSolar = service.ExistSolar(Static.ConstructionCode); specs.PowerConditionerCount = service.GetPowerConditionerCount(Static.ConstructionCode); } } specs.ExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 1).Value); specs.CeilingReceiverExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 2).Value); specs.CeilingDepth1F = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 3).Value); specs.CeilingDepth2F = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 4).Value); specs.CeilingThickness1F = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 5).Value); specs.CeilingThickness2F = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 6).Value); specs.FloorThickness = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 7).Value); specs.ConnectorMaleExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 8).Value); specs.ConnectorFemaleExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 9).Value); specs.JBExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 10).Value); specs.BreakerExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 11).Value); specs.TerminalExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 12).Value); specs.DownLightExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 13).Value); specs.SolarSocketExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 15).Value); specs.PowerConExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 16).Value); specs.ConnectorHaikanMaleExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 17).Value); specs.ConnectorHaikanFemaleExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 18).Value); specs.HaikanTakeOutExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 19).Value); Static.HouseSpecs = specs; }