///// <summary>
        ///// 导出全部
        ///// </summary>
        //public override void ExportAllAction(UltraGrid paramGrid, string paramGridName = "")
        //{
        //    paramGridName = tabControlFull.Tabs[SysConst.EN_LIST].Selected ? "经营情况统计" : "销售业绩明细";
        //    ManagementSituationReportQCModel tempConditionDS = new ManagementSituationReportQCModel()
        //    {
        //        //SqlId
        //        SqlId = tabControlFull.Tabs[SysConst.EN_LIST].Selected ? SQLID.RPT_ManagementSituationReport_SQL01 : SQLID.RPT_ManagementSituationReport_SQL02,
        //        //组织ID
        //        OrgID = mcbWhere_Org.SelectedValue,
        //        PageIndex = 1,
        //        PageSize = null
        //    };
        //    if (this.dtWhere_StatisticsTimeStart.Value != null)
        //    {
        //        //统计时间-开始
        //        tempConditionDS.StartTime = this.dtWhere_StatisticsTimeStart.DateTime;
        //    }
        //    if (this.dtWhere_StatisticsTimeEnd.Value != null)
        //    {
        //        //统计时间-终了
        //        tempConditionDS.EndTime = this.dtWhere_StatisticsTimeEnd.DateTime;
        //    }

        //    if (tabControlFull.Tabs[SysConst.EN_LIST].Selected)
        //    {
        //        List<ManagementSituationTotalReportUIModel> resultAllList = new List<ManagementSituationTotalReportUIModel>();
        //        _bll.QueryForList(SQLID.RPT_ManagementSituationReport_SQL01, tempConditionDS, resultAllList);

        //        decimal totalAccountPayableAmountOfCurPage = 0;
        //        decimal totalPaidAmountOfCurPage = 0;
        //        decimal totalAccountPayableAmountOfAllPage = 0;
        //        decimal totalPaidAmountOfAllPage = 0;

        //        if (resultAllList.Count > 0)
        //        {
        //            ManagementSituationTotalReportUIModel subObject = resultAllList[0];
        //            //totalAccountPayableAmountOfAllPage = (subObject.TotalSalesAmount ?? 0);
        //            //totalPaidAmountOfAllPage = (subObject.TotalSalesReturnAmount ?? 0);
        //        }

        //        foreach (var loopSotckInTotalItem in resultAllList)
        //        {
        //            totalAccountPayableAmountOfCurPage += (loopSotckInTotalItem.StatisticsAmount ?? 0);
        //            //totalPaidAmountOfCurPage += (loopSotckInTotalItem.SalesReturnAmount ?? 0);
        //        }

        //        ManagementSituationTotalReportUIModel curPageTotal = new ManagementSituationTotalReportUIModel
        //        {
        //            StatisticsType = _sumCurPageDesc,
        //            StatisticsAmount = Math.Round(totalAccountPayableAmountOfCurPage, 2),
        //            //SalesReturnAmount = Math.Round(totalPaidAmountOfCurPage, 2)
        //        };
        //        resultAllList.Add(curPageTotal);

        //        ManagementSituationTotalReportUIModel allPageTotal = new ManagementSituationTotalReportUIModel
        //        {
        //            StatisticsType = _sumAllPageDesc,
        //            StatisticsAmount = Math.Round(totalAccountPayableAmountOfAllPage, 2),
        //            //SalesReturnAmount = Math.Round(totalPaidAmountOfAllPage, 2)
        //        };
        //        resultAllList.Add(allPageTotal);

        //        UltraGrid allGrid = ManagementSituationReportGrid;
        //        allGrid.DataSource = resultAllList;
        //        allGrid.DataBind();

        //        base.ExportAllAction(allGrid, paramGridName);

        //        ManagementSituationReportGrid.DataSource = _managementSituationTotalReportDs;
        //        ManagementSituationReportGrid.DataBind();
        //    }
        //    else
        //    {
        //        List<ManagementSituationDetailReportUIModel> resultAllList = new List<ManagementSituationDetailReportUIModel>();
        //        _bll.QueryForList(SQLID.RPT_ManagementSituationReport_SQL02, tempConditionDS, resultAllList);

        //        decimal totalSalesPerforamnceQtyOfCurPage = 0;
        //        decimal totalSalesPerforamnceAmountOfCurPage = 0;

        //        //foreach (var loopDetail in resultAllList)
        //        //{
        //        //    totalSalesPerforamnceQtyOfCurPage += (loopDetail.DetailSalesQty ?? 0);
        //        //    totalSalesPerforamnceAmountOfCurPage += (loopDetail.DetailSalesAmount ?? 0);
        //        //}
        //        //ManagementSituationDetailReportUIModel curPageTotal = new ManagementSituationDetailReportUIModel
        //        //{
        //        //    SO_CustomerName = _sumCurPageDesc,
        //        //    DetailSalesQty = Math.Round(totalSalesPerforamnceQtyOfCurPage, 0),
        //        //    DetailSalesAmount = Math.Round(totalSalesPerforamnceAmountOfCurPage, 2)
        //        //};
        //        //resultAllList.Add(curPageTotal);

        //        //ManagementSituationDetailReportUIModel allPageTotal = new ManagementSituationDetailReportUIModel
        //        //{
        //        //    SO_CustomerName = _sumAllPageDesc,
        //        //    DetailSalesQty = Math.Round(totalSalesPerforamnceQtyOfAllPage, 0),
        //        //    DetailSalesAmount = Math.Round(totalSalesPerforamnceAmountOfAllPage, 2)
        //        //};
        //        //resultAllList.Add(allPageTotal);

        //        UltraGrid allGrid = TJSalesByTimeGrid;
        //        allGrid.DataSource = resultAllList;
        //        allGrid.DataBind();

        //        base.ExportAllAction(allGrid, paramGridName);

        //        TJSalesByTimeGrid.DataSource = _statisticsSalesByTimeReportDs;
        //        TJSalesByTimeGrid.DataBind();
        //    }
        //}

        #endregion

        #endregion

        #region 自定义方法

        /// <summary>
        /// 初始化【列表】Tab内控件
        /// </summary>
        private void InitializeListTabControls()
        {
            #region 初始化下拉框

            //组织
            _orgList = LoginInfoDAX.OrgList;
            mcbWhere_Org.DisplayMember = SystemTableColumnEnums.SM_Organization.Code.Org_ShortName;
            mcbWhere_Org.ValueMember   = SystemTableColumnEnums.SM_Organization.Code.Org_ID;
            mcbWhere_Org.DataSource    = _orgList;

            #endregion

            #region 查询条件初始化
            //组织
            mcbWhere_Org.Clear();
            //统计时间开始
            dtWhere_StatisticsTimeStart.Value = null;
            //统计时间结束
            dtWhere_StatisticsTimeEnd.Value = null;
            //给 组织 设置焦点
            mcbWhere_Org.Focus();

            //设置默认值
            ckByTimeIsContainReturn.Checked = false;
            rbByMonth.Checked = true;
            ckByProductIsContainReturn.Checked  = false;
            rbSellTopTenProduct.Checked         = true;
            ckByCustomerIsContainReturn.Checked = false;
            rbSalesAmountTopTenCustomer.Checked = true;
            #endregion

            #region Grid初始化

            //经营情况统计汇总数据源
            _managementSituationTotalReportDs        = new List <ManagementSituationTotalReportUIModel>();
            ManagementSituationReportGrid.DataSource = _managementSituationTotalReportDs;
            ManagementSituationReportGrid.DataBind();

            //【销售统计】根据时间统计销售数据源
            _statisticsSalesByTimeReportDs = new List <ManagementSituationDetailReportUIModel>();
            TJSalesByTimeGrid.DataSource   = _statisticsSalesByTimeReportDs;
            TJSalesByTimeGrid.DataBind();

            //【销售统计】根据产品统计销售数据源
            _statisticsSalesByProductReportDs = new List <ManagementSituationDetailReportUIModel>();
            TJSalesByProductGrid.DataSource   = _statisticsSalesByProductReportDs;
            TJSalesByProductGrid.DataBind();

            //【销售统计】根据客户统计销售数据源
            _statisticsSalesByCustomerReportDs = new List <ManagementSituationDetailReportUIModel>();
            TJSalesByCustomerGrid.DataSource   = _statisticsSalesByCustomerReportDs;
            TJSalesByCustomerGrid.DataBind();
            #endregion
        }
        /// <summary>
        /// 清空
        /// </summary>
        public override void ClearAction()
        {
            #region 查询条件初始化
            //组织
            mcbWhere_Org.Clear();
            //统计时间开始
            dtWhere_StatisticsTimeStart.Value = null;
            //统计时间结束
            dtWhere_StatisticsTimeEnd.Value = null;
            //给 组织 设置焦点
            mcbWhere_Org.Focus();

            //设置默认值
            ckByTimeIsContainReturn.Checked = false;
            rbByMonth.Checked = true;
            ckByProductIsContainReturn.Checked  = false;
            rbSellTopTenProduct.Checked         = true;
            ckByCustomerIsContainReturn.Checked = false;
            rbSalesAmountTopTenCustomer.Checked = true;
            #endregion

            #region Grid初始化
            if (tabControlFull.Tabs[SysConst.EN_LIST].Selected)
            {
                //经营情况统计汇总数据源
                _managementSituationTotalReportDs        = new List <ManagementSituationTotalReportUIModel>();
                ManagementSituationReportGrid.DataSource = _managementSituationTotalReportDs;
                ManagementSituationReportGrid.DataBind();
            }
            else
            {
                //【销售统计】根据时间统计销售数据源
                _statisticsSalesByTimeReportDs = new List <ManagementSituationDetailReportUIModel>();
                TJSalesByTimeGrid.DataSource   = _statisticsSalesByTimeReportDs;
                TJSalesByTimeGrid.DataBind();

                //【销售统计】根据产品统计销售数据源
                _statisticsSalesByProductReportDs = new List <ManagementSituationDetailReportUIModel>();
                TJSalesByProductGrid.DataSource   = _statisticsSalesByProductReportDs;
                TJSalesByProductGrid.DataBind();

                //【销售统计】根据客户统计销售数据源
                _statisticsSalesByCustomerReportDs = new List <ManagementSituationDetailReportUIModel>();
                TJSalesByCustomerGrid.DataSource   = _statisticsSalesByCustomerReportDs;
                TJSalesByCustomerGrid.DataBind();
            }
            #endregion
        }
        /// <summary>
        /// 查询经营情况统计汇总
        /// </summary>
        private void QueryManagementSituationTotalReport()
        {
            try
            {
                ManagementSituationReportQCModel argsModel = ConditionDS;

                argsModel.SqlId = SQLID.RPT_ManagementSituationReport_SQL01;

                _managementSituationTotalReportDs = new List <ManagementSituationTotalReportUIModel>();
                _bll.QueryForList(argsModel.SqlId, argsModel, _managementSituationTotalReportDs);

                ManagementSituationReportGrid.DataSource = _managementSituationTotalReportDs;
                ManagementSituationReportGrid.DataBind();
                ManagementSituationReportGrid.DisplayLayout.Bands[0].PerformAutoResizeColumns(true, PerformAutoSizeType.VisibleRows);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }