public IEnumerable <TaskModelData> GetListDTO(List <TaskModelData> taskList, string withOutNameFile) { List <TaskModelData> listWithOutTeam = new List <TaskModelData>(); List <string> teamList = _jiraRepository.GetTeamApp(taskList.ToList().Select(o => o.appName).ToList()).ToList(); for (int x = 0; x < taskList.Count - 1; x++) { taskList[x].team = teamList[x]; } listWithOutTeam = taskList.Where(o => o.team == "" || o.team == null).ToList(); listWithOutTeam.ForEach(o => o.team = "Not Found"); _jsonService.SaveJson(withOutNameFile, listWithOutTeam); listWithOutTeam.ForEach(o => { taskList.Remove(o); }); AddNoTeamFileFilledIdExist(taskList, withOutNameFile); return(taskList); }
public bool FillAppNamesExcelFile() { List <string> team = new List <string>(); List <string> owner = new List <string>(); List <string> project = new List <string>(); try { IEnumerable <string> appList = _excelIOService.GetAllNamesInColumn("UpdateComponetsExcelFile", 1, 1, false).ToList(); team = _jiraRepository.GetTeamApp(appList).ToList(); owner = _jiraRepository.GetOwnerApp(appList).ToList(); project = _jiraRepository.GetProjectApp(appList).ToList(); team = team.Select(o => o == "" ? o = "?" : o).ToList(); owner = owner.Select(o => o == "" ? o = "?" : o).ToList(); project = project.Select(o => o == "" ? o = "?" : o).ToList(); _excelIOService.WriteListInColumn("UpdateComponetsExcelFile", 1, 2, team, false); _excelIOService.WriteListInColumn("UpdateComponetsExcelFile", 1, 3, project, false); _excelIOService.WriteListInColumn("UpdateComponetsExcelFile", 1, 4, owner, false); return(true); } catch { return(false); } }