public static IList<string> getValues(string headerText, string strgKey)
        {
            List<string> ret = new List<string>();
            DataTable tbl = null;

            //DBから読み込む
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

                tbl = dao.selectSettingRows(headerText, strgKey);

                con.CloseConnection();

            }

            if (tbl != null)
            {
                foreach (DataRow row in tbl.Rows)
                {
                    ret.Add(row["TEXTVALUE"].ToString());
                }
            }

            return ret;
        }
 public static bool isExistsHeader(DAOContext con, string headerText)
 {
     if (con.Connection.State != ConnectionState.Open) return false;
     bool ret = false;
     MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
     ret = dao.isExistsHeader(headerText);
     return ret;
 }
        public static void deleteSettings(DAOContext con, string headerText)
        {

            //DBから読み込む
            MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

            dao.deleteSettings(headerText);
            dao.deleteHeader(headerText);

        }
 public static void deleteSettings(string headerText, string strgKey)
 {
     using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
     {
         con.OpenConnection();
         MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
         dao.deleteSettings(headerText, strgKey);
         con.CloseConnection();
     }
 }
 public static void MergeHeader(string headerText)
 {
     using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
     {
         con.OpenConnection();
         MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
         dao.mergeHeader(headerText);
         con.CloseConnection();
     }
 }
        public static void setValue(string headerText, string strgKey, int intValue)
        {
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
                dao.mergeSettings(headerText, strgKey, intValue);
                con.CloseConnection();
            }

        }
        public static string getValue(DAOContext con, string headerText, string strgKey)
        {
            string strgValue = "";
            if (con.Connection.State != ConnectionState.Open) return "";

            //DBから読み込む
            MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

            dao.selectSetting(headerText, strgKey, out strgValue);

            return strgValue;
        }
        public static void getValue(DAOContext con, string headerText, string strgKey, out int intValue)
        {
            intValue = 0;
            if (con.Connection.State != ConnectionState.Open) return;


            //DBから読み込む
            MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

            dao.selectSetting(headerText, strgKey, out intValue);

        }
 public static bool isExistsHeader(string headerText)
 {
     bool ret = false;
     using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
     {
         con.OpenConnection();
         MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
         ret = dao.isExistsHeader(headerText);
         con.CloseConnection();
     }
     return ret;
 }
        public static void setStringValues(DAOContext con, string headerText, string strgKey, IList<string> strgs)
        {
            if (con.Connection.State != ConnectionState.Open) return;
            int no = 1;
            MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

            dao.deleteSettings(headerText, strgKey);

            foreach (string strg in strgs)
            {
                dao.insertNew(headerText, strgKey, no, strg);
                no++;
            }
        }
        public static string getValue(string headerText, string strgKey)
        {
            string strgValue = "";

            //DBから読み込む
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

                dao.selectSetting(headerText, strgKey, out strgValue);

                con.CloseConnection();

            }
            return strgValue;
        }
        public static IList<string> getHeaderTexts(DAOContext con)
        {
            List<string> headertexts = new List<string>();
            DataTable tbl = null;
            //DBから読み込む
            MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

            tbl = dao.selectHeaders();

            if (tbl != null)
            {
                foreach (DataRow row in tbl.Rows)
                {
                    headertexts.Add(row["HEADERTEXT"].ToString());
                }
            }
            return headertexts;
        }
        public static void setStringValues(string headerText, string strgKey, IList<string> strgs)
        {
            int no = 1;
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

                dao.deleteSettings(headerText, strgKey);

                foreach (string strg in strgs)
                {
                    dao.insertNew(headerText, strgKey, no, strg);
                    no++;
                }

                con.CloseConnection();
            }

        }
        public static IList<string> getValues(DAOContext con, string headerText, string strgKey)
        {
            List<string> ret = new List<string>();
            DataTable tbl = null;

            if (con.Connection.State != ConnectionState.Open) return ret;

            //DBから読み込む
            MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

            tbl = dao.selectSettingRows(headerText, strgKey);

            if (tbl != null)
            {
                foreach (DataRow row in tbl.Rows)
                {
                    ret.Add(row["TEXTVALUE"].ToString());
                }
            }

            return ret;
        }
        public static IList<string> getHeaderTexts()
        {
            List<string> headertexts = new List<string>();
            DataTable tbl = null;
            //DBから読み込む
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

                tbl = dao.selectHeaders();

                con.CloseConnection();
            }

            if (tbl != null)
            {
                foreach (DataRow row in tbl.Rows)
                {
                    headertexts.Add(row["HEADERTEXT"].ToString());
                }
            }
            return headertexts;
        }
 public static void deleteSettings(string headerText, string strgKey)
 {
     using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
     {
         con.OpenConnection();
         MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
         dao.deleteSettings(headerText, strgKey);
         con.CloseConnection();
     }
 }
 public static void setValue(string headerText, string strgKey, int intValue)
 {
     using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
     {
         con.OpenConnection();
         MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
         dao.mergeSettings(headerText,strgKey, intValue);
         con.CloseConnection();
     }
 }
        public static void setStringValus(string headerText, string strgKey, IList<string> strgs)
        {
            int no = 1;
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

                dao.deleteSettings(headerText, strgKey);

                foreach (string strg in strgs)
                {
                    dao.insertNew(headerText, strgKey, no, strg);
                    no++;
                }

                con.CloseConnection();
            }
        }
 public static void MergeHeader(string headerText)
 {
     using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
     {
         con.OpenConnection();
         MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
         dao.mergeHeader(headerText);
         con.CloseConnection();
     }
 }
 public static bool isExistsHeader(string headerText)
 {
     bool ret = false;
     using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
     {
         con.OpenConnection();
         MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
         ret = dao.isExistsHeader(headerText);
         con.CloseConnection();
     }
     return ret;
 }
        public static void getValue(string headerText, string strgKey, out int intValue)
        {
            intValue = 0;

            //DBから読み込む
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

                dao.selectSetting(headerText, strgKey, out intValue);

                con.CloseConnection();

            }
        }
        public static IList<string> getStringValues(string headerText, string strgKey)
        {
            List<string> ret = new List<string>();
            DataTable tbl = null;

            //DBから読み込む
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

                tbl = dao.selectSettingRows(headerText, strgKey);

                con.CloseConnection();

            }

            if (tbl != null)
            {
                foreach (DataRow row in tbl.Rows)
                {
                    ret.Add(row["TEXTVALUE"].ToString());
                }
            }

            return ret;
        }
        public static string getStringValue(string headerText, string strgKey)
        {
            string strgValue = "";

            //DBから読み込む
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

                dao.selectSetting(headerText, strgKey, out strgValue);

                con.CloseConnection();

            }
            return strgValue;
        }
        public static IList<string> getHeaderTexts()
        {
            List<string> headertexts = new List<string>();
            DataTable tbl = null;
            //DBから読み込む
            using (DAOContext con = new DAOContext(AccessConstring.SettingConString))
            {
                con.OpenConnection();
                MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);

                tbl = dao.selectHeaders();

                con.CloseConnection();
            }

            if (tbl != null)
            {
                foreach (DataRow row in tbl.Rows)
                {
                    headertexts.Add(row["HEADERTEXT"].ToString());
                }
            }
            return headertexts;
        }
 public static void deleteSettings(DAOContext con, string headerText, string strgKey)
 {
     if (con.Connection.State != ConnectionState.Open) return;
     MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
     dao.deleteSettings(headerText, strgKey);
 }
 public static void MergeHeader(DAOContext con, string headerText)
 {
     if (con.Connection.State != ConnectionState.Open) return;
     MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
     dao.mergeHeader(headerText);
 }
 public static void setValue(DAOContext con, string headerText, string strgKey, string strgValue)
 {
     if (con.Connection.State != ConnectionState.Open) return;
     MyDummySQLSettingsDAO dao = new MyDummySQLSettingsDAO(con);
     dao.mergeSettings(headerText, strgKey, strgValue);
 }