Exemplo n.º 1
0
 private void InitForm()
 {
     this.cb_Table.Properties.Items.Clear();
     foreach (MDModel_Table _tb in CurrentModel.ChildTableDict.Values)
     {
         TableListItem _item = new TableListItem(_tb);
         this.cb_Table.Properties.Items.Add(_item);
     }
     foreach (MD_FUNCTION _fun in FunctionList)
     {
         FunListItem _fitem = new FunListItem(_fun);
         this.cb_Function.Properties.Items.Add(_fitem);
     }
     _initFinished = true;
 }
Exemplo n.º 2
0
        private void ChangeFieldList()
        {
            this.cb_Field.Properties.Items.Clear();
            this.te_Des.EditValue = "";
            if (this.cb_Table.SelectedItem == null)
            {
                return;
            }
            if (this.cb_Function.SelectedItem == null)
            {
                return;
            }

            TableListItem _tItem = this.cb_Table.SelectedItem as TableListItem;
            FunListItem   _fItem = this.cb_Function.SelectedItem as FunListItem;

            this.currentTable     = _tItem.Table;
            this.currentFun       = _fItem.Function;
            this.te_Des.EditValue = this.currentFun.Description;
            string _pname = this.currentFun.ParamList[0];
            string _ptype = this.currentFun.ParamTypeDict[_pname];

            switch (_ptype)
            {
            case "VARCHAR":
            case "CHAR":
            case "VARCHAR2":
            case "NVARCHAR":
            case "NVARCHAR2":
                AddCharField(currentTable);
                break;

            case "NUMBER":
                AddNumField(currentTable);
                break;

            case "DATE":
                AddDateField(currentTable);
                break;

            case "ALL":
                AddALLField(currentTable);
                break;
            }
        }