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)); }
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); }
public int UpdateContractQuestionairesById(ContractQuestionaire ContractQuestionaire) { return(_iProjectRepository.UpdateContractQuestionairesById(ContractQuestionaire)); }
//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)); }