public bool Add(IProjectContribution _developerProjectContribution)
        {
            var    developerProjectContribution = (_developerProjectContribution as DeveloperProjectContributionEntity);
            string str = string.Empty;

            try
            {
                str = string.Format(@"insert into tblDeveloperProjectContribution (ProjectSeq, ProjectID, TeamRole, ImplementDesign, ImplementCode, ImplementUnitTest, JobKpiAssessmentID) values ({0},{1},{2},{3},{4},{5},{6})",
                                    developerProjectContribution.ProjectSeq,
                                    developerProjectContribution.Project.ID,
                                    (int)developerProjectContribution.TeamRole,
                                    (int)developerProjectContribution.ImplementDesign,
                                    (int)developerProjectContribution.ImplementCode,
                                    (int)developerProjectContribution.ImplementUnitTest,
                                    developerProjectContribution.JobKpiAssessment.ID
                                    );
                DBManager.InstantDBManger.QueryExecutionWithTransaction(str);
                return(true);
            }
            catch (Exception exp)
            {
                CommonFunctions.ShowErrorDialog("SQL error:" + exp.ToString());
                return(false);
            }
        }
        public bool Edit(IProjectContribution _developerProjectContribution, int ID)
        {
            var    developerProjectContribution = (_developerProjectContribution as DeveloperProjectContributionEntity);
            string str = string.Empty;

            try
            {
                str = string.Format(@"update tbldeveloperprojectcontribution  set ProjectSeq = {0},ProjectID= {1},TeamRole ={2},ImplementDesign = {3},ImplementCode ={4},ImplementUnitTest ={5},JobKpiAssessmentID ={6} where ID = {7}",
                                    developerProjectContribution.ProjectSeq,
                                    developerProjectContribution.Project.ID,
                                    (int)developerProjectContribution.TeamRole,
                                    (int)developerProjectContribution.ImplementDesign,
                                    (int)developerProjectContribution.ImplementCode,
                                    (int)developerProjectContribution.ImplementUnitTest,
                                    developerProjectContribution.JobKpiAssessment.ID,
                                    ID
                                    );
                DBManager.InstantDBManger.QueryExecutionWithTransaction(str);
                return(true);
            }
            catch (Exception exp)
            {
                CommonFunctions.ShowErrorDialog("SQL error:" + exp.ToString());
                return(false);
            }
        }
Пример #3
0
        public bool Add(IProjectContribution _pmProjectContribution)
        {
            var    pmProjectContribution = (_pmProjectContribution as PMProjectContributionEntity);
            string str = string.Empty;

            try
            {
                str = string.Format(@"insert into tblPMProjectContribution (ProjectSeq, ProjectID, PMRoleAndResponsibility, SofwareDevelopmentActivitites,
                                    Complexity_InternationalProject, Complexity_GloballyAdvancedTechnologyProject, Complexity_ComplicatedContractConditions,
                                    Complexity_ArchitectureRequirement,Complexity_SystemDesign,Complexity_ApplicationRequirement,Complexity_ProjectStructure,
                                    TeamSizeAverage,PhaseDuration,JobKpiAssessmentID) values ({0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13})",
                                    pmProjectContribution.ProjectSeq,
                                    pmProjectContribution.Project.ID,
                                    (int)pmProjectContribution.PMRoleAndResponsibility,
                                    pmProjectContribution.SofwareDevelopmentActivitites,
                                    (bool)pmProjectContribution.Complexity_InternationalProject,
                                    (bool)pmProjectContribution.Complexity_GloballyAdvancedTechnologyProject,
                                    (bool)pmProjectContribution.Complexity_ComplicatedContractConditions,
                                    (bool)pmProjectContribution.Complexity_ArchitectureRequirement,
                                    (bool)pmProjectContribution.Complexity_SystemDesign,
                                    (bool)pmProjectContribution.Complexity_ApplicationRequirement,
                                    (bool)pmProjectContribution.Complexity_ProjectStructure,
                                    (int)pmProjectContribution.TeamSizeAverage,
                                    (int)pmProjectContribution.PhaseDuration,
                                    pmProjectContribution.JobKpiAssessment.ID
                                    );
                DBManager.InstantDBManger.QueryExecutionWithTransaction(str);
                return(true);
            }
            catch (Exception exp)
            {
                CommonFunctions.ShowErrorDialog("SQL error:" + exp.ToString());
                return(false);
            }
        }