Пример #1
0
        public int UpdateContractQuestionairesById(ContractQuestionaire ContractQuestionaire)
        {
            string updateQuery = $@"Update ContractQuestionaire       set 
                                                                    IsReportExecCompensation	 =     @IsReportExecCompensation	,
                                                                    ReportLastReportDate		 =     @ReportLastReportDate		,
                                                                    ReportNextReportDate		 =     @ReportNextReportDate		,
                                                                    IsGSAschedulesale			 =     @IsGSAschedulesale			,
                                                                    GSALastReportDate			 =     @GSALastReportDate			,
                                                                    GSANextReportDate			 =     @GSANextReportDate			,
                                                                    IsSBsubcontract			     =     @IsSBsubcontract			    ,
                                                                    SBLastReportDate			 =     @SBLastReportDate			,
                                                                    SBNextReportDate			 =     @SBNextReportDate			,
                                                                    IsGQAC					     =     @IsGQAC					    ,
                                                                    GQACLastReportDate		     =     @GQACLastReportDate		    ,
                                                                    GQACNextReportDate			 =     @GQACNextReportDate			,
                                                                    IsCPARS					     =     @IsCPARS					    ,
                                                                    CPARSLastReportDate		     =     @CPARSLastReportDate		,                                                                 
                                                                    CPARSNextReportDate		     =     @CPARSNextReportDate		,
                                                                    IsWarranties				 =     @IsWarranties				,
                                                                    IsStandardIndustryProvision	 =     @IsStandardIndustryProvision	,
                                                                    WarrantyProvisionDescription =     @WarrantyProvisionDescription,
                                                                    UpdatedOn		             =     @UpdatedOn		            ,
                                                                    UpdatedBy				     =     @UpdatedBy				    
                                                                      where ContractGuid = @ContractGuid ";

            return(_context.Connection.Execute(updateQuery, ContractQuestionaire));
        }
Пример #2
0
        public int AddContractQuestionaires(ContractQuestionaire model)
        {
            string sql    = $"SELECT Count(*) FROM ContractQuestionaire WHERE ContractGuid = @ContractGuid";
            var    result = _context.Connection.QuerySingle <int>(sql, new { ContractGuid = model.ContractGuid });

            if (result == 0)
            {
                string insertQuery = $@"INSERT INTO [dbo].[ContractQuestionaire]
                                                                   (
                                                                        ContractGuid				   ,
                                                                        IsReportExecCompensation	   ,
                                                                        ReportLastReportDate		   ,
                                                                        ReportNextReportDate		   ,
                                                                        IsGSAschedulesale			   ,
                                                                        GSALastReportDate			   ,
                                                                        GSANextReportDate			   ,
                                                                        IsSBsubcontract			       ,
                                                                        SBLastReportDate			   ,
                                                                        SBNextReportDate			   ,
                                                                        IsGQAC					       ,
                                                                        GQACLastReportDate		       ,
                                                                        GQACNextReportDate			   ,
                                                                        IsCPARS					       ,
                                                                        CPARSLastReportDate		   ,
                                                                        CPARSNextReportDate		   ,
                                                                        IsWarranties				   ,
                                                                        IsStandardIndustryProvision	   ,
                                                                        WarrantyProvisionDescription   ,
                                                                        CreatedOn				       ,
                                                                        UpdatedOn		               ,
                                                                        CreatedBy                      ,
                                                                        UpdatedBy				       ,
                                                                        IsDeleted				       ,
                                                                        IsActive				       
                                                                    )
                                  VALUES (
                                                                        @ContractGuid				    ,
                                                                        @IsReportExecCompensation	    ,
                                                                        @ReportLastReportDate		    ,
                                                                        @ReportNextReportDate		    ,
                                                                        @IsGSAschedulesale			    ,
                                                                        @GSALastReportDate			    ,
                                                                        @GSANextReportDate			    ,
                                                                        @IsSBsubcontract			    ,
                                                                        @SBLastReportDate			    ,
                                                                        @SBNextReportDate			    ,
                                                                        @IsGQAC					        ,
                                                                        @GQACLastReportDate		    ,
                                                                        @GQACNextReportDate		    ,
                                                                        @IsCPARS					    ,
                                                                        @CPARSLastReportDate		    ,
                                                                        @CPARSNextReportDate		    ,
                                                                        @IsWarranties				    ,
                                                                        @IsStandardIndustryProvision    ,
                                                                        @WarrantyProvisionDescription   ,
                                                                        @CreatedOn				        ,
                                                                        @UpdatedOn		                ,
                                                                        @CreatedBy                      ,
                                                                        @UpdatedBy				        ,
                                                                        @IsDeleted				        ,
                                                                        @IsActive				                                             
                                                                )";
                _context.Connection.Execute(insertQuery, model);
            }
            else
            {
                UpdateContractQuestionairesById(model);
            }
            return(1);
        }
Пример #3
0
 public int UpdateContractQuestionairesById(ContractQuestionaire ContractQuestionaire)
 {
     return(_iProjectRepository.UpdateContractQuestionairesById(ContractQuestionaire));
 }
Пример #4
0
 //ContractQuestionaires
 public int AddContractQuestionaires(ContractQuestionaire ContractQuestionaire)
 {
     return(_iProjectRepository.AddContractQuestionaires(ContractQuestionaire));
 }
 public int AddContractQuestionaires(ContractQuestionaire ContractQuestionaire)
 {
     return(_contractQuestionariesRepository.AddContractQuestionaires(ContractQuestionaire));
 }
 public int UpdateContractQuestionairesById(ContractQuestionaire ContractQuestionaire)
 {
     return(_contractQuestionariesRepository.UpdateContractQuestionairesById(ContractQuestionaire));
 }