public void SetGlobalProp(string name, string value) { var gvars = settings.GetAll().Where(x => x.Propertyname == name); if (gvars.Count() > 0) { DBSettings gvar = gvars.First(); gvar.Value = value; settings.Update(gvar); } else { var gvar = new DBSettings(); gvar.Propertyname = name; gvar.Value = value; settings.Insert(gvar); } }
public string GetGlobalProp(string name) { try { var gvars = settings.GetAll().Where(x => x.Propertyname.Equals(name)); if (gvars.Count() > 0) { DBSettings gvar = gvars.First(); return(gvar.Value); } } catch (Exception e) { log.Error("Error: GetGlobalProp: " + e); } return(""); }