Exemplo n.º 1
0
 public UpdateAmoLead(Lead1C lead1C, Amo amo, Log log, RecentlyUpdatedEntityFilter filter)
 {
     _amo    = amo;
     _log    = log;
     _lead1C = lead1C;
     _filter = filter;
 }
Exemplo n.º 2
0
 public GSheetsController(Amo amo, ProcessQueue processQueue, GSheets gSheets, Log log)
 {
     _amo          = amo;
     _processQueue = processQueue;
     _gSheets      = gSheets;
     _log          = log;
 }
Exemplo n.º 3
0
 public CreateOrUpdateAmoContact(Client1C client1C, Amo amo, Log log, RecentlyUpdatedEntityFilter filter)
 {
     _amo      = amo;
     _log      = log;
     _client1C = client1C;
     _filter   = filter;
 }
Exemplo n.º 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);
        }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
 public WebhookController(Amo amo, ProcessQueue processQueue, Log log, RecentlyUpdatedEntityFilter filter, GSheets gSheets)
 {
     _amo          = amo;
     _processQueue = processQueue;
     _log          = log;
     _filter       = filter;
     _gSheets      = gSheets;
 }
Exemplo n.º 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";
 }
Exemplo n.º 8
0
 public CreateOrUpdateAmoLead(Lead1C lead1C, Amo amo, Log log, Cred1C cred1C, RecentlyUpdatedEntityFilter filter)
 {
     _amo    = amo;
     _log    = log;
     _lead1C = lead1C;
     _cred1C = cred1C;
     _filter = filter;
 }
Exemplo n.º 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;
 }
Exemplo n.º 10
0
 public Update1CCompany(Amo amo, Log log, int companyId, Cred1C cred1C)
 {
     _amo       = amo;
     _log       = log;
     _companyId = companyId;
     _amo_acc   = 19453687;
     _repo1C    = new(cred1C);
 }
Exemplo n.º 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();
 }
Exemplo n.º 12
0
 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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";
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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>();
        }
Exemplo n.º 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>();
        }
Exemplo n.º 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>();
        }
Exemplo n.º 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>();
        }
Exemplo n.º 23
0
 public PopulateCourses(Amo amo, Log log, Cred1C cred1C)
 {
     _amo    = amo;
     _log    = log;
     _repo1C = new(cred1C);
 }
Exemplo n.º 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;
 }
Exemplo n.º 25
0
 public LeadTasksController(Amo amo)
 {
     _amo      = amo;
     _leadRepo = amo.GetAccountById(28395871).GetRepo <Lead>();
 }
Exemplo n.º 26
0
 public UpdateAmoCourse(Course1C course, Amo amo, Log log)
 {
     _amo      = amo;
     _log      = log;
     _course1C = course;
 }
Exemplo n.º 27
0
 public CreateOrUpdateAmoCourse(Course1C course1C, Amo amo, Log log)
 {
     _amo      = amo;
     _log      = log;
     _course1C = course1C;
 }
Exemplo n.º 28
0
 public ReportsController(Amo amo, ProcessQueue processQueue, GSheets gSheets)
 {
     _amo          = amo;
     _processQueue = processQueue;
     _gSheets      = gSheets;
 }
Exemplo n.º 29
0
 private static Guid GetOrCreateContragent(Amo amo, Lead1C lead1C, Cred1C cred1C, int amo_acc, RecentlyUpdatedEntityFilter filter)
 {
     if (amo_acc == 19453687)
     {
         return(default);
Exemplo n.º 30
0
 public UpdateAmoIds(Amo amo, Log log, Cred1C cred1C)
 {
     _amo    = amo;
     _log    = log;
     _repo1C = new(cred1C);
 }