public async Task AddEditTechnicalDeclerationsTemplate(EditConditionTemplateSeventhSectionModel model, int branchId)
        {
            Tender tender = await _tenderQueries.FindTenderWithConditionsTemplateTechnicalOutputs(Util.Decrypt(model.EncryptedTenderId), branchId);

            if (tender == null)
            {
                throw new UnHandledAccessException(Resources.SharedResources.ErrorMessages.YouHaveNoAccess);
            }
            IsValidToAddEditTechnicalDeclerationsTemplate(tender, model);
            UpdateTenderConditionTemplateStatusId(tender, Enums.TenderConditoinsStatus.TechnicalDeclerations);
            tender.UpdateConditionsTemplateSeventhStep(
                tenderConditionsTemplateTechnicalOutput: model.TenderConditionsTemplateOutputs != null ? model.TenderConditionsTemplateOutputs.Select(a => new TenderConditionsTemplateTechnicalOutput
                                                                                                                                                      (
                                                                                                                                                          tenderConditionsTemplateTechnicalOutputId: a.TenderConditionsTemplateTechnicalOutputId,
                                                                                                                                                          outState: a.OutputStage,
                                                                                                                                                          outputName: a.OutputName,
                                                                                                                                                          outDescriptions: a.OutputDescriptions,
                                                                                                                                                          outDeliveryTime: a.OutputDeliveryTime
                                                                                                                                                      )).ToList() : new List <TenderConditionsTemplateTechnicalOutput>(),
                tenderConditionsTemplateTechnicalDelrations: model.TechnicalDeclrations != null ? model.TechnicalDeclrations.Select(a => new TenderConditionsTemplateTechnicalDeclration
                                                                                                                                    (
                                                                                                                                        tenderConditionsTemplateTechnicalDeclrationId: a.TenderConditionsTemplateTechnicalDeclrationId,
                                                                                                                                        term: a.Term,
                                                                                                                                        decleration: a.Decleration
                                                                                                                                    )).ToList() : new List <TenderConditionsTemplateTechnicalDeclration>(),
                projectsScope: model.ProjectsScope,
                worksProgram: model.WorksProgram,
                workLocationDetails: model.WorkLocationDetails,
                servicesAndWorkImplementationsMethod: model.ServicesAndWorkImplementationsMethod
                );
            await _tenderCommands.UpdateAsync(tender);
        }