private void backgroundWorkerSearch_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpServer.Enabled = true;
            this.GrpNotice.Enabled = true;
            this.Cursor            = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;
            if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(mResult[0, 0].oContent.ToString());
                return;
            }

            Operation_GD.BuildDataTable(this.m_ClientEvent, mResult, GrdNotice, out iPageCount);

            if (iPageCount <= 1)
            {
                pnlNotice.Visible = false;
            }
            else
            {
                for (int i = 0; i < iPageCount; i++)
                {
                    cmbNotice.Items.Add(i + 1);
                }

                cmbNotice.SelectedIndex = 0;
                pageNotice        = true;
                pnlNotice.Visible = true;
            }
        }
Beispiel #2
0
        private void backgroundWorkerPurchaseLog_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpSearch.Enabled = true;
            this.tbcResult.Enabled = true;
            this.Cursor            = Cursors.Default;//改变鼠标状态

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;
            if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(mResult[0, 0].oContent.ToString());
                return;
            }

            Operation_GD.BuildDataTable(this.m_ClientEvent, mResult, GrdPurchaseResult, out iPageCount);

            if (iPageCount <= 1)
            {
                this.PnlPurchaseLog.Visible = false;
            }
            else
            {
                for (int i = 0; i < iPageCount; i++)
                {
                    this.CmbPurchaseLog.Items.Add(i + 1);
                }

                this.CmbPurchaseLog.SelectedIndex = 0;
                this.pagePurchaseInfo             = true;
                this.PnlPurchaseLog.Visible       = true;
            }
        }
        private void backgroundWorkerAdjutantQuery_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.tbcResult.Enabled        = true;
            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;
            if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(mResult[0, 0].oContent.ToString());
                this.pnlAdjutant.Visible = false;//隐藏翻页功能
                return;
            }

            Operation_GD.BuildDataTable(this.m_ClientEvent, mResult, GrdAdjutant, out iPageCount);
            if (iPageCount <= 0)
            {
                this.pnlAdjutant.Visible = false;
            }
            else
            {
                for (int i = 0; i < iPageCount; i++)
                {
                    this.CmbAdjutant.Items.Add(i + 1);
                }

                this.CmbAdjutant.SelectedIndex = 0;
                this.pageAdjutant        = true;
                this.pnlAdjutant.Visible = true;
            }
        }
        private void backgroundWorkerActiveCode_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.GrpSearch.Enabled        = true;
            this.Cursor                   = Cursors.Default;//改变鼠标状态
            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;
            if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(mResult[0, 0].oContent.ToString());
                return;
            }

            Operation_GD.BuildDataTable(this.m_ClientEvent, mResult, dgvResult, out iPageCount);
        }