Exemple #1
0
        public void Search()
        {
            if (UserInfoDto.RoleType == "R" && string.IsNullOrEmpty(btnShopCode.Text))
            {
                CommonHandler.ShowMessage(MessageType.Information, "请选择经销商");
                return;
            }
            grcShopScore.DataSource = null;
            string projectCode       = CommonHandler.GetComboBoxSelectedValue(cboProject).ToString();
            string shopCode          = btnShopCode.Text;
            bool   scoreChk          = chkScore.Checked;
            bool   photoScoreChk     = chkPhotoScore.Checked;
            bool   mScoreChk         = chkMScore.Checked;
            bool   lossCheck         = chkLoss.Checked;
            string province          = txtProvince.Text.Trim();
            string city              = txtCity.Text.Trim();
            string group             = txtGroup.Text.Trim();
            string salesOrAfterSales = txtSalesOrAftersales.Text.Trim();
            string carType           = txtCarType.Text.Trim();

            List <TwoLevelColumnInfo>           columnInfoList = SearchHead(projectCode, scoreChk, lossCheck);
            List <SalesConsultantReportBodyDto> dataList       = SearchBodyData(projectCode, province, city, group, salesOrAfterSales, carType, shopCode, scoreChk, lossCheck);
            List <SalesConsultantReportDto>     leftList       = SearchLeft(projectCode, province, city, group, salesOrAfterSales, carType, shopCode);

            DynamicColumnDataSet <TwoLevelColumnInfo, SalesConsultantReportBodyDto, SalesConsultantReportDto> list = new DynamicColumnDataSet <TwoLevelColumnInfo, SalesConsultantReportBodyDto, SalesConsultantReportDto>(columnInfoList, dataList, leftList);

            if (list != null && list.ColumnInfoList != null)
            {
                list.DtoList = DynamicColumnUtil.CombineDynamicColumnDto <TwoLevelColumnInfo, SalesConsultantReportBodyDto, SalesConsultantReportDto>(list.ColumnInfoList, list.DataList, list.DtoList);
            }
            CommonHandler.BuildDynamicColumn <TwoLevelColumnInfo, SalesConsultantReportDto>(grvShopScore, list.ColumnInfoList, list.DtoList);

            grvShopScore.LeftCoord = 0;
        }
Exemple #2
0
        public void Search()
        {
            if (UserInfoDto.RoleType == "R" && string.IsNullOrEmpty(btnShopCode.Text))
            {
                CommonHandler.ShowMessage(MessageType.Information, "请选择经销商");
                return;
            }

            grcShopScore.DataSource = null;
            string projectCode       = CommonHandler.GetComboBoxSelectedValue(cboProject).ToString();
            string shopCode          = btnShopCode.Text;
            bool   scoreChk          = chkScore.Checked;
            bool   photoScoreChk     = chkPhotoScore.Checked;
            bool   mScoreChk         = chkMScore.Checked;
            bool   lossCheck         = chkLoss.Checked;
            string province          = txtProvince.Text.Trim();
            string city              = txtCity.Text.Trim();
            string group             = txtGroup.Text.Trim();
            string salesOrAfterSales = txtSalesOrAftersales.Text.Trim();
            string carType           = txtCarType.Text.Trim();

            List <TwoLevelColumnInfo> columnInfoList = SearchHead(projectCode, shopCode, province, city, group, salesOrAfterSales, carType, lossCheck, scoreChk, photoScoreChk, mScoreChk);
            List <ShopScoreBodyDto>   dataList       = SearchBodyData(projectCode, shopCode, province, city, group, salesOrAfterSales, carType, lossCheck, scoreChk, photoScoreChk, mScoreChk);
            List <ShopScoreInfoDto>   leftList       = SearchLeft(projectCode);

            DynamicColumnDataSet <TwoLevelColumnInfo, ShopScoreBodyDto, ShopScoreInfoDto> list = new DynamicColumnDataSet <TwoLevelColumnInfo, ShopScoreBodyDto, ShopScoreInfoDto>(columnInfoList, dataList, leftList);

            if (list != null && list.ColumnInfoList != null)
            {
                list.DtoList = DynamicColumnUtil.CombineDynamicColumnDto <TwoLevelColumnInfo, ShopScoreBodyDto, ShopScoreInfoDto>(list.ColumnInfoList, list.DataList, list.DtoList);
            }
            CommonHandler.BuildDynamicColumn <TwoLevelColumnInfo, ShopScoreInfoDto>(grvShopScore, list.ColumnInfoList, list.DtoList);
            foreach (GridColumn col in grvShopScore.Columns)
            {
                for (int i = 0; i < grvShopScore.RowCount; i++)
                {
                    if (col.Caption != "失分说明")
                    {
                        if ((grvShopScore.GetRowCellValue(i, col) == null || grvShopScore.GetRowCellValue(i, col).ToString() == ""))
                        {
                            grvShopScore.SetRowCellValue(i, col, "--");
                        }
                    }
                    else
                    {
                        if (grvShopScore.GetRowCellValue(i, col) != null && grvShopScore.GetRowCellValue(i, col).ToString() == "@@")
                        {
                            grvShopScore.SetRowCellValue(i, col, "");
                        }
                    }
                }
            }
            grvShopScore.LeftCoord = 0;
        }
        public static Dictionary <int, GridColumn> BuildDynamicColumn <ColumnInfoType, DtoType>(BandedGridView gridView, List <ColumnInfoType> columnInfoList, List <DtoType> dtoList)
            where ColumnInfoType : DynamicColumnInfo
            where DtoType : BufferColumnDto
        {
            gridView.BeginUpdate();
            gridView.GridControl.DataSource = null;

            ArrayList bandCollection = new ArrayList(gridView.Bands);
            GridBand  band           = null;

            for (int i = 0; i < bandCollection.Count; i++)
            {
                band = (GridBand)bandCollection[i];
                if (band.Name.StartsWith(DynamicColumnInfo.UNIQUE_NAME_PREFIX))
                {
                    gridView.Bands.Remove(band);
                }
            }

            ArrayList        columnCollection = new ArrayList(gridView.Columns);
            BandedGridColumn column           = null;

            for (int i = 0; i < columnCollection.Count; i++)
            {
                column = (BandedGridColumn)columnCollection[i];
                if (column.Name.StartsWith(DynamicColumnInfo.UNIQUE_NAME_PREFIX))
                {
                    gridView.Columns.Remove(column);
                }
            }

            DynamicColumnUtil.SortDynamicColumnInfo <ColumnInfoType>(columnInfoList);
            Dictionary <int, GridColumn> columnDic = new Dictionary <int, GridColumn>();

            foreach (DynamicColumnInfo columnInfo in columnInfoList)
            {
                AddBandAndColumn(gridView, columnDic, columnInfo);
            }

            gridView.EndUpdate();
            gridView.GridControl.DataSource = dtoList;

            return(columnDic);
        }
Exemple #4
0
        public void Search()
        {
            grcShopScore.DataSource = null;
            string projectCode = CommonHandler.GetComboBoxSelectedValue(cboProject).ToString();
            string shopCode    = btnShopCode.Text;
            bool   lossCheck   = chkLoss.Checked;
            bool   recheck     = chkRecheck.Checked;
            bool   all         = chkAll.Checked;
            List <TwoLevelColumnInfo> columnInfoList = SearchHead(projectCode, shopCode);
            List <ShopScoreBodyDto>   dataList       = SearchBodyData(projectCode, shopCode, lossCheck, recheck, all);
            List <ShopScoreInfoDto>   leftList       = SearchLeft(projectCode);

            DynamicColumnDataSet <TwoLevelColumnInfo, ShopScoreBodyDto, ShopScoreInfoDto> list = new DynamicColumnDataSet <TwoLevelColumnInfo, ShopScoreBodyDto, ShopScoreInfoDto>(columnInfoList, dataList, leftList);

            if (list != null && list.ColumnInfoList != null)
            {
                list.DtoList = DynamicColumnUtil.CombineDynamicColumnDto <TwoLevelColumnInfo, ShopScoreBodyDto, ShopScoreInfoDto>(list.ColumnInfoList, list.DataList, list.DtoList);
            }

            //BindGrid

            CommonHandler.BuildDynamicColumn <TwoLevelColumnInfo, ShopScoreInfoDto>(grvShopScore, list.ColumnInfoList, list.DtoList);

            //foreach(DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn
            foreach (GridColumn col in grvShopScore.Columns)
            {
                for (int i = 0; i < grvShopScore.RowCount; i++)
                {
                    if (grvShopScore.GetRowCellValue(i, col) == null || grvShopScore.GetRowCellValue(i, col).ToString() == "")
                    {
                        grvShopScore.SetRowCellValue(i, col, "--");
                    }
                }
                //RepositoryItemTextEdit textBox = new RepositoryItemTextEdit();
                //((System.ComponentModel.ISupportInitialize)(textBox)).BeginInit();
                //this.grcShopScore.RepositoryItems.Add(textBox);
                //textBox.Properties.NullText = "--";
                //col.ColumnEdit = textBox;
                //((System.ComponentModel.ISupportInitialize)(textBox)).EndInit();
            }
            grvShopScore.LeftCoord = 0;
        }
        public void Search()
        {
            grcShopScore.DataSource = null;
            string projectCode = CommonHandler.GetComboBoxSelectedValue(cboProject).ToString();
            string type        = chkArea.Checked?"BigArea":"";
            List <TwoLevelColumnInfo> columnInfoList        = SearchHead(type);
            List <InspectionStandardReportBodyDto> dataList = SearchBodyData(projectCode, type);
            List <InspectionStandardReportDto>     leftList = SearchLeft(projectCode);

            DynamicColumnDataSet <TwoLevelColumnInfo, InspectionStandardReportBodyDto, InspectionStandardReportDto> list = new DynamicColumnDataSet <TwoLevelColumnInfo, InspectionStandardReportBodyDto, InspectionStandardReportDto>(columnInfoList, dataList, leftList);

            if (list != null && list.ColumnInfoList != null)
            {
                list.DtoList = DynamicColumnUtil.CombineDynamicColumnDto <TwoLevelColumnInfo, InspectionStandardReportBodyDto, InspectionStandardReportDto>(list.ColumnInfoList, list.DataList, list.DtoList);
            }

            CommonHandler.BuildDynamicColumn <TwoLevelColumnInfo, InspectionStandardReportDto>(grvShopScore, list.ColumnInfoList, list.DtoList);

            grvShopScore.LeftCoord = 0;
        }
Exemple #6
0
        public override void SearchButtonClick()
        {
            grcWeightRate.DataSource = null;
            string projectCode = CommonHandler.GetComboBoxSelectedValue(cboProject).ToString();
            string shopCode    = tbnShop.Text;
            List <TwoLevelColumnInfo>      columnInfoList = SearchHead(projectCode, shopCode);
            List <ScoreWeigthBodayRateDto> dataList       = SearchBodyData(projectCode, tbnChapter.Text, shopCode, true, chkFCheck.Checked);
            List <ScoreWeigthRateDto>      leftList       = SearchLeft(projectCode, tbnChapter.Text, chkFCheck.Checked);

            DynamicColumnDataSet <TwoLevelColumnInfo, ScoreWeigthBodayRateDto, ScoreWeigthRateDto> list = new DynamicColumnDataSet <TwoLevelColumnInfo, ScoreWeigthBodayRateDto, ScoreWeigthRateDto>(columnInfoList, dataList, leftList);

            if (list != null && list.ColumnInfoList != null)
            {
                list.DtoList = DynamicColumnUtil.CombineDynamicColumnDto <TwoLevelColumnInfo, ScoreWeigthBodayRateDto, ScoreWeigthRateDto>(list.ColumnInfoList, list.DataList, list.DtoList);
            }

            //BindGrid

            CommonHandler.BuildDynamicColumn <TwoLevelColumnInfo, ScoreWeigthRateDto>(grvWeightRate, list.ColumnInfoList, list.DtoList);
            grvWeightRate.LeftCoord = 0;
        }
Exemple #7
0
        void webService_SearchFinallyScoreRateCompleted(object sender, XHX.localhost.SearchFinallyScoreRateCompletedEventArgs e)
        {
            try
            {
                #region FinallyWeight

                DataSet[][] allResult = e.Result;

                DataSet[] result = allResult[0];

                DataSet leftDataSet     = result[2];
                DataSet bodyDataDataSet = result[1];
                DataSet headDataSet     = result[0];

                #region Head

                List <TwoLevelColumnInfo> columnInfoList = new List <TwoLevelColumnInfo>();
                if (headDataSet.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < headDataSet.Tables[0].Rows.Count; i++)
                    {
                        TwoLevelColumnInfo info = new TwoLevelColumnInfo();
                        info.Column1  = Convert.ToString(headDataSet.Tables[0].Rows[i]["Column1"]);
                        info.Column2  = Convert.ToString(headDataSet.Tables[0].Rows[i]["Column2"]);
                        info.Caption1 = Convert.ToString(headDataSet.Tables[0].Rows[i]["Caption1"]);
                        info.Caption2 = Convert.ToString(headDataSet.Tables[0].Rows[i]["Caption2"]);
                        info.Order    = Convert.ToInt32(headDataSet.Tables[0].Rows[i]["Order"]);
                        columnInfoList.Add(info);
                    }
                }

                #endregion

                #region Data

                List <FinallyScoreRateBodyDto> dataList = new List <FinallyScoreRateBodyDto>();
                if (bodyDataDataSet.Tables.Count > 0 && bodyDataDataSet.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < bodyDataDataSet.Tables[0].Rows.Count; i++)
                    {
                        FinallyScoreRateBodyDto info = new FinallyScoreRateBodyDto();
                        info.Column1     = Convert.ToString(bodyDataDataSet.Tables[0].Rows[i]["Column1"]);
                        info.Column2     = Convert.ToString(bodyDataDataSet.Tables[0].Rows[i]["Column2"]);
                        info.ChapterCode = Convert.ToString(bodyDataDataSet.Tables[0].Rows[i]["CharterCode"]);
                        if (bodyDataDataSet.Tables[0].Rows[i]["Value"] != DBNull.Value)
                        {
                            //string temp = Convert.ToString(Convert.ToDecimal(bodyDataDataSet.Tables[0].Rows[i]["Value"]) * 100);
                            //info.Value = temp.Split('.')[0] + "." + temp.Split('.')[1].Substring(0, 2) + "%";
                            info.Value = (Convert.ToDecimal(bodyDataDataSet.Tables[0].Rows[i]["Value"]) * 100).ToString("0.00") + "%";
                        }
                        else
                        {
                            info.Value = "0.00" + "%";
                        }
                        dataList.Add(info);
                    }
                }

                #endregion

                #region Left

                List <FinallyScoreRateDto> leftList = new List <FinallyScoreRateDto>();
                if (leftDataSet.Tables.Count > 0 && leftDataSet.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < leftDataSet.Tables[0].Rows.Count; i++)
                    {
                        FinallyScoreRateDto info = new FinallyScoreRateDto();
                        info.ChapterCode = Convert.ToString(leftDataSet.Tables[0].Rows[i]["CharterCode"]);
                        info.ChapterName = Convert.ToString(leftDataSet.Tables[0].Rows[i]["CharterName"]);
                        //info.Weight = Convert.ToDecimal(leftDataSet.Tables[0].Rows[i]["Weight"]);
                        leftList.Add(info);
                    }
                }

                #endregion

                DynamicColumnDataSet <TwoLevelColumnInfo, FinallyScoreRateBodyDto, FinallyScoreRateDto> list = new DynamicColumnDataSet <TwoLevelColumnInfo, FinallyScoreRateBodyDto, FinallyScoreRateDto>(columnInfoList, dataList, leftList);
                if (list != null && list.ColumnInfoList != null)
                {
                    list.DtoList = DynamicColumnUtil.CombineDynamicColumnDto <TwoLevelColumnInfo, FinallyScoreRateBodyDto, FinallyScoreRateDto>(list.ColumnInfoList, list.DataList, list.DtoList);
                }

                //BindGrid
                CommonHandler.BuildDynamicColumn <TwoLevelColumnInfo, FinallyScoreRateDto>(grvFinallyScoreRateForWeight, list.ColumnInfoList, list.DtoList);
                //InitGridControl(grcShopScore);
                //grvShopScore.SetAllColumnEditable(false);
                // grcAuditionPass.SetColumnEditableByColumn(true, gcAuditioinHis, gcResume, gcPassTypeCode, gcPassRemark, gcWorkYear);
                grvFinallyScoreRateForWeight.LeftCoord = 0;

                #endregion

                #region FinallyWeightRANK

                result = allResult[1];
                List <FinallyScoreRateRankDto> finallyScoreRateRankDtoList = new List <FinallyScoreRateRankDto>();
                if (result[0].Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < result[0].Tables[0].Rows.Count; i++)
                    {
                        FinallyScoreRateRankDto finallyScoreRateRankDto = new FinallyScoreRateRankDto();
                        finallyScoreRateRankDto.ProjectCode = Convert.ToString(result[0].Tables[0].Rows[i]["ProjectCode"]);
                        finallyScoreRateRankDto.ShopName    = Convert.ToString(result[0].Tables[0].Rows[i]["ShopName"]);
                        finallyScoreRateRankDto.Rate        = Convert.ToDecimal(result[0].Tables[0].Rows[i]["Rate"] == null ? 0 : result[0].Tables[0].Rows[i]["Rate"]);
                        finallyScoreRateRankDto.RANK        = Convert.ToInt32(result[0].Tables[0].Rows[i]["RANK"] == DBNull.Value ? 0 : result[0].Tables[0].Rows[i]["RANK"]);
                        finallyScoreRateRankDtoList.Add(finallyScoreRateRankDto);
                    }
                }

                grcFinallyScoreRateForOrder.DataSource = finallyScoreRateRankDtoList;

                #endregion
            }
            catch (Exception ex)
            {
                CommonHandler.ShowMessage(MessageType.Information, ex.Message); return;
            }
            finally
            {
                this.Enabled = true;
            }
        }
        private void webService_SearchScoreRateCompleted(object sender, XHX.localhost.SearchScoreRateCompletedEventArgs e)
        {
            try
            {
                DataSet[][] allResult = e.Result;

                #region Chapter

                DataSet[] result = allResult[0];

                DataSet leftDataSet     = result[2];
                DataSet bodyDataDataSet = result[1];
                DataSet headDataSet     = result[0];

                #region Head

                List <TwoLevelColumnInfo> columnInfoList = new List <TwoLevelColumnInfo>();
                if (headDataSet.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < headDataSet.Tables[0].Rows.Count; i++)
                    {
                        TwoLevelColumnInfo info = new TwoLevelColumnInfo();
                        info.Column1  = Convert.ToString(headDataSet.Tables[0].Rows[i]["Column1"]);
                        info.Column2  = Convert.ToString(headDataSet.Tables[0].Rows[i]["Column2"]);
                        info.Caption1 = Convert.ToString(headDataSet.Tables[0].Rows[i]["Caption1"]);
                        info.Caption2 = Convert.ToString(headDataSet.Tables[0].Rows[i]["Caption2"]);
                        info.Order    = Convert.ToInt32(headDataSet.Tables[0].Rows[i]["Order"]);
                        columnInfoList.Add(info);
                    }
                }
                List <TwoLevelColumnInfo> tempList = new List <TwoLevelColumnInfo>();
                for (int i = 0; i < columnInfoList.Count; i++)
                {
                    if (columnInfoList[i].Order > 4)
                    {
                        tempList.Add(columnInfoList[i]);
                    }
                }
                List <int> existOrderList = new List <int>();
                for (int i = 0; i < tempList.Count; i++)
                {
                    if (!existOrderList.Contains(tempList[i].Order))
                    {
                        tempList[i].Order = tempList[i].Order;// + i
                        existOrderList.Add(tempList[i].Order);
                    }
                    else
                    {
                        int tempOrder = tempList[i].Order;
                        while (existOrderList.Contains(tempOrder))
                        {
                            tempOrder++;
                        }
                        tempList[i].Order = tempOrder;// + i
                        existOrderList.Add(tempOrder);
                    }
                }
                List <TwoLevelColumnInfo> lastlist = new List <TwoLevelColumnInfo>();
                for (int i = 0; i < columnInfoList.Count; i++)
                {
                    if (columnInfoList[i].Order < 5)
                    {
                        lastlist.Add(columnInfoList[i]);
                    }
                }
                for (int i = 0; i < tempList.Count; i++)
                {
                    lastlist.Add(tempList[i]);
                }
                columnInfoList.Clear();
                columnInfoList = lastlist;

                #endregion

                #region Data

                List <ScoreRateForChapterBodyDto> dataList = new List <ScoreRateForChapterBodyDto>();
                if (bodyDataDataSet.Tables.Count > 0 && bodyDataDataSet.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < bodyDataDataSet.Tables[0].Rows.Count; i++)
                    {
                        ScoreRateForChapterBodyDto info = new ScoreRateForChapterBodyDto();
                        info.Column1     = Convert.ToString(bodyDataDataSet.Tables[0].Rows[i]["Column1"]);
                        info.Column2     = Convert.ToString(bodyDataDataSet.Tables[0].Rows[i]["Column2"]);
                        info.ChapterCode = Convert.ToString(bodyDataDataSet.Tables[0].Rows[i]["CharterCode"]);
                        if (bodyDataDataSet.Tables[0].Rows[i]["Value"] != DBNull.Value)
                        {
                            //string temp = Convert.ToString(Convert.ToDecimal(bodyDataDataSet.Tables[0].Rows[i]["Value"]) * 100);
                            //info.Value = temp.Split('.')[0] + "." + temp.Split('.')[1].Substring(0, 2) + "%";
                            info.Value = (Convert.ToDecimal(bodyDataDataSet.Tables[0].Rows[i]["Value"]) * 100).ToString("0.00") + "%";
                        }
                        else
                        {
                            info.Value = "0.00" + "%";
                        }
                        dataList.Add(info);
                    }
                }

                #endregion

                #region Left

                List <ScoreRateForChapterDto> leftList = new List <ScoreRateForChapterDto>();
                if (leftDataSet.Tables.Count > 0 && leftDataSet.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < leftDataSet.Tables[0].Rows.Count; i++)
                    {
                        ScoreRateForChapterDto info = new ScoreRateForChapterDto();
                        info.ChapterCode = Convert.ToString(leftDataSet.Tables[0].Rows[i]["CharterCode"]);
                        info.ChapterName = Convert.ToString(leftDataSet.Tables[0].Rows[i]["CharterName"]);
                        leftList.Add(info);
                    }
                }

                #endregion

                DynamicColumnDataSet <TwoLevelColumnInfo, ScoreRateForChapterBodyDto, ScoreRateForChapterDto> list = new DynamicColumnDataSet <TwoLevelColumnInfo, ScoreRateForChapterBodyDto, ScoreRateForChapterDto>(columnInfoList, dataList, leftList);
                if (list != null && list.ColumnInfoList != null)
                {
                    list.DtoList = DynamicColumnUtil.CombineDynamicColumnDto <TwoLevelColumnInfo, ScoreRateForChapterBodyDto, ScoreRateForChapterDto>(list.ColumnInfoList, list.DataList, list.DtoList);
                }

                //BindGrid

                CommonHandler.BuildDynamicColumn <TwoLevelColumnInfo, ScoreRateForChapterDto>(grvChapterRatio, list.ColumnInfoList, list.DtoList);
                //InitGridControl(grcShopScore);
                //grvShopScore.SetAllColumnEditable(false);
                // grcAuditionPass.SetColumnEditableByColumn(true, gcAuditioinHis, gcResume, gcPassTypeCode, gcPassRemark, gcWorkYear);
                grvChapterRatio.LeftCoord = 0;

                #endregion

                #region Link

                result = allResult[1];

                leftDataSet     = result[2];
                bodyDataDataSet = result[1];
                headDataSet     = result[0];

                #region Head

                columnInfoList = new List <TwoLevelColumnInfo>();
                if (headDataSet.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < headDataSet.Tables[0].Rows.Count; i++)
                    {
                        TwoLevelColumnInfo info = new TwoLevelColumnInfo();
                        info.Column1  = Convert.ToString(headDataSet.Tables[0].Rows[i]["Column1"]);
                        info.Column2  = Convert.ToString(headDataSet.Tables[0].Rows[i]["Column2"]);
                        info.Caption1 = Convert.ToString(headDataSet.Tables[0].Rows[i]["Caption1"]);
                        info.Caption2 = Convert.ToString(headDataSet.Tables[0].Rows[i]["Caption2"]);
                        info.Order    = Convert.ToInt32(headDataSet.Tables[0].Rows[i]["Order"]);
                        columnInfoList.Add(info);
                    }
                }
                tempList = new List <TwoLevelColumnInfo>();
                for (int i = 0; i < columnInfoList.Count; i++)
                {
                    if (columnInfoList[i].Order > 4)
                    {
                        tempList.Add(columnInfoList[i]);
                    }
                }
                existOrderList = new List <int>();
                for (int i = 0; i < tempList.Count; i++)
                {
                    if (!existOrderList.Contains(tempList[i].Order))
                    {
                        tempList[i].Order = tempList[i].Order;// + i
                        existOrderList.Add(tempList[i].Order);
                    }
                    else
                    {
                        int tempOrder = tempList[i].Order;
                        while (existOrderList.Contains(tempOrder))
                        {
                            tempOrder++;
                        }
                        tempList[i].Order = tempOrder;// + i
                        existOrderList.Add(tempOrder);
                    }
                }
                lastlist = new List <TwoLevelColumnInfo>();
                for (int i = 0; i < columnInfoList.Count; i++)
                {
                    if (columnInfoList[i].Order < 5)
                    {
                        lastlist.Add(columnInfoList[i]);
                    }
                }
                for (int i = 0; i < tempList.Count; i++)
                {
                    lastlist.Add(tempList[i]);
                }
                columnInfoList.Clear();
                columnInfoList = lastlist;

                #endregion

                #region Data

                List <ScoreRateForLinkBodyDto> dataList1 = new List <ScoreRateForLinkBodyDto>();
                if (bodyDataDataSet.Tables.Count > 0 && bodyDataDataSet.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < bodyDataDataSet.Tables[0].Rows.Count; i++)
                    {
                        ScoreRateForLinkBodyDto info = new ScoreRateForLinkBodyDto();
                        info.Column1  = Convert.ToString(bodyDataDataSet.Tables[0].Rows[i]["Column1"]);
                        info.Column2  = Convert.ToString(bodyDataDataSet.Tables[0].Rows[i]["Column2"]);
                        info.LinkCode = Convert.ToString(bodyDataDataSet.Tables[0].Rows[i]["LinkCode"]);
                        if (bodyDataDataSet.Tables[0].Rows[i]["Value"] != DBNull.Value)
                        {
                            //string temp = Convert.ToString(Convert.ToDecimal(bodyDataDataSet.Tables[0].Rows[i]["Value"]) * 100);
                            //info.Value = temp.Split('.')[0] + "." + temp.Split('.')[1].Substring(0, 2) + "%";
                            info.Value = (Convert.ToDecimal(bodyDataDataSet.Tables[0].Rows[i]["Value"]) * 100).ToString("0.00") + "%";
                        }
                        else
                        {
                            info.Value = "0.00" + "%";
                        }
                        dataList1.Add(info);
                    }
                }

                #endregion

                #region Left

                List <ScoreRateForLinkDto> leftList1 = new List <ScoreRateForLinkDto>();
                if (leftDataSet.Tables.Count > 0 && leftDataSet.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < leftDataSet.Tables[0].Rows.Count; i++)
                    {
                        ScoreRateForLinkDto info = new ScoreRateForLinkDto();
                        info.LinkCode = Convert.ToString(leftDataSet.Tables[0].Rows[i]["LinkCode"]);
                        info.LinkName = Convert.ToString(leftDataSet.Tables[0].Rows[i]["LinkName"]);
                        leftList1.Add(info);
                    }
                }

                #endregion

                DynamicColumnDataSet <TwoLevelColumnInfo, ScoreRateForLinkBodyDto, ScoreRateForLinkDto> list1 = new DynamicColumnDataSet <TwoLevelColumnInfo, ScoreRateForLinkBodyDto, ScoreRateForLinkDto>(columnInfoList, dataList1, leftList1);
                if (list1 != null && list1.ColumnInfoList != null)
                {
                    list1.DtoList = DynamicColumnUtil.CombineDynamicColumnDto <TwoLevelColumnInfo, ScoreRateForLinkBodyDto, ScoreRateForLinkDto>(list1.ColumnInfoList, list1.DataList, list1.DtoList);
                }

                //BindGrid

                CommonHandler.BuildDynamicColumn <TwoLevelColumnInfo, ScoreRateForLinkDto>(grvLinkRatio, list1.ColumnInfoList, list1.DtoList);
                //InitGridControl(grcShopScore);
                //grvShopScore.SetAllColumnEditable(false);
                // grcAuditionPass.SetColumnEditableByColumn(true, gcAuditioinHis, gcResume, gcPassTypeCode, gcPassRemark, gcWorkYear);
                grvLinkRatio.LeftCoord = 0;

                #endregion

                #region Subject

                result = allResult[2];
                List <SubjectDto> subjectList = new List <SubjectDto>();

                if (result[0].Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < result[0].Tables[0].Rows.Count; i++)
                    {
                        SubjectDto subjectDto = new SubjectDto();
                        subjectDto.SubjectCode = Convert.ToString(result[0].Tables[0].Rows[i]["SubjectCode"]);
                        subjectDto.CheckPoint  = Convert.ToString(result[0].Tables[0].Rows[i]["CheckPoint"]);

                        if (result[0].Tables[0].Rows[i]["全国"] != DBNull.Value)
                        {
                            subjectDto.AllCountry = (Convert.ToDecimal(result[0].Tables[0].Rows[i]["全国"]) * 100).ToString("0.00") + "%";
                        }
                        else
                        {
                            subjectDto.AllCountry = "0.00" + "%";
                        }
                        if (result[0].Tables[0].Rows[i]["东区"] != DBNull.Value)
                        {
                            subjectDto.EastArea = (Convert.ToDecimal(result[0].Tables[0].Rows[i]["东区"]) * 100).ToString("0.00") + "%";
                        }
                        else
                        {
                            subjectDto.EastArea = "0.00" + "%";
                        }
                        if (result[0].Tables[0].Rows[i]["南区"] != DBNull.Value)
                        {
                            subjectDto.SouthArea = (Convert.ToDecimal(result[0].Tables[0].Rows[i]["南区"]) * 100).ToString("0.00") + "%";
                        }
                        else
                        {
                            subjectDto.SouthArea = "0.00" + "%";
                        }
                        if (result[0].Tables[0].Rows[i]["西区"] != DBNull.Value)
                        {
                            subjectDto.WestArea = (Convert.ToDecimal(result[0].Tables[0].Rows[i]["西区"]) * 100).ToString("0.00") + "%";
                        }
                        else
                        {
                            subjectDto.WestArea = "0.00" + "%";
                        }
                        if (result[0].Tables[0].Rows[i]["北区"] != DBNull.Value)
                        {
                            subjectDto.NorthArea = (Convert.ToDecimal(result[0].Tables[0].Rows[i]["北区"]) * 100).ToString("0.00") + "%";
                        }
                        else
                        {
                            subjectDto.NorthArea = "0.00" + "%";
                        }


                        //subjectDto.EastArea = Convert.ToDecimal(result[0].Tables[0].Rows[i]["东区"] == DBNull.Value ? ("0.00" + "%") : (Convert.ToDecimal(result[0].Tables[0].Rows[i]["东区"]) * 100).ToString("0.00") + "%");
                        //subjectDto.SouthArea = Convert.ToDecimal(result[0].Tables[0].Rows[i]["南区"] == DBNull.Value ? ("0.00" + "%") : (Convert.ToDecimal(result[0].Tables[0].Rows[i]["南区"]) * 100).ToString("0.00") + "%");
                        //subjectDto.WestArea = Convert.ToDecimal(result[0].Tables[0].Rows[i]["西区"] == DBNull.Value ? ("0.00" + "%") : (Convert.ToDecimal(result[0].Tables[0].Rows[i]["西区"]) * 100).ToString("0.00") + "%");
                        //subjectDto.NorthArea = Convert.ToDecimal(result[0].Tables[0].Rows[i]["北区"] == DBNull.Value ? ("0.00" + "%") : (Convert.ToDecimal(result[0].Tables[0].Rows[i]["北区"]) * 100).ToString("0.00") + "%");
                        subjectList.Add(subjectDto);
                    }
                }

                grcSubjectRatio.DataSource = subjectList;;

                #endregion
            }
            catch (Exception ex)
            {
                CommonHandler.ShowMessage(MessageType.Information, ex.Message); return;
            }
            finally
            {
                this.Enabled = true;
            }
        }