/// <summary> /// 根据模块号和Key索引临时表的Value /// </summary> private string GetValue(string moduleCateStr, string keyStr) { DataRow[] drs = TableSysParameter.Select(string.Format("ModuleCate = '{0}' and ParameterKey = '{1}'", moduleCateStr, keyStr)); if (drs.Length == 0) { return(""); } else { return(DataTypeConvert.GetString(drs[0]["ParameterValue"])); } }
/// <summary> /// 根据模块号和Key索引设定Value值 /// </summary> private void SetValue(string moduleCateStr, string keyStr, string valueStr) { DataRow[] drs = TableSysParameter.Select(string.Format("ModuleCate = '{0}' and ParameterKey = '{1}'", moduleCateStr, keyStr)); if (drs.Length > 0) { drs[0]["ParameterValue"] = valueStr; } else { DataRow dr = TableSysParameter.NewRow(); dr["ModuleCate"] = moduleCateStr; dr["ParameterKey"] = keyStr; dr["ParameterValue"] = valueStr; TableSysParameter.Rows.Add(dr); } }