ExtrasDelRepositorio |
Superior Previo Próximo |
Objeto público '' Ejemplos de cómo acceder a las colecciones '' de repositorio para información de nivel de sistema
Sub RepositoryExtras
Dim o as object Dim idx as integer
'incidencias o = m_Repository.Issues.AddNew("Problem","Type") If(o.Update=false) Then Console.WriteLine (o.GetLastError()) End if o = nothing m_Repository.Issues.Refresh For idx = 0 to m_Repository.Issues.Count-1 Console.Writeline(m_Repository.Issues.GetAt(idx).Name) If(m_Repository.Issues.GetAt(idx).Name = "Problem") then m_Repository.Issues.DeleteAt(idx,false) Console.WriteLine("Delete Issues") End if Next
' ' tareas o = m_Repository.Tasks.AddNew("Task 1","Task type") If(o.Update=false) Then Console.WriteLine ("error - " + o.GetLastError()) End if o = nothing m_Repository.Tasks.Refresh For idx = 0 to m_Repository.Tasks.Count-1 COnsole.Writeline(m_Repository.Tasks.GetAt(idx).Name) If(m_Repository.Tasks.GetAt(idx).Name = "Task 1") then m_Repository.Tasks.DeleteAt(idx,false) Console.WriteLine("Delete Tasks") End if Next
' ' glosario o = m_Repository.Terms.AddNew("Term 1","business") If(o.Update=false) Then Console.WriteLine ("error - " + o.GetLastError()) End if o = nothing m_Repository.Terms.Refresh For idx = 0 to m_Repository.Terms.Count-1 COnsole.Writeline(m_Repository.Terms.GetAt(idx).Term) If(m_Repository.Terms.GetAt(idx).Term = "Term 1") then m_Repository.Terms.DeleteAt(idx,false) Console.WriteLine("Delete Terms") End if Next
'autores o = m_Repository.Authors.AddNew("Joe B","Writer") If(o.Update=false) Then Console.WriteLine (o.GetLastError()) End if o = nothing m_Repository.Authors.Refresh For idx = 0 to m_Repository.authors.Count-1 COnsole.Writeline(m_Repository.Authors.GetAt(idx).Name) If(m_Repository.authors.GetAt(idx).Name = "Joe B") then m_Repository.authors.DeleteAt(idx,false) Console.WriteLine("Delete Authors") End if Next
o = m_Repository.Clients.AddNew("Joe Sphere","Client") If(o.Update=false) Then Console.WriteLine (o.GetLastError()) End if o = nothing m_Repository.Clients.Refresh For idx = 0 to m_Repository.Clients.Count-1 COnsole.Writeline(m_Repository.Clients.GetAt(idx).Name) If(m_Repository.Clients.GetAt(idx).Name = "Joe Sphere") then m_Repository.Clients.DeleteAt(idx,false) Console.WriteLine("Delete Clients") End if Next
o = m_Repository.Resources.AddNew("Joe Worker","Resource") If(o.Update=false) Then Console.WriteLine (o.GetLastError()) End if o = nothing m_Repository.Resources.Refresh For idx = 0 to m_Repository.Resources.Count-1 COnsole.Writeline(m_Repository.Resources.GetAt(idx).Name) If(m_Repository.Resources.GetAt(idx).Name = "Joe Worker") then m_Repository.Resources.DeleteAt(idx,false) Console.WriteLine("Delete Resources") End if Next
End Sub |