Beispiel #1
0
        public void SetFilter(SQLiteSettings.FilterElementModel filter, List <UcTableObjects.FieldInfoFull> fList)
        {
            fieldInfo fi = classesOfMetods.getFieldInfo(Convert.ToInt32(filter.Column));

            switch (fi.type)
            {
            case 1:
                txtValue.Text = filter.Value.ToString();
                break;

            case 2:
                txtValue.Text = filter.Value.ToString();
                break;

            case 3:
                dateTimePicker1.Value = Convert.ToDateTime(filter.Value);
                break;

            case 4:
                dateTimePicker1.Value = Convert.ToDateTime(filter.Value);
                break;

            case 6:
                txtValue.Text = filter.Value.ToString();
                break;

            default:
                txtValue.Text = filter.Value.ToString();
                break;
            }

            _currentFilter = fList.Find(w => w.idField == fi.idField);
            this.ListIS    = fList;
            SetFilterType(filter);
        }
        private void loadInfo()
        {
            if (upd)
            {
                fieldInfo fInfo = classesOfMetods.getFieldInfo(id);
                textBox1.Text = fInfo.nameDB;
                textBox2.Text = fInfo.nameMap;
                textBox3.Text = fInfo.nameLable;
                setComboBox(comboBox1, fInfo.type);
                textBox1.Enabled       = false;
                comboBox1.Enabled      = false;
                checkBox1.Checked      = fInfo.read_only;
                checkBoxHidden.Checked = !fInfo.visible;
            }
            else
            {
                textBox1.Enabled = false;
                CheckBox edit = new CheckBox();
                edit.AutoSize   = false;
                edit.Size       = new Size(20, 20);
                edit.Appearance = Appearance.Button;
                edit.FlatStyle  = FlatStyle.Flat;
                edit.FlatAppearance.BorderColor = Color.Silver;
                edit.Image  = Rekod.Properties.Resources._1279535667_edit;
                edit.Left   = textBox1.Right - edit.Width;
                edit.Top    = textBox1.Top;
                edit.Click += new EventHandler(edit_click);
                edit.Tag    = textBox1;
                this.Controls.Add(edit);
                edit.BringToFront();

                textBox3.Enabled = false;
                CheckBox edit2 = new CheckBox();
                edit2.AutoSize   = false;
                edit2.Size       = new Size(20, 20);
                edit2.Appearance = Appearance.Button;
                edit2.FlatStyle  = FlatStyle.Flat;
                edit2.FlatAppearance.BorderColor = Color.Silver;
                edit2.Image  = Rekod.Properties.Resources._1279535667_edit;
                edit2.Left   = textBox3.Right - edit2.Width;
                edit2.Top    = textBox3.Top;
                edit2.Click += new EventHandler(edit_click);
                edit2.Tag    = textBox3;
                this.Controls.Add(edit2);
                edit2.BringToFront();
            }
        }
Beispiel #3
0
 public FieldKeyValue(fieldInfo key, int value)
 {
     Key   = key;
     Value = value;
 }