示例#1
0
        void initTable(DataTable pTable)
        {
            ToolTable.fillNull(pTable);

            string sort_ = ToolMobile.getEnvironment().getStateRuntime(stateNameSort) as string;

            if (sort_ != null && pTable.DefaultView.Sort != sort_)
            {
                pTable.DefaultView.Sort = sort_;
            }
        }
示例#2
0
 public void refreshSource()
 {
     if (_sourceDs != null)
     {
         _data = _sourceDs;
     }
     else
     if (_sourcePs != null)
     {
         _sourcePs.getBuilder().reset();
         DataTable table = _sourcePs.getAll();
         ToolTable.fillNull(table);
         _data = new DataSet();
         _data.Tables.Add(table);
     }
 }
示例#3
0
        public DataTable refresh()
        {
            if (getTable() == null)
            {
                return(null);
            }

            source.getBuilder().reset();

            if (startigDataLoad != null)
            {
                startigDataLoad.Invoke(this, EventArgs.Empty);
            }

            DataTable tab_ = source.getAll();

            ToolTable.fillNull(tab_);

            loadData(tab_);

            return(tab_);
        }
示例#4
0
        public DataSet get()
        {
            //
            _result.Clear();
            for (int i = 0; i < _sqlQueryes.Length; ++i)
            {
                IPagedSource source =
                    new ImplPagedSource(
                        _environment,
                        new ImplSqlBuilder(_environment, _sqlQueryes[i], (_aliases.Length > i ? _aliases[i] : string.Empty)));

                foreach (IFilter filter in _filters)
                {
                    filter.applyToBuilder(source.getBuilder());
                }

                _result.Tables.Add(source.getAll());
            }
            foreach (DataTable tab in _result.Tables)
            {
                ToolTable.fillNull(tab);
            }
            return(_result.Copy());
        }