private int GetIntValue(object value) { int result = 0; if (null != value) { int.TryParse (value.ToString (), out result); } return result; }