示例#1
0
        public override void Assign(RepositoryItem repositoryItem_0)
        {
            RepositoryItemTreeViewComboBoxEdit repositoryItem0 = repositoryItem_0 as RepositoryItemTreeViewComboBoxEdit;

            this.BeginUpdate();
            try
            {
                base.Assign(repositoryItem_0);
                if (repositoryItem0 != null)
                {
                    this.DataAccessLayerBaseClass = repositoryItem0.DataAccessLayerBaseClass;
                    this.IDFieldName       = repositoryItem0.IDFieldName;
                    this.TableName         = repositoryItem0.TableName;
                    this.ParentIDFieldName = repositoryItem0.ParentIDFieldName;
                    this.NameFieldName     = repositoryItem0.NameFieldName;
                    this.CodeFieldName     = repositoryItem0.CodeFieldName;
                    this.bool_0            = repositoryItem0.ShowAllItemVisible;
                    this.highlightStyle_0  = repositoryItem0.highlightStyle_0;
                    this.char_0            = repositoryItem0.SeparatorChar;
                    this.bool_1            = repositoryItem0.SynchronizeEditValueWithCheckedItems;
                    this.collectionChanged = true;
                    this.type_0            = repositoryItem0.type_0;
                    this.string_0          = repositoryItem0.ShowAllItemCaption;
                }
            }
            finally
            {
                this.EndUpdate();
            }
        }
示例#2
0
 public void AddTreeviewComBoBox(string string_2, object object_0, object object_1, bool bool_0)
 {
     this.repositoryItemTreeViewComboBoxEdit_0 = new RepositoryItemTreeViewComboBoxEdit();
     this.gridEditorCollection_0.Add(this.repositoryItemTreeViewComboBoxEdit_0, string_2, object_0);
     if (object_1 is CodeDomainEx.CodeDomainEx)
     {
         CodeDomainEx.CodeDomainEx ex = object_1 as CodeDomainEx.CodeDomainEx;
         DataAccessLayerBaseClass  dataAccessLayer =
             DataAccessLayerFactory.GetDataAccessLayer(DataProviderType.OleDb, ex.ConnectionStr);
         this.repositoryItemTreeViewComboBoxEdit_0.DataAccessLayerBaseClass = dataAccessLayer;
         this.repositoryItemTreeViewComboBoxEdit_0.TableName         = ex.TableFieldName;
         this.repositoryItemTreeViewComboBoxEdit_0.CodeFieldName     = ex.CodeFieldName;
         this.repositoryItemTreeViewComboBoxEdit_0.NameFieldName     = ex.NameFieldName;
         this.repositoryItemTreeViewComboBoxEdit_0.ParentIDFieldName = ex.ParentIDFieldName;
         this.repositoryItemTreeViewComboBoxEdit_0.IDFieldName       = ex.IDFieldName;
     }
     this.repositoryItemTreeViewComboBoxEdit_0.ReadOnly = bool_0;
 }
示例#3
0
        private void method_1(int int_1, ColumnAttribute columnAttribute_0, string string_0, string string_1,
                              object object_0, string string_2, double double_0, double double_1)
        {
            int num;

            if (int_1 < 0)
            {
                for (num = 0; num < this.gridColumn_0.Length; num++)
                {
                    if (this.gridColumn_0[num].FieldName.ToUpper() == string_2.ToUpper())
                    {
                        int_1 = num;
                    }
                }
            }
            switch (columnAttribute_0)
            {
            case ColumnAttribute.CA_LOOKUPEDIT:
            {
                RepositoryItemLookUpEdit edit2 = new RepositoryItemLookUpEdit();
                if (object_0 is DataTable)
                {
                    edit2.DataSource    = object_0;
                    edit2.DisplayMember = string_1;
                    edit2.ValueMember   = string_0;
                }
                this.gridColumn_0[int_1].ColumnEdit = edit2;
                break;
            }

            case ColumnAttribute.CA_COMBOBOX:
            {
                RepositoryItemComboBox box = new RepositoryItemComboBox();
                for (num = 0; num < ((IList)object_0).Count; num++)
                {
                    box.Items.Add(((IList)object_0)[num].ToString());
                }
                this.gridColumn_0[int_1].ColumnEdit = box;
                break;
            }

            case ColumnAttribute.CA_CHECKEDIT:
                this.gridColumn_0[int_1].ColumnEdit = new RepositoryItemCheckEdit();
                break;

            case ColumnAttribute.CA_SPINEDIT:
                this.gridColumn_0[int_1].ColumnEdit = new RepositoryItemSpinEdit();
                ((RepositoryItemSpinEdit)((GridView)this.xGrid.MainView).Columns[int_1].ColumnEdit).MaxValue =
                    (decimal)double_1;
                ((RepositoryItemSpinEdit)((GridView)this.xGrid.MainView).Columns[int_1].ColumnEdit).MinValue =
                    (decimal)double_0;
                break;

            case ColumnAttribute.CA_TIMEEDIT:
                this.gridColumn_0[int_1].ColumnEdit = new RepositoryItemTimeEdit();
                break;

            case ColumnAttribute.CA_TREEVIEWCOMBOX:
            {
                RepositoryItemTreeViewComboBoxEdit edit            = new RepositoryItemTreeViewComboBoxEdit();
                CodeDomainEx.CodeDomainEx          ex              = object_0 as CodeDomainEx.CodeDomainEx;
                DataAccessLayerBaseClass           dataAccessLayer =
                    DataAccessLayerFactory.GetDataAccessLayer(DataProviderType.OleDb, ex.ConnectionStr);
                edit.DataAccessLayerBaseClass = dataAccessLayer;
                edit.TableName         = ex.TableFieldName;
                edit.CodeFieldName     = ex.CodeFieldName;
                edit.NameFieldName     = ex.NameFieldName;
                edit.ParentIDFieldName = ex.ParentIDFieldName;
                edit.IDFieldName       = ex.IDFieldName;
                this.gridColumn_0[int_1].ColumnEdit = edit;
                break;
            }
            }
        }