public void ClearFilter() { this.DateBegin = System.DateTime.MinValue; this.DateEnd = System.DateTime.MinValue; this.DateAccountBegin = System.DateTime.MinValue; this.DateAccountEnd = System.DateTime.MinValue; this.Bank = null; }
public void TestImportFailAccount() { IObjectSpace os; using (os = Application.CreateObjectSpace()) { crmBank bank = BankGet(os, "044525187", "ВТБ"); // Stream stream = GetTestDataStream("fmSAImportTest01.txt"); fmCSATaskImporterFile task = ImportTaskGet(os, bank, "VTB", "fmSAImportTest01.txt"); os.CommitChanges(); fmCSAImportResult result = task.ExecuteTask(GetTestDataStream("fmSAImportTest01.txt")); // Assert.AreEqual(result.ResultCode, -1); } }
protected fmCSAImportResult ImportNMB(IObjectSpace os) { crmBank bank = BankGet(os, "044579852", "НМБ"); fmCSATaskImporterFile task = ImportTaskGet(os, bank, "NMB", "fmSAImportTest03.txt"); crmCLegalPerson pers = LegalPersonGet(os, "2518", "НПО машиностроения", "5012039795", "509950001"); crmBankAccount acc; acc = BankAccountGet(os, bank, "40502810000000000007", pers.Person); acc.PrefferedParty = pers.Party; os.CommitChanges(); fmCSAImportResult result = task.ExecuteTask(GetTestDataStream("fmSAImportTest03.txt")); return(result); }
protected crmBank BankGet(IObjectSpace os, String BIC, String Name) { if (_banks.ContainsKey(BIC)) { return(os.GetObject <crmBank>(_banks[BIC])); } else { crmBank bank = os.CreateObject <crmBank>(); bank.RCBIC = BIC; bank.Name = Name; _banks[BIC] = bank; return(bank); } }
// private fmCSATaskImporterFile _ImportTask; protected fmCSATaskImporterFile ImportTaskGet(IObjectSpace os, crmBank bank, String code, String path) { if (_tasks.ContainsKey(bank.Oid)) { return(os.GetObject <fmCSATaskImporterFile>(_tasks[bank.Oid])); } else { fmCSATaskImporterFile task = os.CreateObject <fmCSATaskImporterFile>(); task.Code = code; task.Importer = ImporterGet(os); task.Bank = bank; task.CheckedPath = path; _tasks[bank.Oid] = task; return(task); } }
protected crmBankAccount BankAccountGet(IObjectSpace os, crmBank bank, String number, crmCPerson pers) { if (_accounts.ContainsKey(bank.Oid) && _accounts[bank.Oid].ContainsKey(number)) { return(os.GetObject <crmBankAccount>(_accounts[bank.Oid][number])); } else { crmBankAccount acc = os.CreateObject <crmBankAccount>(); acc.Bank = bank; acc.Number = number; acc.Person = pers; if (!_accounts.ContainsKey(bank.Oid)) { _accounts[bank.Oid] = new Dictionary <string, crmBankAccount>(); } _accounts[bank.Oid][number] = acc; return(acc); } }
protected fmCSAImportResult ImportVTB(IObjectSpace os) { crmBank bank = BankGet(os, "044525187", "ВТБ"); fmCSATaskImporterFile task = ImportTaskGet(os, bank, "VTB", "fmSAImportTest01.txt"); crmCLegalPerson pers = LegalPersonGet(os, "2518", "НПО машиностроения", "5012039795", "509950001"); crmBankAccount acc; acc = BankAccountGet(os, bank, "40702840500030002016", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40702840200030002015", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40702810400030003459", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40702978400030001542", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40702978100030001541", pers.Person); acc.PrefferedParty = pers.Party; os.CommitChanges(); fmCSAImportResult result = task.ExecuteTask(GetTestDataStream("fmSAImportTest01.txt")); return(result); }
protected fmCSAImportResult ImportEVF(IObjectSpace os) { crmBank bank = BankGet(os, "044525204", "Еврофинанс"); fmCSATaskImporterFile task = ImportTaskGet(os, bank, "EVF", "fmSAImportTest04.txt"); crmCLegalPerson pers = LegalPersonGet(os, "2518", "НПО машиностроения", "5012039795", "509950001"); crmBankAccount acc; acc = BankAccountGet(os, bank, "40702810000002651190", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40702840500002651039", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40702840500002651181", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40702840600002651191", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40702978200002651188", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40702978300002651198", pers.Person); acc.PrefferedParty = pers.Party; os.CommitChanges(); fmCSAImportResult result = task.ExecuteTask(GetTestDataStream("fmSAImportTest04.txt")); return(result); }
protected fmCSAImportResult ImportSBRF(IObjectSpace os) { crmBank bank = BankGet(os, "044525225", "Сбербанк"); fmCSATaskImporterFile task = ImportTaskGet(os, bank, "SBRF", "fmSAImportTest02.txt"); crmCLegalPerson pers = LegalPersonGet(os, "2518", "НПО машиностроения", "5012039795", "509950001"); crmBankAccount acc; acc = BankAccountGet(os, bank, "40502810240040102530", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40502810940040105316", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40502840440040202530", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40502840540040102530", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40502978040040202530", pers.Person); acc.PrefferedParty = pers.Party; acc = BankAccountGet(os, bank, "40502978140040102530", pers.Person); acc.PrefferedParty = pers.Party; os.CommitChanges(); fmCSAImportResult result = task.ExecuteTask(GetTestDataStream("fmSAImportTest02.txt")); return(result); }