public static bool HasHemsBundenban(string constructionCode)
        {
            var sql = @"
            SELECT * FROM ShikakuTableEntries
            WHERE
                ConstructionCode = '" + constructionCode + @"' AND
                ItemId = 81"; // 81:HEMS分電盤:有

            var db      = ShikakuTableEntry.GetDatabase();
            var entries = db.ExecuteQuery <ShikakuTableEntry>(sql);

            if (entries.Count == 0)
            {
                return(false);
            }

            var ari = entries[0];

            if (ari.Value == "True")
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public static void Delete(string constructionCode)
        {
            string sql = @"
                DELETE FROM ShikakuTableEntries
                WHERE
                    ConstructionCode = '" + constructionCode + "'";

            var db = ShikakuTableEntry.GetDatabase();

            db.ExecuteNonQuery(sql);
        }
        public static List <ShikakuTableEntry> Get(string constructionCode)
        {
            string sql = @"
                SELECT * FROM ShikakuTableEntries
                WHERE
                    ConstructionCode = '" + constructionCode + "'";

            var db = ShikakuTableEntry.GetDatabase();

            return(db.ExecuteQuery <ShikakuTableEntry>(sql));
        }
        public static string GetCompanyCode(string constructionCode)
        {
            var shikaku = ShikakuTableEntry.Get(constructionCode, 38);

            if (shikaku == null)
            {
                return(string.Empty);
            }

            var contract = ElectricContract.Get(shikaku.Value);

            if (contract == null)
            {
                return(string.Empty);
            }

            return(contract.CompanyCode);
        }