public object BaseTableIDToName(String Tablename, int? id, String column = "")
{
try
{
if (id == null)
return null;
else
{
if(String.IsNullOrEmpty(column))
return (String)(m_BaseData.Tables[String.Format("tb{0}", Tablename)].Select(String.Format("id = {0}", id))[0][Tablename]);
else
return (String)(m_BaseData.Tables[String.Format("tb{0}", Tablename)].Select(String.Format("id = {0}", id))[0][column]);
}
}
catch (Exception ex)
{
throw new Exception(String.Format("Error while searching for the name of <{0}> in table <tb{1}>", id.ToNString(), Tablename), ex);
}
}