private IFeatureCursor SortData(IFeatureCursor pCursor, ITrackCancel pTrackCancel)
		{
			// sort in descending by value
			ITable pTable = null;
			pTable = m_pFeatureClass as ITable;

			ITableSort pTableSort = null;
			pTableSort = new TableSort();
			pTableSort.Table = pTable;
			pTableSort.Cursor = pCursor as ICursor;

			//set up the query filter.
			IQueryFilter pQF = null;
			pQF = new QueryFilter();
			pQF.SubFields = "*";
			pQF.WhereClause = m_pQueryFilter.WhereClause;
			pTableSort.QueryFilter = pQF;

			IProportionalSymbolRenderer pPSRend = null;
      pPSRend = m_pSizeRend as IProportionalSymbolRenderer;
			string strValueField = null;
			strValueField = pPSRend.Field;
			pTableSort.Fields = strValueField;
			pTableSort.set_Ascending(strValueField, false);

			IDataNormalization pDataNorm = null;
            pDataNorm = pPSRend as IDataNormalization;
			if (pDataNorm.NormalizationType == esriDataNormalization.esriNormalizeByField)
			{
				// comparison is not simple comparison of field values, use callback to do custom compare

				// get normalization field and add to table sort
				string strFields = "";
				strFields = strFields + strValueField;
				string strNormField = null;
				strNormField = pDataNorm.NormalizationField;
				strFields = strFields + ",";
				strFields = strFields + strNormField;
				pTableSort.Fields = strFields;
				pTableSort.set_Ascending(strNormField, false);

				// create new custom table call sort object and connect to the TableSort object
				ITableSortCallBack pTableSortCallBack = null;
				pTableSortCallBack = new SortCallBack(pTable.Fields.FindField(strValueField), pTable.Fields.FindField(strNormField));
				pTableSort.Compare = pTableSortCallBack;
			}

			// call the sort
			pTableSort.Sort(pTrackCancel);

			// retrieve the sorted rows
			IFeatureCursor pSortedCursor = null;
			pSortedCursor = pTableSort.Rows as IFeatureCursor;

			return pSortedCursor;
		}
コード例 #2
0
 public ExcelDocumentProccesor()
 {
     _validata              = new Validata();
     _parser                = new Parser();
     _readExcelData         = new ReadExcelData();
     _dataNormalization     = new DataNormalization();
     _excelSheetCongSection = new ExcelSheetCongSection();
     _parserSection         = new ParserSectionPage();
     _excelConfiguration    = ConfigurationHolder.ApiConfiguration;
 }
コード例 #3
0
        public static string GetISOCodes(string language, IDataNormalization normalization)
        {
            language = normalization.NormalizeString(language).Data;
            List <string> tempValues = _languageDictionary.Values.Select
                                           (p => p = normalization.NormalizeString(p).Data).ToList();

            if (
                !tempValues.Contains(language)
                )
            {
                return(language);
            }

            return(_languageDictionary.FirstOrDefault(p =>
                                                      language.Contains(normalization.NormalizeString(p.Value).Data)).Key);
        }
コード例 #4
0
ファイル: Parser.cs プロジェクト: Zhenya1256/ExcelWork
 public Parser()
 {
     _readExcelData     = new ReadExcelData();
     _dataNormalization = new DataNormalization();
 }
コード例 #5
0
 public ExcelSheetCongSection()
 {
     _readExcelData      = new ReadExcelData();
     _dataNormalization  = new DataNormalization();
     _excelConfiguration = ConfigurationHolder.ApiConfiguration;
 }
コード例 #6
0
ファイル: NormalizeData.cs プロジェクト: Zhenya1256/ExcelWork
 public NormalizeData()
 {
     _documentProccesor  = new ExcelDocumentProccesor();
     _excelConfiguration = ConfigurationHolder.ApiConfiguration;
     _dataNormalization  = new DataNormalization();
 }