H
Hrvoje Voda
How to get a list of names from database into string array?
variable name should be string array...
This is the code I use...
public string GetFunctionName(Guid UserID)
{
sSelect = "";
string name="";
if (db!=null)
{
if (nGroupID.Length !=0)
{
for ( int iIndex = 0; iIndex < nGroupID.Length; iIndex++ )
{
if ( iIndex != 0 )
sSelect += " OR ";
sSelect += "GroupID ='" + nGroupID[ iIndex ].ToString () + "'";
}
DataRow[] FGrows = db.dataSetUsers.FunctionsGroups.Select(sSelect);
foreach (DataSetUsers.FunctionsGroupsRow row in FGrows)
{
DataSetUsers.FunctionsRow function =
db.dataSetUsers.Functions.FindByFunctionID( row.FunctionID );
name = function.Name ;
}
}
}
return name;
}
variable name should be string array...
This is the code I use...
public string GetFunctionName(Guid UserID)
{
sSelect = "";
string name="";
if (db!=null)
{
if (nGroupID.Length !=0)
{
for ( int iIndex = 0; iIndex < nGroupID.Length; iIndex++ )
{
if ( iIndex != 0 )
sSelect += " OR ";
sSelect += "GroupID ='" + nGroupID[ iIndex ].ToString () + "'";
}
DataRow[] FGrows = db.dataSetUsers.FunctionsGroups.Select(sSelect);
foreach (DataSetUsers.FunctionsGroupsRow row in FGrows)
{
DataSetUsers.FunctionsRow function =
db.dataSetUsers.Functions.FindByFunctionID( row.FunctionID );
name = function.Name ;
}
}
}
return name;
}