Esempio n. 1
0
        private bool SaveUserConfig()
        {
            bool result = false;

            try
            {
                UpdateAndwhoData data = new UpdateAndwhoData();
                int i = 0;
                //转移"网址设置表"数据
                DataTable dtWebsiteConfig = data.GetWebsiteConfig();
                i = data.InsertWebsiteConfig2NewAndwho(dtWebsiteConfig);
                //转移"设置表"数据
                DataTable dtConfig = data.GetConfig();
                i += data.InsertConfig2NewConfig(dtConfig);
                //转移"提醒表"数据
                DataTable dtTixing = data.GetTixing();
                i += data.InsertTixing2NewTixing(dtTixing);
                if (i > 0)
                {
                    result = true;
                }
            }
            catch
            {
            }
            return(result);
        }
Esempio n. 2
0
        private bool SaveUserConfig()
        {
            bool result = false;

            try
            {
                UpdateAndwhoData data = new UpdateAndwhoData();
                int i = 0;
                //转移"网址设置表"数据
                DataTable dtWebsiteConfig = data.GetWebsiteConfig();
                i = data.InsertWebsiteConfig2NewAndwho(dtWebsiteConfig);
                //转移"设置表"数据
                DataTable dtConfig = data.GetConfig();
                i += data.InsertConfig2NewConfig(dtConfig);
                //转移"提醒表"数据
                DataTable dtTixing = data.GetTixing();
                i += data.InsertTixing2NewTixing(dtTixing);
                //转移"定时表"数据
                DataTable dtDingshi = data.GetDingshi();
                i += data.InsertDingshi2NewDingshi(dtDingshi);
                if (i > 0)
                {
                    result = true;
                }
            }
            catch (Exception ex)
            {
                log.WriteLog(ex.ToString());
            }
            return(result);
        }