示例#1
0
        private void BindBookkeepingRecords()
        {
            switch (SelectedSourceType)
            {
            case SourceType.File:
                switch (SelectedClearingHouse)
                {
                case ClearingHouse.IB:
                    string xml = String.Empty;
                    CSVtoXMLConverter.Convert(SelectedFileName, "Bookkeeping", out xml);
                    BindXmlString(xml, "Row");
                    break;

                default:
                    dataGridView1.DataSource = null;
                    break;
                }
                break;

            case SourceType.Database:
                DateTime?lastImportDate = null;
                switch (SelectedClearingHouse)
                {
                case ClearingHouse.IB:
                    BindDataset(ReconciliationLib.Utilities.GetIBTransfers(ImportDate, null, ref lastImportDate));
                    break;

                default:
                    dataGridView1.DataSource = null;
                    break;
                }
                LastImportDate = lastImportDate;
                break;
            }
        }
示例#2
0
        private void BindTaxlotRecords()
        {
            switch (SelectedSourceType)
            {
            case SourceType.File:
                switch (SelectedClearingHouse)
                {
                case ClearingHouse.Pershing:
                    BindTaxlotRecords <PershingAggregatedTaxlotRecord>();
                    break;

                case ClearingHouse.TCW:
                    string xml = String.Empty;
                    CSVtoXMLConverter.Convert(SelectedFileName, "Taxlots", out xml);
                    BindXmlString(xml, "Row");
                    break;

                default:
                    dataGridView1.DataSource = null;
                    break;
                }
                break;

            case SourceType.Database:
                DateTime?lastImportDate = null;
                switch (SelectedClearingHouse)
                {
                case ClearingHouse.Pershing:
                    BindDataset(ReconciliationLib.Utilities.GetPershingTaxlots(ImportDate, null, ref lastImportDate));
                    break;

                case ClearingHouse.TCW:
                    BindDataset(ReconciliationLib.Utilities.GetTCWTaxlots(ImportDate, null, ref lastImportDate));
                    break;

                default:
                    dataGridView1.DataSource = null;
                    break;
                }
                LastImportDate = lastImportDate;
                break;
            }
        }
示例#3
0
        private void BindDividendRecords()
        {
            switch (SelectedSourceType)
            {
            case SourceType.File:
                switch (SelectedClearingHouse)
                {
                case ClearingHouse.WellsFargo:
                    BindXmlFile(SelectedFileName, SelectedRowName);
                    break;

                case ClearingHouse.IB:
                    string xml = String.Empty;
                    CSVtoXMLConverter.Convert(SelectedFileName, "Dividends", out xml);
                    BindXmlString(xml, "Row");
                    break;

                default:
                    dataGridView1.DataSource = null;
                    break;
                }
                break;

            case SourceType.Database:
                DateTime?lastImportDate = null;
                switch (SelectedClearingHouse)
                {
                case ClearingHouse.IB:
                    BindDataset(ReconciliationLib.Utilities.GetIBCorporateActions(ImportDate, null, ref lastImportDate));
                    break;

                default:
                    dataGridView1.DataSource = null;
                    break;
                }
                LastImportDate = lastImportDate;
                break;
            }
        }
示例#4
0
        private void BindPositionRecords()
        {
            switch (SelectedSourceType)
            {
            case SourceType.File:
                switch (SelectedClearingHouse)
                {
                case ClearingHouse.Pershing:
                    BindPositionRecords <PershingPositionRecord>();
                    break;

                case ClearingHouse.WellsFargo:
                    BindXmlFile(SelectedFileName, SelectedRowName);
                    break;

                case ClearingHouse.MorganStanley:
                case ClearingHouse.BONY:
                case ClearingHouse.ICBC:
                case ClearingHouse.IB:
                    string xml = String.Empty;
                    CSVtoXMLConverter.Convert(SelectedFileName, "Positions", out xml);
                    BindXmlString(xml, "Row");
                    break;

                default:
                    dataGridView1.DataSource = null;
                    break;
                }
                break;

            case SourceType.Database:
                DateTime?lastImportDate = null;
                switch (SelectedClearingHouse)
                {
                case ClearingHouse.Pershing:
                    BindDataset(ReconciliationLib.Utilities.GetPershingPositions(ImportDate, null, ref lastImportDate));
                    break;

                case ClearingHouse.WellsFargo:
                    BindDataset(ReconciliationLib.Utilities.GetWellsFargoPositions(ImportDate, null, ref lastImportDate));
                    break;

                case ClearingHouse.MorganStanley:
                    BindDataset(ReconciliationLib.Utilities.GetMorganStanleyPositions(ImportDate, null, ref lastImportDate));
                    break;

                case ClearingHouse.Liquid:
                    BindDataset(ReconciliationLib.Utilities.GetLiquidPositions(ImportDate, null, ref lastImportDate));
                    break;

                case ClearingHouse.BONY:
                    BindDataset(ReconciliationLib.Utilities.GetBONYPositions(ImportDate, null, ref lastImportDate));
                    break;

                case ClearingHouse.ICBC:
                    BindDataset(ReconciliationLib.Utilities.GetICBCPositions(ImportDate, null, ref lastImportDate));
                    break;

                case ClearingHouse.IB:
                    BindDataset(ReconciliationLib.Utilities.GetIBPositions(ImportDate, null, ref lastImportDate));
                    break;

                default:
                    dataGridView1.DataSource = null;
                    break;
                }
                LastImportDate = lastImportDate;
                break;
            }
        }