Esempio n. 1
0
 public UserController(ITenderService tenderService, IUserTenderService userTenderService, IUserService userService, ApplicationUserManager userManager)
 {
     _userTenderService = userTenderService;
     _userService       = userService;
     _tenderService     = tenderService;
     _userManager       = userManager;
 }
Esempio n. 2
0
 public TenderForm()
 {
     InitializeComponent();
     this.ctrlTenderForm = new TenderFormController(this);
     this.srvTender      = SamsaraAppContext.Resolve <ITenderService>();
     Assert.IsNotNull(this.srvTender);
 }
 public OpportunityFormController(OpportunityForm instance)
 {
     this.frmOpportunity  = instance;
     this.srvOrganization = SamsaraAppContext.Resolve <IOrganizationService>();
     Assert.IsNotNull(this.srvOrganization);
     this.srvBidder = SamsaraAppContext.Resolve <IBidderService>();
     Assert.IsNotNull(this.srvBidder);
     this.srvDependency = SamsaraAppContext.Resolve <IDependencyService>();
     Assert.IsNotNull(this.srvDependency);
     this.srvEndUser = SamsaraAppContext.Resolve <IEndUserService>();
     Assert.IsNotNull(this.srvEndUser);
     this.srvAsesor = SamsaraAppContext.Resolve <IAsesorService>();
     Assert.IsNotNull(this.srvAsesor);
     this.srvTender = SamsaraAppContext.Resolve <ITenderService>();
     Assert.IsNotNull(this.srvTender);
     this.srvOpportunity = SamsaraAppContext.Resolve <IOpportunityService>();
     Assert.IsNotNull(this.srvOpportunity);
     this.srvOpportunityType = SamsaraAppContext.Resolve <IOpportunityTypeService>();
     Assert.IsNotNull(this.srvOpportunityType);
     this.srvOpportunityStatus = SamsaraAppContext.Resolve <IOpportunityStatusService>();
     Assert.IsNotNull(this.srvOpportunityStatus);
     this.srvManufacturer = SamsaraAppContext.Resolve <IManufacturerService>();
     Assert.IsNotNull(this.srvManufacturer);
     this.srvOpportunityLog = SamsaraAppContext.Resolve <IOpportunityLogService>();
     Assert.IsNotNull(this.srvOpportunityLog);
     this.InitializeFormControls();
 }
Esempio n. 4
0
        private void HandleMessage(TenderMessageDTO message, string routingKey)
        {
            using (var scope = _service.CreateScope())
            {
                ITenderService tenderService = scope.ServiceProvider.GetRequiredService <ITenderService>();
                Tender         tender        = tenderService.GetTenderByRoutingKey(routingKey);
                if (tender.IsClosed || tender.EndDate.CompareTo(DateTime.Now) <= 0)
                {
                    throw new Exception("Tender is closed!");
                }

                TenderMessage tenderMessage = new TenderMessage();
                tenderMessage.Identification  = message.Identification;
                tenderMessage.ReplyRoutingKey = message.ReplyRoutingKey;
                tenderMessage.TenderId        = tender.Id;
                tenderMessage.Offers          = new List <TenderOffer>();

                foreach (var o in message.Offers)
                {
                    TenderOffer to = new TenderOffer()
                    {
                        Code = o.Code, Name = o.Name, Quantity = o.Quantity, Price = o.Price
                    };
                    tenderMessage.Offers.Add(to);
                }
                scope.ServiceProvider.GetRequiredService <ITenderMessageService>().CreateTenderMessage(tenderMessage);
            }
        }
Esempio n. 5
0
 public ChecklistController(ICheckListItemService itemService, ICheckedItemService checkedItemService, IUserService userService, ITenderService tenderService)
 {
     _itemService        = itemService;
     _checkedItemService = checkedItemService;
     _userService        = userService;
     _tenderService      = tenderService;
 }
Esempio n. 6
0
        private void InitializeRabbitMqListener()
        {
            if (_channel == null)
            {
                return;
            }
            _channel.ExchangeDeclare(exchange: _exchangeName, type: ExchangeType.Direct);
            using (var scope = _service.CreateScope())
            {
                ITenderService tenderService = scope.ServiceProvider.GetRequiredService <ITenderService>();

                foreach (Tender t in tenderService.GetAllNotClosedTenders())
                {
                    if (t.EndDate.CompareTo(DateTime.Now) > 0)
                    {
                        _channel.QueueDeclare(queue: t.QueueName,
                                              durable: true,
                                              exclusive: false,
                                              autoDelete: false,
                                              arguments: null);
                        _channel.QueueBind(queue: t.QueueName, exchange: _exchangeName, routingKey: t.RoutingKey);
                        _channel.BasicConsume(queue: t.QueueName, autoAck: false, consumer: _consumer);
                    }
                    else
                    {
                        RemoveQueue(t);
                    }
                }
            }
        }
 public TenderServiceController(ITenderService tenderService,
                                ITenderMessageService tenderMessageService,
                                IRabbitMqTenderingService rabbitMqTenderingService)
 {
     _tenderService            = tenderService;
     _tenderMessageService     = tenderMessageService;
     _rabbitMqTenderingService = rabbitMqTenderingService;
 }
Esempio n. 8
0
 public TenderController(ITenderService ObjService, IObjectStatusTypeService ObjectStatusTypeService,
     ICategoryService CategoryService, IDocumentService DocumentService, ICompanyService CompanyService)
     : base()
 {
     this._categoryService = CategoryService;
     this._companyService = CompanyService;
     this._objectStatusTypeService = ObjectStatusTypeService;
     this._DocService = DocumentService;
     this._ObjService = ObjService;
 }
Esempio n. 9
0
 public TenderDailyJobRunner(ITenderService tenderService, IFtpReadingService ftpreadingService
                             , IDictionaryService oKPDService, ITenderSearchService tenderSearchService
                             , DataContext dataContext)
 {
     _tenderService       = tenderService;
     _ftpreadingService   = ftpreadingService;
     _oKPDService         = oKPDService;
     _dataContext         = dataContext;
     _tenderSearchService = tenderSearchService;
 }
Esempio n. 10
0
 public TenderEntryViewModel()
 {
     CleanUp();
     _tenderService = new TenderService();
     HeaderText     = "Add Tender";
     AddNewTender();
     Messenger.Default.Register <TenderDTO>(this, (message) =>
     {
         SelectedTender = _tenderService.Find(message.Id.ToString(CultureInfo.InvariantCulture));
     });
 }
        public TenderLinesControlController(
            TenderLinesControl instance) : base(instance)
        {
            this.controlTenderLines = instance;

            if (LicenseManager.UsageMode != LicenseUsageMode.Designtime)
            {
                this.srvTenderLine = SamsaraAppContext.Resolve <ITenderLineService>();
                this.srvTender     = SamsaraAppContext.Resolve <ITenderService>();
                this.srvProduct    = SamsaraAppContext.Resolve <IProductService>();
            }

            this.InitializeControlControls();
        }
Esempio n. 12
0
 public NewMilestoneController(IMilestoneService milestoneService, ITenderService tenderService)
 {
     _milestoneService = milestoneService;
     _tenderService    = tenderService;
 }
 public InvitationStatusController(IAppDbContext context, ITenderService tenderService)
 {
     this._tenderService = tenderService;
     _context            = context;
 }
Esempio n. 14
0
 public TenderController(ITenderService tenderService, IMailService mailService, IPharmacyGateway pharmacyGateway)
 {
     _tenderService   = tenderService;
     _mailService     = mailService;
     _pharmacyGateway = pharmacyGateway;
 }
Esempio n. 15
0
 public TendersController(ITenderService tenderService)
 {
     _tenderService = tenderService;
 }
Esempio n. 16
0
 public UserTenderController(IUserTenderService userTenderService, IUserService userService, ITenderService tenderService)
 {            
     _userTenderService = userTenderService;
     _userService = userService;
     _tenderService = tenderService;
 }
Esempio n. 17
0
 public TextBoxController(ITenderService tenderService, ITenderFileBlockService tenderFileBlockService, ITenderFileService tenderFileService)
 {
     _tenderService          = tenderService;
     _tenderFileBlockService = tenderFileBlockService;
     _tenderFileService      = tenderFileService;
 }
Esempio n. 18
0
 public TenderController(ITenderService tenderService, IDrugService drugService)
 {
     _tenderService = tenderService;
     _drugService   = drugService;
 }
Esempio n. 19
0
 public TenderController(ITenderService tenderService)
 {
     this.tenderService = tenderService;
 }
Esempio n. 20
0
 public ProjectController(ITenderService tenderService, IUserTenderService userTenderService, IUserService userService)
 {
     _userTenderService = userTenderService;
     _userService       = userService;
     _tenderService     = tenderService;
 }
Esempio n. 21
0
 public RssService(ITenderService tenderService, ITenderOfferService tenderOfferService)
 {
     _tenderService      = tenderService;
     _tenderOfferService = tenderOfferService;
 }
Esempio n. 22
0
 public void Load()
 {
     CleanUp();
     _paymentService = new TenderService();
     GetLiveTenders();
 }