Code: Select all
int ret = -1;
string authTicket;
Dragnet.MantisProject[] Projects;
Dragnet.DragnetWebService dws = new Dragnet.DragnetWebService();
ret = dws.LoginPlainText("Dashboard", "dashboard", out authTicket);
if (0 == ret)
{
dws.DragnetAuthValue = new Dragnet.DragnetAuth();
dws.DragnetAuthValue.Token = authTicket;
// get a list of projects
ret = dws.ListProjects(out Projects);
foreach (Dragnet.MantisProject current in Projects)
{
if (current.Active)
{
// get all the incidents in this project
Dragnet.MantisItemQueryFilter qf = new Dragnet.MantisItemQueryFilter();
Dragnet.MantisItemExpanded[] items;
qf.Projects[0] = current.ID;
ret = dws.QueryItems(qf, true, out items);
}
}
}
Thanks
Marc