예제 #1
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;
 }
예제 #2
0
 internal Request1C(string httpMethod, string method, string content, Cred1C cred1C)
 {
     _credentials1C = cred1C.GetCredentials();
     _httpMethod    = new HttpMethod(httpMethod);
     _uri           = new Uri($"{_credentials1C.uri}{method}");
     _content       = new StringContent(content);
     this.content   = content;
 }
예제 #3
0
 public CreateOrUpdateAmoLead(Lead1C lead1C, Amo amo, Log log, Cred1C cred1C, RecentlyUpdatedEntityFilter filter)
 {
     _amo    = amo;
     _log    = log;
     _lead1C = lead1C;
     _cred1C = cred1C;
     _filter = filter;
 }
예제 #4
0
 public Update1CCompany(Amo amo, Log log, int companyId, Cred1C cred1C)
 {
     _amo       = amo;
     _log       = log;
     _companyId = companyId;
     _amo_acc   = 19453687;
     _repo1C    = new(cred1C);
 }
예제 #5
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;
 }
예제 #6
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;
 }
예제 #7
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";
 }
예제 #8
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;
 }
예제 #9
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;
 }
예제 #10
0
 private static Guid GetOrCreateContragent(Amo amo, Lead1C lead1C, Cred1C cred1C, int amo_acc, RecentlyUpdatedEntityFilter filter)
 {
     if (amo_acc == 19453687)
     {
         return(default);
예제 #11
0
 public UpdateAmoIds(Amo amo, Log log, Cred1C cred1C)
 {
     _amo    = amo;
     _log    = log;
     _repo1C = new(cred1C);
 }
예제 #12
0
 public CompanyRepository(Cred1C cred1C)
 {
     _cred1C = cred1C;
 }
예제 #13
0
 public LeadRepository(Cred1C cred1C)
 {
     _cred1C = cred1C;
 }
예제 #14
0
 public ClientRepository(Cred1C cred1C)
 {
     _cred1C = cred1C;
 }
예제 #15
0
 internal Request1C(string httpMethod, string method, Cred1C cred1C)
 {
     _credentials1C = cred1C.GetCredentials();
     _httpMethod    = new HttpMethod(httpMethod);
     _uri           = new Uri($"{_credentials1C.uri}{method}");
 }
예제 #16
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);
        }
예제 #17
0
 public CourseRepository(Cred1C cred1C)
 {
     _cred1C = cred1C;
 }
예제 #18
0
 public PopulateCourses(Amo amo, Log log, Cred1C cred1C)
 {
     _amo    = amo;
     _log    = log;
     _repo1C = new(cred1C);
 }