public void SetSettingValue(ProSettings vKey, string vValue) { string query = @"Update ProjectSettings SET KeyValue='{1}' where ProjectKey='{0}' "; try { new Database(connectionstring).ExecuteNonQueryOnly(string.Format(query, vKey.ToString(), vValue)); } catch (Exception exc) { throw exc; } }
public string GetSettingValue(ProSettings vKey) { string query = @"SELECT KeyValue from ProjectSettings where ProjectKey='{0}' "; DataSet ds = new DataSet(); try { ds = new Database(connectionstring).ExecuteForDataSet(string.Format(query, vKey.ToString())); if (ds.Tables[0].Rows.Count > 0) { return(ds.Tables[0].Rows[0][0].ToString()); } else { return(string.Empty); } } catch (Exception exc) { throw exc; } }