Setting up an IDO method critical number drilldown
You can set up a drilldown for an IDO method-based critical number either by creating a new one or by copying an existing one and then modifying it.
An example of a custom load method for the
drilldown:
[IDOMethod( MethodFlags.CustomLoad, "" )]
public DataTable UserNamesDetail( DateTime AsOfDate, int DrillNum, int KpiNum, string Id,
string Parm1, string Parm2, string Parm3, string Parm4, string Parm5, string Parm6, string Parm7, string Parm8, string Parm9,
string Parm10, string Parm11, string Parm12, string Parm13, string Parm14, string Parm15, string Parm16, string Parm17, string Parm18, string Parm19,
string Parm20, string Parm21, string Parm22, string Parm23, string Parm24, string Parm25, string Parm26, string Parm27, string Parm28, string Parm29,
string Parm30, string Parm31, string Parm32, string Parm33, string Parm34, string Parm35, string Parm36, string Parm37, string Parm38, string Parm39,
string Parm40, string Parm41, string Parm42, string Parm43, string Parm44, string Parm45, string Parm46, string Parm47, string Parm48, string Parm49,
string Parm50 )
{
var dtResults = new DataTable();
using ( ApplicationDB appDB = IDORuntime.Context.CreateApplicationDB() )
{
using ( var cmd = appDB.CreateCommand() )
{
cmd.CommandType = CommandType.Text;
cmd.Connection = appDB.Connection;
cmd.CommandText = string.Concat( " SELECT un.Username, un.UserDesc, un.EditLevel, un.SuperUserFlag, un.Status ",
" FROM usernames un "
);
cmd.CommandText = IDORuntime.AppDataProvider.MassageQueryForProvider( cmd.CommandText );
using ( DbDataAdapter adapter = IDORuntime.AppDataProvider.CreateAdapter() )
{
adapter.SelectCommand = (DbCommand)cmd;
adapter.Fill( dtResults );
}
}
}
return dtResults;
}