Esempio n. 1
0
 /// <summary>
 /// Adds a new phase
 /// </summary>
 /// <param name="phase"></param>
 /// <returns></returns>
 private UMLPhase AddPhase(UMLPhase phase)
 {
     foreach (UMLPhase p in Phases)
     {
         if (phase.Name == p.Name)
         {
             return(p);
         }
     }
     phase.Stereotype = Constants.UMLPhase.STEREOTYPE;
     Phases.Add(phase);
     return(phase);
 }
Esempio n. 2
0
        /// <summary>
        /// Loads the iterations and phases
        /// </summary>
        public void LoadPhasesIterationsExcel()
        {
            DataTable dtResult = new DataTable();

            dtResult = GetDataTable(_fileName, PHASE_SHEET, "Phase <> ''");
            UMLPackage pack = new UMLPackage();

            pack.Name  = "IterationsFaseImport";
            pack.Owner = _iterationModel;

            Packages.Add(pack);
            foreach (DataRow dr in dtResult.Rows)
            {
                UMLPhase phase = new UMLPhase();
                phase.Name  = dr["Phase"].ToString().Trim();
                phase.Owner = pack;
                phase       = AddPhase(phase);

                UMLIteration iteration = new UMLIteration();
                iteration.Name = dr["Name"].ToString().Trim();
                string[] usecasesName = dr["UseCaseList"].ToString().Split(',');
                foreach (string useCaseName in usecasesName)
                {
                    UMLUseCase useCase = new UMLUseCase();
                    useCase.Name = useCaseName.Trim();
                    useCase      = AddUseCase(useCase);
                    iteration.UseCases.Add(useCase);
                }

                //iteration.Owner = _logical;
                iteration.Owner = phase;
                iteration       = AddIteration(iteration);
                iteration.Prev  = getIterationByName(dr["Prev"].ToString());
                phase.Iterations.Add(iteration);
            }
        }