Example #1
0
        private void RightLo()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables dataComb = new DataBaseTables();
                    dataComb.dtAccess_rights.Clear();
                    dataComb.dtAccess_rightsFill();
                    dataComb.dependency.OnChange        += Righonchange;
                    dataGridView1.DataSource             = dataComb.dtAccess_rights;
                    dataGridView1.Columns[0].Visible     = false;
                    dataGridView1.Columns[13].Visible    = false;
                    dataGridView1.Columns[1].HeaderText  = "Должность";
                    dataGridView1.Columns[2].HeaderText  = "Профили";
                    dataGridView1.Columns[3].HeaderText  = "Клиенты";
                    dataGridView1.Columns[4].HeaderText  = "Сотрудники";
                    dataGridView1.Columns[5].HeaderText  = "Виды";
                    dataGridView1.Columns[6].HeaderText  = "Фирмы";
                    dataGridView1.Columns[7].HeaderText  = "Цвета";
                    dataGridView1.Columns[8].HeaderText  = "Пол";
                    dataGridView1.Columns[9].HeaderText  = "Товары";
                    dataGridView1.Columns[10].HeaderText = "Склад";
                    dataGridView1.Columns[11].HeaderText = "Приходы";
                    dataGridView1.Columns[12].HeaderText = "Чек";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
Example #2
0
        private void AccRLoad()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables dataComb = new DataBaseTables();
                    dataComb.dtAccess_rights.Clear();
                    dataComb.dtAccess_rightsFill();
                    dataComb.dependency.OnChange += AccRoadonchange;
                    comboBox1.DataSource          = dataComb.dtAccess_rights;
                    comboBox2.DataSource          = dataComb.dtAccess_rights;
                    comboBox1.ValueMember         = "ID_Access_rights";
                    comboBox1.DisplayMember       = "Dolj";
                    comboBox2.ValueMember         = "ID_Access_rights";
                    comboBox2.DisplayMember       = "Dolj";
                }
                catch
                {
                }
            };

            Invoke(action);
        }