コード例 #1
0
 private static DataSet GetAllObjectForDataLookups(string strTableName, string strQueryColumn)
 {
     try
     {
         Type   businessObjectType = BusinessObjectFactory.GetBusinessObject(strTableName + "Info").GetType();
         string strQueryCommand    = string.Empty;
         if (businessObjectType != null)
         {
             if (businessObjectType.GetProperty("AAStatus") != null)
             {
                 strQueryCommand = string.Format("Select {0} From [{1}] Where [AAStatus]='Alive'", strQueryColumn, strTableName);
             }
             else
             {
                 strQueryCommand = string.Format("Select {0} From [{1}]", strQueryColumn, strTableName);
             }
         }
         else
         {
             strQueryCommand = string.Format("Select {0} From [{1}]", strQueryColumn, strTableName);
         }
         return(SqlDatabaseHelper.RunQuery(SqlDatabaseHelper.GetQuery(strQueryCommand)));
     }
     catch { }
     return(null);
 }