示例#1
0
        public void cmbAccountFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_account = new DataBaseTables();
                    tables_account.dtAccountFill();
                    classStaffForm.cmbTypeAccount.DataSource    = tables_account.dtAccount;
                    classStaffForm.cmbTypeAccount.DisplayMember = "account";
                    classStaffForm.cmbTypeAccount.ValueMember   = "id_account";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
示例#2
0
        public void dgvAccountFill()
        {
            Action action = () =>
            {
                try
                {
                    tables.dtAccountFill();

                    dgvAccount.DataSource            = tables.dtAccount;
                    dgvAccount.Columns[0].Visible    = false;
                    dgvAccount.Columns[1].HeaderText = "Логин";
                    dgvAccount.Columns[2].HeaderText = "Пароль";
                    dgvAccount.Columns[3].HeaderText = "Роль";
                }
                catch
                {
                }
            };

            Invoke(action);
        }