Ejemplo n.º 1
0
        public Tender GetGeneralTenderForConditoinTemplatesTenderMoreThan50Million()
        {
            Tender generalTender = new Tender("022001000000", 1, (int)Enums.TenderType.NewTender, (int)Enums.InvitationType.Public, "Tender name test", "tender number", "Purpuse Purpuse Purpuse Purpuse Purpuse Purpuse Purpuse Purpuse ",
                                              null, 1, 1, 1, null, null,
                                              null, null, null, null, null, 1, 500000000, null, 1,
                                              null, null, null, null, null, null, null,
                                              null, null, false, null, null, 500, null);

            generalTender.UpdateTenderDates(DateTime.Now.Date.AddDays(1), DateTime.Now.Date.AddDays(2), DateTime.Now.Date.AddDays(3), null, null, null, false, null, 1, "building name", "Floar number", "Department Number", null);
            generalTender.CreateConditionsTemplate();
            generalTender.AddIsTenderContainsTawreedTables_ForTest(false);
            return(generalTender);
        }
        public async Task AddEditIntroductionTemplate(EditConditionTemplateSecondSectionModel model, int branchId)
        {
            Tender tender = await _tenderQueries.FindTenderWithConditionsTemplateIntroductionById(Util.Decrypt(model.EncryptedTenderId), branchId);

            if (tender == null)
            {
                throw new UnHandledAccessException(Resources.SharedResources.ErrorMessages.YouHaveNoAccess);
            }
            if (tender.TenderConditionsTemplate == null)
            {
                tender.CreateConditionsTemplate();
            }
            IsValidToAddEditIntroductionTemplate(tender, model);
            UpdateTenderConditionTemplateStatusId(tender, Enums.TenderConditoinsStatus.GeneralStage);

            tender.TenderConditionsTemplate.UpdateConditionsTemplateSecondStep(model.AgencyDecalration, model.Description, model.AgentName, model.AgentJob, model.AgentFax, model.AgentPhone,
                                                                               model.TenderFragmentation, model.HideTenderFragmentation, model.AgentEmail, model.CerificatesIDs, model.HideCerificatesIDs);
            await _tenderCommands.UpdateAsync(tender);
        }