Ejemplo n.º 1
0
        private void addField_button_Click(object sender, EventArgs e)
        {
            paraMetaInfo param = new paraMetaInfo();

            param.m_strEditType    = EditorTypeEn[editortype_comboBox.SelectedIndex];
            param.m_strFieldNameCN = fieldcnnametxt.Text.Trim();
            param.m_strCatName     = catname_comboBox.Text.Trim();
            param.m_strDescription = descriptiontxt.Text.Trim();
            param.m_bVisible       = visible_checkBox.Checked;
            param.m_bReadOnly      = readonly_checkBox.Checked;
            switch (EditorTypeEn[editortype_comboBox.SelectedIndex])
            {
            case "filename":
                param.m_strRelativePath = txtBoxRelativePath.Text.Trim();
                break;

            case "lookupcombo":
                param.m_strListTable = listtable_comboBox.Text.Trim();
                param.m_strKeyField  = keyfield_comboBox.Text.Trim();
                param.m_strListField = listfield_comboBox.Text.Trim();
                param.m_strCondition = listconditiontxt.Text.Trim();
                break;

            case "textcombo":
                param.m_strTextCombo = txtBoxListValues.Text.Trim();
                break;

            default:
                break;
            }

            addField     form   = new addField(tablename_comboBox.Text, editortype_comboBox.Text, this, param);
            DialogResult result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                RefreshFieldname_ListBox();
                DataGridViewShow();
            }
        }
Ejemplo n.º 2
0
        private void addField_button_Click(object sender, EventArgs e)
        {
            paraMetaInfo param = new paraMetaInfo();
            param.m_strEditType = EditorTypeEn[editortype_comboBox.SelectedIndex];
            param.m_strFieldNameCN = fieldcnnametxt.Text.Trim();
            param.m_strCatName = catname_comboBox.Text.Trim();
            param.m_strDescription = descriptiontxt.Text.Trim();
            param.m_bVisible = visible_checkBox.Checked;
            param.m_bReadOnly = readonly_checkBox.Checked;
            switch (EditorTypeEn[editortype_comboBox.SelectedIndex])
            {
                case "filename":
                    param.m_strRelativePath = txtBoxRelativePath.Text.Trim();
                    break;
                case "lookupcombo":
                    param.m_strListTable = listtable_comboBox.Text.Trim();
                    param.m_strKeyField = keyfield_comboBox.Text.Trim();
                    param.m_strListField = listfield_comboBox.Text.Trim();
                    param.m_strCondition = listconditiontxt.Text.Trim();
                    break;
                case "textcombo":
                    param.m_strTextCombo = txtBoxListValues.Text.Trim();
                    break;
                default:
                    break;
            }

            addField form = new addField(tablename_comboBox.Text, editortype_comboBox.Text, this, param);
            DialogResult result = form.ShowDialog();
            if (result == DialogResult.OK)
            {
                RefreshFieldname_ListBox();
                DataGridViewShow();
            }
        }