Exemple #1
0
        private void backgroundWorker报价_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            switch (e.ProgressPercentage)
            {
            case 0:
                this.toolStripStatusLabel时间.Text = DateTime.Now.ToString("HH:mm:ss");

                break;

            case 1:
                AASClient.AASServiceReference.DbDataSet.平台用户DataTable 平台用户DataTable1 = e.UserState as AASClient.AASServiceReference.DbDataSet.平台用户DataTable;
                Tool.RefreshDrcjDataTable(Program.serverDb.平台用户, 平台用户DataTable1, new string[] { "用户名" });
                Program.Current平台用户 = Program.serverDb.平台用户.First(r => r.用户名 == Program.Current平台用户.用户名);
                break;

            case 2:
                AASClient.AASServiceReference.DbDataSet.额度分配DataTable TradeLimitDataTable = e.UserState as AASClient.AASServiceReference.DbDataSet.额度分配DataTable;
                Tool.RefreshDrcjDataTable(Program.serverDb.额度分配, TradeLimitDataTable, new string[] { "证券代码" });

                foreach (HqForm HqForm1 in this.hqForm)
                {
                    //HqForm1.comboBox代码.AutoCompleteCustomSource.Clear();

                    //foreach (AASClient.AASServiceReference.DbDataSet.额度分配Row 交易额度Row1 in Program.serverDb.额度分配)
                    //{
                    //    HqForm1.comboBox代码.AutoCompleteCustomSource.Add(string.Format("{0} {1} {2}", 交易额度Row1.证券代码, 交易额度Row1.拼音缩写, 交易额度Row1.证券名称));
                    //    HqForm1.comboBox代码.AutoCompleteCustomSource.Add(string.Format("{0} {1} {2}", 交易额度Row1.拼音缩写, 交易额度Row1.证券代码, 交易额度Row1.证券名称));
                    //}
                }
                break;

            case 3:

                break;

            case 4:
                AASClient.AASServiceReference.JyDataSet.成交DataTable 成交DataTable1 = e.UserState as AASClient.AASServiceReference.JyDataSet.成交DataTable;
                Tool.RefreshDrcjDataTable(Program.jyDataSet.成交, 成交DataTable1, new string[] { "组合号", "委托编号", "成交编号" });
                break;

            case 5:
                RefreshOrder(e);

                break;

            case 6:
                AASClient.AASServiceReference.DbDataSet.订单DataTable 订单DataTable1 = e.UserState as AASClient.AASServiceReference.DbDataSet.订单DataTable;
                Tool.RefreshDrcjDataTable(Program.serverDb.订单, 订单DataTable1, new string[] { "组合号", "证券代码" });

                break;

            case 7:
                AASClient.AASServiceReference.DbDataSet.已平仓订单DataTable 已平仓订单DataTable1 = e.UserState as AASClient.AASServiceReference.DbDataSet.已平仓订单DataTable;
                Program.serverDb.已平仓订单.Clear();
                Program.serverDb.已平仓订单.Merge(已平仓订单DataTable1);


                AASClient.AASServiceReference.JyDataSet.业绩统计DataTable 业绩统计DataTable2 = this.Generate业绩统计();
                Tool.RefreshDrcjDataTable(Program.jyDataSet.业绩统计, 业绩统计DataTable2, new string[] { "证券代码" });
                break;

            default:
                break;
            }
        }