public static string ValueOfProperty(DataRow data, string propertyName)
{
foreach (DataRow property in data.GetChildRows("properties_property"))
{
if (property["name"].ToString().Equals(propertyName))
{
if (property["name"].ToString().Equals("master"))
{
if (property["value"].ToString().Equals("1"))
return "true";
if (property["value"].ToString().Equals("0"))
return "false";
}
return property["value"].ToString();
}
}
throw new PropertyNotFoundException(propertyName);
}