public override EAP_STATUS stdPopulateTable()
        {
            EAP_STATUS status = EAP_STATUS.OK;
            string     fields = "name_short, name_long, description";
            string     values;
            string     name_short;
            string     name_long;
            string     description;

            name_short  = "'R'";
            name_long   = "'R - Research Project/WP'";
            description = "'Work package or Project that is needed to be finshied to find a suitable solution and identify and remove extensive risks. When a reaserch project is finished it shall be possible to make a decission if to start a Technology Project and supply, benefits, specifications, estimations and risks'";
            values      = name_short + ", " + name_long + ", " + description;
            status      = this.addRow(fields, values);

            name_short  = "'T'";
            name_long   = "'T - Technology Project/WP'";
            description = "'Work package or Project that develops a new part/feature/functionality that is reusable for different products. If a corresponding R-project/WP is needed, that needs to be finished before the T-Project/WP can be started. The T-Project/WP needs to be finshed on the latest at the time when the first P-Project that features the Technology is production start.'";
            values      = name_short + ", " + name_long + ", " + description;
            status      = this.addRow(fields, values);

            name_short  = "'P'";
            name_long   = "'P - Product Project/WP'";
            description = "'Work package or Project that reusults in a product beeing launched.'";
            values      = name_short + ", " + name_long + ", " + description;
            status      = this.addRow(fields, values);

            name_short  = "'M'";
            name_long   = "'M - Maintainance Project/WP'";
            description = "'Work package or Project for maintenance work. Typically added as one project/WP per maintenance type and year.'";
            values      = name_short + ", " + name_long + ", " + description;
            status      = this.addRow(fields, values);

            return(status);
        }
        public EAP_STATUS addCalenderItem(int aCalId, int aWPId, string date)
        {
            EAP_STATUS status = EAP_STATUS.OK;

            string fields = "calId, wpId, calItemEndTime, calItemCreated";
            string values;
            string created = "UTC_TIMESTAMP()";

            values = aCalId.ToString() + ", " + aWPId.ToString() + ", '" + date + "'," + created;
            status = this.addRow(fields, values);



            return(status);
        }
Exemple #3
0
        public EAP_STATUS addJob(int aWPId, int aCompId, string aComment, ref int newJobId)
        {
            EAP_STATUS status = EAP_STATUS.OK;
            string     fields = "wpId, compId, jobComment, jobCreated, jobModified";
            string     values;
            string     created;
            string     modified;

            created  = "UTC_TIMESTAMP()";
            modified = "UTC_TIMESTAMP()";

            values = aWPId.ToString() + ", " + aCompId.ToString() + ", " + aComment + ", " + created + ", " + modified;
            status = this.addRow(fields, values, ref newJobId);

            return(status);
        }
Exemple #4
0
        public EAP_STATUS addCalender(string aName, string aDescription, ref int newCalenderId)
        {
            EAP_STATUS status = EAP_STATUS.OK;
            string     fields = "calName, calDescription, calCreated, calModified";
            string     values;
            string     created;
            string     modified;

            created  = "UTC_TIMESTAMP()";
            modified = "UTC_TIMESTAMP()";

            values = aName + ", " + aDescription + ", " + created + ", " + modified;
            status = this.addRow(fields, values, ref newCalenderId);

            return(status);
        }
Exemple #5
0
        public EAP_STATUS addEstimation(int aJobId, UInt16 aNbrHours, UInt16 aNbrMonths, UInt16 endOffsetMonths = 0, string dateCreatedString = "")
        {
            EAP_STATUS status = EAP_STATUS.OK;

            string fields = "jobId, estPeriod, estType, hours, estCreated";
            string values;
            int    jobId = aJobId;
            int    timePeriod;
            string estType = "'LIKELY'";
            string hours;
            string created = "UTC_TIMESTAMP()";


            // Validate in parameters
            if (MAX_NR_HOURS < aNbrHours)
            {
                aNbrHours = MAX_NR_HOURS;
            }
            if (MAX_NR_MONTHS < aNbrMonths)
            {
                aNbrMonths = MAX_NR_MONTHS;
            }
            if (MAX_NR_MONTHS < (aNbrMonths + endOffsetMonths))
            {
                endOffsetMonths = (UInt16)(MAX_NR_MONTHS - aNbrMonths);
            }

            // set created date if explicitly set
            if ("" != dateCreatedString)
            {
                created = dateCreatedString;
            }

            jobId  = aJobId;
            status = this.distributeEstimate(aNbrHours, aNbrMonths, distributionEnum.EVEN, endOffsetMonths);
            for (int i = 35; i >= 0; i--)
            {
                if ((EAP_STATUS.OK == status) && (monthEst[i] != 0))
                {
                    timePeriod = i + 1;
                    hours      = (monthEst[i]).ToString();
                    values     = jobId + ", " + timePeriod + ", " + estType + ", " + hours + ", " + created;
                    status     = this.addRow(fields, values);
                }
            }
            return(status);
        }
        protected EAP_STATUS addRow(string fields, string values)
        {
            EAP_STATUS   status = EAP_STATUS.OK;
            MySqlCommand cmd    = connection.CreateCommand();

            cmd.CommandText = "INSERT INTO " + tableName + " (" + fields + ") VALUES (" + values + ")";
            try
            {
                cmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                status = EAP_STATUS.ADD_ROW_FAILED;
            }
            return(status);
        }
        public virtual EAP_STATUS createTable()
        {
            EAP_STATUS   status = EAP_STATUS.OK;
            MySqlCommand cmd    = connection.CreateCommand();

            cmd.CommandText = "CREATE TABLE IF NOT EXISTS " + tableName + "(" + columns + keys + ")";
            try
            {
                cmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                status = EAP_STATUS.CREATE_TABLE_FAILED;
            }
            return(status);
        }
Exemple #8
0
        public virtual EAP_STATUS createView()
        {
            EAP_STATUS   status = EAP_STATUS.OK;
            MySqlCommand cmd    = connection.CreateCommand();

            cmd.CommandText = "CREATE VIEW " + viewName + " AS (" + cmdString + ")";
            try
            {
                cmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                status = EAP_STATUS.CREATE_VIEW_FAILED;
            }
            return(status);
        }
        public override EAP_STATUS stdPopulateTable()
        {
            EAP_STATUS status = EAP_STATUS.OK;
            string     fields = "compName, compDescription";
            string     values;
            string     name;
            string     description;

            name        = "'Software Design'";
            description = "'Software design and implementation'";
            values      = name + ", " + description;
            status      = this.addRow(fields, values);

            name        = "'System Verification'";
            description = "'Software test and system verification'";
            values      = name + ", " + description;
            status      = this.addRow(fields, values);

            name        = "'Mechanical Design'";
            description = "'Mechanical design and implementation'";
            values      = name + ", " + description;
            status      = this.addRow(fields, values);

            name        = "'Electronics Design'";
            description = "'Electronics design and implementation'";
            values      = name + ", " + description;
            status      = this.addRow(fields, values);

            name        = "'Technical Information '";
            description = "'Manuals, online help, application texts'";
            values      = name + ", " + description;
            status      = this.addRow(fields, values);

            name        = "'Project Management'";
            description = "'Project management for driving the project'";
            values      = name + ", " + description;
            status      = this.addRow(fields, values);

            return(status);
        }
        public EAP_STATUS addWP(int aWPType, string aWPName, string aWPDescription, ref int newWPId)
        {
            EAP_STATUS status = EAP_STATUS.OK;
            string     fields = "wpTypeId, wpName, wpDescription, wpCreated, wpModified";
            string     values;
            string     wpTypeId;
            string     wpName;
            string     wpDescription;
            string     created;
            string     modified;

            created  = "UTC_TIMESTAMP()";
            modified = "UTC_TIMESTAMP()";

            wpTypeId      = aWPType.ToString();
            wpName        = aWPName;
            wpDescription = aWPDescription;
            values        = wpTypeId + ", " + wpName + ", " + wpDescription + ", " + created + ", " + modified;
            status        = this.addRow(fields, values, ref newWPId);


            return(status);
        }
Exemple #11
0
        public EAP_STATUS createNewStdDatabase(String aDataBaseName)
        {
            EAP_STATUS status = EAP_STATUS.OK;

            status = this.createNewEmptyDatabase(aDataBaseName);
            if (EAP_STATUS.OK == status)
            {
                //status = this.populateStdWPTypesTable();
                cEAPWSProjectTypesTable projectTypesTable = new cEAPWSProjectTypesTable(m_DatabaseConnection);
                status = projectTypesTable.stdPopulateTable();
            }
            if (EAP_STATUS.OK == status)
            {
                //status = this.populateStdCompetenceTypesTable();
                cEAPWSCompetenceTypesTable competenceTypesTable = new cEAPWSCompetenceTypesTable(m_DatabaseConnection);
                status = competenceTypesTable.stdPopulateTable();
            }

            if (EAP_STATUS.OK == status)
            {
                //status = this.populateStdEndTimeTables();
            }
            return(status);
        }
Exemple #12
0
        public override EAP_STATUS createTable()
        {
            EAP_STATUS status = EAP_STATUS.OK;

            base.createTable();

            string fields = "timePeriodDescription";
            string values;
            string description;

            if (EAP_STATUS.OK == status)
            {
                description = "'M1'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M2'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M3'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M4'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M5'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M6'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M7'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M8'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M9'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M10'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M11'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M12'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M13'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M14'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M15'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M16'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M17'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M18'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M19'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M20'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M21'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M22'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M23'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M24'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M25'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M26'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M27'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M28'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M29'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M30'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M31'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M32'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M33'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M34'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M35'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            if (EAP_STATUS.OK == status)
            {
                description = "'M36'";
                values      = description;
                status      = this.addRow(fields, values);
            }
            return(status);
        }
Exemple #13
0
        public virtual EAP_STATUS stdPopulateTable()
        {
            EAP_STATUS status = EAP_STATUS.OK;

            return(status);
        }
Exemple #14
0
        public EAP_STATUS populateDatabaseWithExamples(String aDataBaseName)
        {
            EAP_STATUS status         = EAP_STATUS.OK;
            int        lastAddedWPId  = 0;
            int        lastAddedJobId = 0;

            const int compSW       = 1;
            const int compSysVer   = 2;
            const int compMech     = 3;
            const int compElec     = 4;
            const int compTechInfo = 5;
            const int compProj     = 6;

            const int wpTypeR = 1;
            const int wpTypeT = 2;
            const int wpTypeP = 3;
            const int wpTypeM = 4;

            int calenderAgressive = 0;
            int calenderSafe      = 0;


            cEAPWSWPTable           wpTable           = new cEAPWSWPTable(m_DatabaseConnection);
            cEAPWSJobsTable         jobsTable         = new cEAPWSJobsTable(m_DatabaseConnection);
            cEAPWSEstTimesTable     estTimesTable     = new cEAPWSEstTimesTable(m_DatabaseConnection);
            cEAPWSCalenderTable     calenderTable     = new cEAPWSCalenderTable(m_DatabaseConnection);
            cEAPWSCalenderItemTable calenderItemTable = new cEAPWSCalenderItemTable(m_DatabaseConnection);

            if (EAP_STATUS.OK == status)
            {
                status = calenderTable.addCalender("'PM -Agressive'", "'Product Managers aggresiv suggestion for product/project roadmap'", ref calenderAgressive);
            }
            if (EAP_STATUS.OK == status)
            {
                status = calenderTable.addCalender("'PM -Safe'", "'Product Managers safe suggestion for product/project roadmap'", ref calenderSafe);
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeR, "'R - Brushless Main Motor'", "'Research if it is feasible from a cost and performance perspective to use a brushless main motor. If so the project shall have a recommendation of supplier and a specific motor'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "'Work for implemetation of test sw for lab purposes'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 80, 2, 0, "20160824120000");
                    }
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 80, 2);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compElec, "'Work for evaluating different options regarding brushless main motor'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 800, 6);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Small follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 25, 6);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD CALENDER ITEM ******************
                    DateTime date = new DateTime(2016, 01, 23, 12, 0, 0);
                    date   = date.ToUniversalTime();
                    status = calenderItemTable.addCalenderItem(calenderAgressive, lastAddedWPId, date.ToString());
                }
            }

            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeR, "'R - RFID identification of accessories'", "'Research if it is feasible from a cost and performance perspective to use RFID to detect differnt attached accessories. Identify associated/possible features. Evaluate customer value.'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "'Work for implemetation of test sw for lab purposes, Workshops for feature identification'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 200, 3);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compElec, "'Work for evaluating different options regarding RFID identification'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 800, 6);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 80, 6);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeR, "'R - Blender drive line  Gen 4'", "'Research a solution for a new drive line (motor, transmission) lighter, longer life, higher speed and more torque. Evaluate customer value.'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "'Work for for investigating, specifying and elimanate risks'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 2000, 12);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 160, 12);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeR, "'R - Blender cover set  Gen 4'", "'Research a solution for a new cover set. Module, reusable for many models and a modern look'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "'Work for for investigating, preliminar design, specifying and elimanate risks'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 2000, 12);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 160, 12);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeT, "'T - Brushless main motor'", "'Develop technology for first use in a product accordint to specification decided based on coresponding R-project'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "'Work for implemetation of driver of brushless main motor'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 800, 6, 3);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "'Work for verification of quality and usability of brushless main motor'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 300, 2, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 200, 6, 6);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compElec, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 800, 6, 6);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 80, 1, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 240, 12);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeT, "'T - RFID identification of accessories'", "'Develop technology for first use in a product according to specification decided based on coresponding R-project. Includes development/modofocation of 3 accesories to use RFID'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 800, 6, 3);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 80, 2, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 800, 6, 6);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compElec, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 800, 6, 6);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 180, 3, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 240, 12);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeT, "'T - Facelift Main Cover Design'", "'Complete new cover set'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 30, 8, 4);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 800, 8, 6);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 10, 4);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeT, "'T - Battery Low warning to App'", "'Add battery low warning to existing apps for ios and android'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 100, 2, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 20, 1, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Tiny follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 5, 2, 0);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeP, "'P - Blender Gen 2 Low-Range classic'", "'Facelift of existing model'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 2, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 200, 6, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 400, 6, 3);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 2, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 100, 9, 0);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeP, "'P - Blender Gen 2 Mid-Range classic'", "'Facelift of existing model'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 2, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 200, 6, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 400, 6, 3);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 2, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 100, 9, 0);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeP, "'P - Blender Gen 2 High-Range classic'", "'Facelift of existing model'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 2, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 200, 6, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 400, 6, 3);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 2, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 100, 9, 0);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeP, "'P - Blender Gen 3 Low-Range'", "'New model on platform Gen 3'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 2, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 300, 6, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 400, 6, 3);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 200, 2, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 300, 9, 0);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeP, "'P - Blender Gen 3 Mid-Range'", "'New model on platform Gen 3'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 2, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 300, 6, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 400, 6, 3);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 200, 2, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 300, 9, 0);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeP, "'P - Blender Gen 3 High-Range'", "'New model on platform Gen 3'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 120, 2, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 300, 6, 1);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 400, 6, 3);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 200, 2, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compProj, "'Medium follow up work'", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 300, 9, 0);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeM, "'M - Product Maintenance Blenders Gen 2'", "'Planned Maintenance for 3 years after launch'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 180, 36, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 180, 36, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 360, 36, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 72, 36, 0);
                    }
                }
            }
            if (EAP_STATUS.OK == status)
            {
                // ****** ADD WORKPACKAGE ******************
                status = wpTable.addWP(wpTypeM, "'M - Product Maintenance Blenders Gen 3'", "'Planned Maintenance for 3 years after launch'", ref lastAddedWPId);
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSW, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 360, 36, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compSysVer, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 240, 36, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compMech, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 360, 36, 0);
                    }
                }
                if (EAP_STATUS.OK == status)
                {
                    // ****** ADD JOB ******************
                    status = jobsTable.addJob(lastAddedWPId, compTechInfo, "''", ref lastAddedJobId);
                    if (EAP_STATUS.OK == status)
                    {
                        // ****** ADD ESTIMATES ******************
                        status = estTimesTable.addEstimation(lastAddedJobId, 72, 36, 0);
                    }
                }
            }
            return(status);
        }