public object getParameter(string p_name, object default_val) { SBTableParameters table = new SBTableParameters(); Hashtable param = table.getRow(string.Format("key = '{0}'", p_name)); if (param == null) { return(default_val); } return(param["value"]); }
public bool addParameter(string p_name, object p_value) { SBTableParameters table = new SBTableParameters(); Hashtable param = new Hashtable(); param.Add("key", p_name); param.Add("value", p_value); param.Add("creation_date", DateTime.Now); table.insertRow(param); return(true); }
public void updateParameter(string name, object vvalue) { SBTableParameters table = new SBTableParameters(); Hashtable param = table.getRow(string.Format("key = '{0}'", name)); if (param == null) { this.addParameter(name, vvalue); } else { param["value"] = vvalue; table.updateRow(param); } }