Example #1
0
        static DataSet CreateQueryResultsSchema()
        {
            DataSet dsResult = TEXCSDBUtil.CreateSimpleTable(CQryResDataSet, CQryResTable,
                                                             new TStringTypeElement(CQryResField_ShowOrder, typeof(int)),
                                                             new TStringTypeElement[] { new TStringTypeElement(CQryResField_QueryDetailAA, typeof(int)),
                                                                                        new TStringTypeElement(CQryResField_QueryID, typeof(int)),
                                                                                        new TStringTypeElement(CQryResField_URLId, typeof(int)),
                                                                                        new TStringTypeElement(CQryResField_URL, typeof(string)),
                                                                                        new TStringTypeElement(CQryResField_PageView, typeof(string)),
                                                                                        new TStringTypeElement(CQryResField_PercentSuccess, typeof(decimal)) });

            dsResult.Tables[0].DefaultView.ApplyDefaultSort = true;
            return(dsResult);
        }
Example #2
0
        static DataSet CreateSWDB_SearchTableWordsSchema()
        {
            DataSet dsResult = TEXCSDBUtil.CreateSimpleTable(CSWDB_Search_DataSet, CSWDB_Search_Table, new TStringTypeElement(CSWDB_Search_Word, typeof(string)), new TStringTypeElement[] { new TStringTypeElement(CSWDB_Search_WordAA, typeof(int)) });

            dsResult.Tables[0].DefaultView.ApplyDefaultSort = true;
            return(dsResult);

            /*DataTable dttbResult = new DataTable(CTPSplitTable);
             * DataColumn pkCol = dttbResult.Columns.Add(CTPSplitField_Word, typeof(string));
             * dttbResult.PrimaryKey = new DataColumn[] {pkCol};
             * dttbResult.Columns.Add(CTPSplitField_CountWord, typeof(int));
             * DataSet dsResult = new DataSet(CTPSplitDataSet);
             * dsResult.Tables.Add(dttbResult);
             * return dsResult;*/
        }