public void CreateProject(AccountData account, ProjectData project) { Mantis_tests2.Mantis.MantisConnectPortTypeClient client = new Mantis_tests2.Mantis.MantisConnectPortTypeClient(); Mantis_tests2.Mantis.ProjectData projectData = new Mantis_tests2.Mantis.ProjectData(); projectData.id = project.Id; projectData.name = project.Title; projectData.description = project.Description; projectData.status.name = project.State; projectData.view_state.name = project.Visibility; projectData.inherit_global = project.InheritGlobalCategory; client.mc_project_add(account.Name, account.Password, projectData); }
public List <ProjectData> GetAllProjects(AccountData account) { Mantis_tests2.Mantis.MantisConnectPortTypeClient client = new Mantis_tests2.Mantis.MantisConnectPortTypeClient(); Mantis_tests2.Mantis.ProjectData[] projects = new Mantis_tests2.Mantis.ProjectData[] { }; projects = client.mc_projects_get_user_accessible(account.Name, account.Password); List <ProjectData> allProjects = new List <ProjectData>(); int projectCount = projects.Count(); for (int i = 0; i < projectCount; i++) { allProjects.Add(new ProjectData() { Id = projects[i].id, Title = projects[i].name, Description = projects[i].description, State = projects[i].status.name, Visibility = projects[i].view_state.name, InheritGlobalCategory = projects[i].inherit_global }); } return(allProjects); }