public void button3_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         /*fieldEditFrm frm = new fieldEditFrm(conn, idT);
          * frm.ShowDialog();*/
         if (act_tables != null)
         {
             parent.CloseElemsAfter(act_tables, false);
         }
         else
         {
             parent.CloseElemsAfter(this, false);
         }
         FiledEditListControl felc = new FiledEditListControl(idT, parent, this);
         parent.AddNewElem(felc, Rekod.Properties.Resources.TLE_TableStructure);
     }
 }
Beispiel #2
0
        public PropertyFieldControl(int id1, DBTablesGroups par, FiledEditListControl f_edit)
        {
            InitializeComponent();
            panel3.Location = panel4.Location;
            panel5.Location = panel4.Location;

            id = id1;
            loadTables();
            loadInfo();
            parent     = par;
            field_edit = f_edit;

            if (field_edit != null &&
                !Rekod.DBTablesEdit.SyncController.HasRight(field_edit.TableId))
            {
                button1.Enabled = false;
            }
        }
        public AddEditAtributs(bool upd1, int id1, int idT1, DBTablesGroups par, FiledEditListControl f_edit)
        {
            InitializeComponent();
            upd = upd1;
            id  = id1;
            idT = idT1;
            loadTipField();
            loadInfo();
            parent     = par;
            field_edit = f_edit;
            if (!upd)
            {
                tb = new TextBoxInfo(textBox1);
                textBox1.TextChanged += new EventHandler(textBox1_TextChanged);
                textBox1.MouseUp     += new MouseEventHandler(textBox1_MouseUp);
                textBox1.KeyUp       += new KeyEventHandler(textBox1_KeyUp);
            }
            tb2 = new TextBoxInfo(this.textBox2);
            textBox2.TextChanged += new EventHandler(textBox2_TextChanged);
            textBox2.MouseUp     += new MouseEventHandler(textBox2_MouseUp);
            textBox2.KeyUp       += new KeyEventHandler(textBox2_KeyUp);
            var fi = classesOfMetods.getFieldInfo(id);
            var ti = classesOfMetods.getTableInfo(idT);

            if (!SyncController.HasRight(idT))
            {
                button2.Enabled = false;
            }

            if (fi.type == 5)
            {
                button2.Enabled        = false;
                textBox2.Enabled       = false;
                textBox3.Enabled       = false;
                checkBox1.Enabled      = false;
                checkBoxHidden.Enabled = false;
            }
            if (ti.pkField == fi.nameDB)
            {
                checkBox1.Enabled      = false;
                checkBoxHidden.Enabled = false;
            }
            dic = initalizeDictionary();
        }