private void SyncCalculateInvoice(AccountBillingInfo abi, object curaccount, Account a) 
 {
     object accbill = Open("Справочник.РасчетныеСчета");
    //var current = _type1C.InvokeMember("ИспользоватьВладельца", BindingFlags.Public | BindingFlags.InvokeMethod, null, accbill, new object[] { curaccount });
     var currentabi = FindByProperty(accbill,"Номер", abi.RS);
     if (currentabi != null)
     {
         UpdateCalculateInvoice(accbill, abi, curaccount);
     }
     else {
         Create(accbill); 
         UpdateCalculateInvoice(accbill, abi, curaccount);
     }
 }
        private void UpdateBank(object bank,AccountBillingInfo abi) 
        {
            Set(bank,"Наименование",abi.Bank);
            Set(bank, "КоррСчет", abi.CorrInvoice);
            Set(bank,"Код",abi.BIK);
            Set(bank, "Местонахождение", ParseBankCity(abi.Bank));

            Save(bank);
        }
 private void SyncBanks(AccountBillingInfo abi) 
 {
     object bank = Open("Справочник.Банки");
     var curbank = FindByName(bank, abi.Bank);
     if (curbank != null)
     {
         UpdateBank(bank, abi);
     }
     else {
         Create(bank);
         UpdateBank(bank, abi);
     }
 
 }
 private void UpdateCalculateInvoice(object acbil1C, AccountBillingInfo abi, object curaccount) 
 {
     Set(acbil1C, "Номер", abi.RS);
     Set(acbil1C, "Владелец", curaccount);
     Set(acbil1C, "Наименование", "Основной");
     SyncBanks(abi);
     object bank = Open("Справочник.Банки");
     var curbank = FindByName(bank, abi.Bank);
     if (curbank != null)
     {
         Set(acbil1C, "БанкОрганизации", curbank);
     }
     SetCode(acbil1C);
     Save(acbil1C);
 }
        private void SyncAccountBilling( AccountBillingInfo abi,object curaccount, Account a) 
        {
            object accbill = Open("Справочник.яКонтрагенты");

           // var current = _type1C.InvokeMember("ИспользоватьВладельца", BindingFlags.Public | BindingFlags.InvokeMethod, null, accbill, new object[] { curaccount });
            var currentabi = FindByCode(accbill, abi.Code1C);
            if (currentabi != null)
            {
                UpdateAccountBilling(accbill, abi, curaccount);
            }
            else {
                Create(accbill);
                UpdateAccountBilling(accbill, abi, curaccount); 
            }
        
        }
 private void UpdateAccountBilling(object acbill1C, AccountBillingInfo abi, object curaccount) 
 {
     Set(acbill1C, "Руководитель", abi.NameRukovod);
     Set(acbill1C, "Владелец", curaccount);
     Set(acbill1C, "ДолжностьРуководителя", abi.DoljnostRukovod);
     Set(acbill1C, "РуководительДействуетНаОсновании", abi.GroundsOf);
    // Set(acbill1C,"ОГРН",abi.)
     Save(acbill1C);
 
 }