Ejemplo n.º 1
0
        private void InsertQueryResult(MC_QueryRequsetFactory _queryRequestFactory)
        {
            _queryRequestFactory.AddResultTable(this._queryModel.MainTable);
            foreach (MDModel_Table_Column _tc in this._queryModel.MainTable.Columns)
            {
                if (_tc.ColumnDefine.DefaultResult)
                {
                    _queryRequestFactory.AddResultTableColumn(this._queryModel.MainTable, _tc);
                }
            }

            foreach (CheckedListBoxItem _item in this.checkedListBoxControl1.CheckedItems)
            {
                FixChildItem  _itemData = _item.Value as FixChildItem;
                MDModel_Table _table    = _itemData.TableDefine;
                _queryRequestFactory.AddResultTable(_table);
                foreach (MDModel_Table_Column _tc2 in _table.Columns)
                {
                    if (_tc2.ColumnDefine.DefaultResult)
                    {
                        _queryRequestFactory.AddResultTableColumn(_table, _tc2);
                    }
                }
            }
        }
Ejemplo n.º 2
0
 private void InitForm()
 {
     _queryModel = MetaDataCache.GetQueryModelDefine(this.QueryModelName);
     this.sinoSZUC_FixConditionPanel1.ShowConditionItems(_queryModel);
     this.checkedListBoxControl1.Items.Clear();
     foreach (MDModel_Table _cTable in _queryModel.ChildTableDict.Values)
     {
         bool _canShow = false;
         foreach (MDModel_Table_Column _tc in _cTable.Columns)
         {
             if (_tc.ColumnDefine.DefaultResult)
             {
                 _canShow = true;
             }
         }
         if (_canShow)
         {
             FixChildItem       _item = new FixChildItem(_cTable.TableDefine.DisplayTitle, _cTable);
             CheckedListBoxItem _cb   = new CheckedListBoxItem();
             _cb.Value = _item;
             this.checkedListBoxControl1.Items.Add(_cb);
         }
     }
 }