示例#1
0
        public void UpdateData()
        {
            Hashtable hs = new Hashtable();

            hs.Add("systemid", "00");
            hs.Add("configid", txtConfigId.Text);
            hs.Add("configname", txtConfigName.Text);
            hs.Add("configvalue", txtConfigValue.Text);
            hs.Add("remark", txtRemark.Text);
            try
            {
                int res = settingManager.UpdateConfigInfo(hs);
                if (res > -1)
                {
                    if (res == 0)
                    {
                        if (settingManager.AddConfigInfo(hs) > 0)
                        {
                            Notice(GetLangStr("SystemConfig20", "信息提示"), GetLangStr("SystemConfig23", "保存成功"));
                            txtConfigId.Disabled = true;
                            InsertLog();
                            GetSysContents("00");
                            ph = txtConfigId.Text;
                            pc = txtConfigName.Text;
                            pz = txtConfigValue.Text;
                            bz = txtRemark.Text;
                        }
                    }
                    else
                    {
                        Notice(GetLangStr("SystemConfig20", "信息提示"), GetLangStr("SystemConfig24", "更新成功"));
                        UpdataLog();
                        GetSysContents("00");
                    }
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("SystemConfig.aspx-UpdateData", ex.Message + ";" + ex.StackTrace, "UpdateData has an exception");
            }
        }