Exemple #1
0
 public UpdateAmoLead(Lead1C lead1C, Amo amo, Log log, RecentlyUpdatedEntityFilter filter)
 {
     _amo    = amo;
     _log    = log;
     _lead1C = lead1C;
     _filter = filter;
 }
Exemple #2
0
 public GSheetsController(Amo amo, ProcessQueue processQueue, GSheets gSheets, Log log)
 {
     _amo          = amo;
     _processQueue = processQueue;
     _gSheets      = gSheets;
     _log          = log;
 }
 public CreateOrUpdateAmoContact(Client1C client1C, Amo amo, Log log, RecentlyUpdatedEntityFilter filter)
 {
     _amo      = amo;
     _log      = log;
     _client1C = client1C;
     _filter   = filter;
 }
Exemple #4
0
        private static void UpdateLeadIn1C(Amo amo, Log log, Lead lead, Guid lead_id_1C, int amo_acc, Cred1C cred1C)
        {
            var repo1C = new LeadRepository(cred1C);

            Lead1C lead1C = repo1C.GetLead(lead_id_1C);

            if (lead1C == default)
            {
                throw new Exception($"Unable to update lead in 1C. 1C returned no lead {lead_id_1C}.");
            }

            PopulateCFs(lead, amo_acc, lead1C);

            lead1C.responsible_user = UserList.Get1CUser(lead.responsible_user_id);

            if (string.IsNullOrEmpty(lead1C.lead_status))
            {
                lead1C.lead_status = "ВРаботе";
            }

            if (amo_acc == 19453687)
            {
                lead1C.is_corporate = true;
            }

            repo1C.UpdateLead(lead1C);
        }
 public RetailCourseProcessor(Amo amo, ProcessQueue processQueue, CancellationToken token, int leadNumber, Log log)
 {
     _repo         = amo.GetAccountById(28395871).GetRepo <Lead>();
     _processQueue = processQueue;
     _token        = token;
     _leadNumber   = leadNumber;
     _log          = log;
 }
Exemple #6
0
 public WebhookController(Amo amo, ProcessQueue processQueue, Log log, RecentlyUpdatedEntityFilter filter, GSheets gSheets)
 {
     _amo          = amo;
     _processQueue = processQueue;
     _log          = log;
     _filter       = filter;
     _gSheets      = gSheets;
 }
Exemple #7
0
 public SiteFormController(Amo amo, ProcessQueue processQueue, Log log, GSheets gSheets)
 {
     _amo          = amo;
     _processQueue = processQueue;
     _log          = log;
     _gSheets      = gSheets;
     _path         = $@"logs\siteform\{DateTime.Today.Year}-{DateTime.Today.Month}-{DateTime.Today.Day}.log";
 }
Exemple #8
0
 public CreateOrUpdateAmoLead(Lead1C lead1C, Amo amo, Log log, Cred1C cred1C, RecentlyUpdatedEntityFilter filter)
 {
     _amo    = amo;
     _log    = log;
     _lead1C = lead1C;
     _cred1C = cred1C;
     _filter = filter;
 }
Exemple #9
0
 public Update1CLead(Amo amo, Log log, int leadId, int amo_acc, Cred1C cred1C)
 {
     _amo     = amo;
     _log     = log;
     _leadId  = leadId;
     _amo_acc = amo_acc;
     _cred1C  = cred1C;
 }
Exemple #10
0
 public Update1CCompany(Amo amo, Log log, int companyId, Cred1C cred1C)
 {
     _amo       = amo;
     _log       = log;
     _companyId = companyId;
     _amo_acc   = 19453687;
     _repo1C    = new(cred1C);
 }
Exemple #11
0
 public GSheetsProcessor(int leadnumber, Amo amo, GSheets gSheets, ProcessQueue processQueue, Log log, CancellationToken token)
 {
     _processQueue = processQueue;
     _token        = token;
     _log          = log;
     _amo          = amo;
     _leadNumber   = leadnumber;
     _service      = gSheets.GetService();
 }
 public CreateOrUpdate1CCompany(Amo amo, Log log, int leadId, Cred1C cred1C, RecentlyUpdatedEntityFilter filter)
 {
     _amo     = amo;
     _log     = log;
     _leadId  = leadId;
     _amo_acc = 19453687;
     _repo1C  = new(cred1C);
     _filter  = filter;
 }
Exemple #13
0
 public Update1CClient(Amo amo, Log log, int contactId, int amo_acc, Cred1C cred1C, RecentlyUpdatedEntityFilter filter)
 {
     _amo       = amo;
     _log       = log;
     _contactId = contactId;
     _amo_acc   = amo_acc;
     _repo1C    = new(cred1C);
     _filter    = filter;
 }
Exemple #14
0
 public Integration1CController(Amo amo, ProcessQueue processQueue, Log log, Cred1C cred1C, RecentlyUpdatedEntityFilter filter)
 {
     _amo          = amo;
     _processQueue = processQueue;
     _log          = log;
     _cred1C       = cred1C;
     _filter       = filter;
     _path         = $@"logs\1c\{DateTime.Today.Year}-{DateTime.Today.Month}-{DateTime.Today.Day}.log";
 }
Exemple #15
0
 public CreateOrUpdate1CLead(Amo amo, Log log, int leadId, int amo_acc, Cred1C cred1C, RecentlyUpdatedEntityFilter filter)
 {
     _amo     = amo;
     _log     = log;
     _leadId  = leadId;
     _amo_acc = amo_acc;
     _cred1C  = cred1C;
     _filter  = filter;
 }
Exemple #16
0
 public CreateOrUpdateAmoCompany(Company1C company1C, Amo amo, Log log, RecentlyUpdatedEntityFilter filter)
 {
     _amo       = amo;
     _log       = log;
     _company1C = company1C;
     _compRepo  = _amo.GetAccountById(19453687).GetRepo <Company>();
     _amo_acc   = 19453687;
     _filter    = filter;
 }
Exemple #17
0
 public TestingController(Amo amo, ProcessQueue processQueue, GSheets gSheets, Log log, Cred1C cred1C, RecentlyUpdatedEntityFilter filter, Uber uber)
 {
     _amo          = amo;
     _processQueue = processQueue;
     _gSheets      = gSheets;
     _log          = log;
     _cred1C       = cred1C;
     _filter       = filter;
     locker        = new();
     _uber         = uber;
 }
Exemple #18
0
 public RetailRespProcessor(Amo amo, ProcessQueue processQueue, CancellationToken token, int entityNumber, Log log, Type type, int oldResp, int modResp)
 {
     _leadRepo     = amo.GetAccountById(28395871).GetRepo <Lead>();
     _contRepo     = amo.GetAccountById(28395871).GetRepo <Contact>();
     _processQueue = processQueue;
     _token        = token;
     _entityNumber = entityNumber;
     _log          = log;
     _type         = type;
     _oldResp      = oldResp;
     _modResp      = modResp;
 }
Exemple #19
0
        public SendToRetProcessor(Amo amo, Log log, ProcessQueue processQueue, int leadNumber, CancellationToken token)
        {
            _log          = log;
            _leadNumber   = leadNumber;
            _processQueue = processQueue;
            _token        = token;

            _leadRepo = amo.GetAccountById(28395871).GetRepo <Lead>();
            _contRepo = amo.GetAccountById(28395871).GetRepo <Contact>();

            _sourceLeadRepo = amo.GetAccountById(19453687).GetRepo <Lead>();
            _sourceContRepo = amo.GetAccountById(19453687).GetRepo <Contact>();
        }
Exemple #20
0
        public RetailPaidProcessor(Amo amo, Log log, ProcessQueue processQueue, CancellationToken token, GSheets gSheets, string taskName, string phone, string email, string price)
        {
            _log          = log;
            _processQueue = processQueue;
            _token        = token;
            _taskName     = taskName;
            _phone        = phone.Trim().Replace("+", "").Replace("-", "").Replace(" ", "").Replace("(", "").Replace(")", "");
            _email        = email.Trim().Replace(" ", "");
            int.TryParse(price, out _price);

            var acc = amo.GetAccountById(28395871);

            _contRepo = acc.GetRepo <Contact>();
        }
Exemple #21
0
        public SiteFormRetailProcessor(Amo amo, Log log, FormRequest formRequest, ProcessQueue processQueue, CancellationToken token, GSheets gSheets, string taskName)
        {
            _amo          = amo;
            _log          = log;
            _formRequest  = formRequest;
            _processQueue = processQueue;
            _token        = token;
            _gSheets      = gSheets;
            _taskname     = taskName;

            var acc = amo.GetAccountById(28395871);

            _leadRepo = acc.GetRepo <Lead>();
            _contRepo = acc.GetRepo <Contact>();
        }
Exemple #22
0
        public ConferencePaidProcessor(Amo amo, Log log, ProcessQueue processQueue, CancellationToken token, GSheets gSheets, string taskName, string phone, string email)
        {
            _amo          = amo;
            _log          = log;
            _processQueue = processQueue;
            _token        = token;
            _gSheets      = gSheets;
            _taskName     = taskName;
            _phone        = phone.Trim().Replace("+", "").Replace("-", "").Replace(" ", "").Replace("(", "").Replace(")", "");
            _email        = email.Trim().Replace(" ", "");

            var acc = amo.GetAccountById(19453687);

            _leadRepo = acc.GetRepo <Lead>();
            _contRepo = acc.GetRepo <Contact>();
            _compRepo = acc.GetRepo <Company>();
        }
Exemple #23
0
 public PopulateCourses(Amo amo, Log log, Cred1C cred1C)
 {
     _amo    = amo;
     _log    = log;
     _repo1C = new(cred1C);
 }
Exemple #24
0
 public InitialLeadProcessor(int leadNumber, AmoAccount acc, Amo amo, GSheets gSheets, ProcessQueue processQueue, Log log, CancellationToken token)
     : base(leadNumber, acc, processQueue, log, token)
 {
     _gSheets = gSheets;
     _amo     = amo;
 }
Exemple #25
0
 public LeadTasksController(Amo amo)
 {
     _amo      = amo;
     _leadRepo = amo.GetAccountById(28395871).GetRepo <Lead>();
 }
Exemple #26
0
 public UpdateAmoCourse(Course1C course, Amo amo, Log log)
 {
     _amo      = amo;
     _log      = log;
     _course1C = course;
 }
Exemple #27
0
 public CreateOrUpdateAmoCourse(Course1C course1C, Amo amo, Log log)
 {
     _amo      = amo;
     _log      = log;
     _course1C = course1C;
 }
Exemple #28
0
 public ReportsController(Amo amo, ProcessQueue processQueue, GSheets gSheets)
 {
     _amo          = amo;
     _processQueue = processQueue;
     _gSheets      = gSheets;
 }
Exemple #29
0
 private static Guid GetOrCreateContragent(Amo amo, Lead1C lead1C, Cred1C cred1C, int amo_acc, RecentlyUpdatedEntityFilter filter)
 {
     if (amo_acc == 19453687)
     {
         return(default);
Exemple #30
0
 public UpdateAmoIds(Amo amo, Log log, Cred1C cred1C)
 {
     _amo    = amo;
     _log    = log;
     _repo1C = new(cred1C);
 }