Exemple #1
0
        /// <summary>
        /// 儲存代碼對照
        /// </summary>
        /// <param name="items"></param>
        /// <param name="type"></param>
        public void SetConfigDataItem(List <ConfigDataItem> items, string ConfigName)
        {
            //取得udt資料
            AccessHelper          accHelper = new AccessHelper();
            udt_ConfigData        data      = null;
            string                strQuery  = "config_name='" + ConfigName + "'";
            List <udt_ConfigData> datas     = accHelper.Select <udt_ConfigData>(strQuery);

            if (datas.Count > 0)
            {
                data = datas[0];
            }

            if (data == null)
            {
                data = new udt_ConfigData();
            }

            data.ConfigName = ConfigName;
            data.Content    = ConvertItemToXML(items).ToString();
            data.Save();
        }
        /// <summary>
        /// 儲存代碼對照
        /// </summary>
        /// <param name="items"></param>
        /// <param name="type"></param>
        public void SetConfigDataItem(List<ConfigDataItem> items,string ConfigName)
        {
            //取得udt資料
            AccessHelper accHelper = new AccessHelper();
            udt_ConfigData data = null;
            string strQuery = "config_name='" + ConfigName+"'";
            List<udt_ConfigData> datas = accHelper.Select<udt_ConfigData>(strQuery);

            if (datas.Count > 0)
                data = datas[0];

            if (data == null)
                data = new udt_ConfigData();

            data.ConfigName = ConfigName;
            data.Content = ConvertItemToXML(items).ToString();
            data.Save();
        }