Exemplo n.º 1
0
        public SysAdminOptions()
        {
            InitializeComponent();
            this.dataGridViewDesignations.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            this.dataGridViewSubUnits.AutoSizeColumnsMode     = DataGridViewAutoSizeColumnsMode.Fill;
            this.dataGridViewJobTypes.AutoSizeColumnsMode     = DataGridViewAutoSizeColumnsMode.Fill;
            this.dataGridViewEmpDetails.AutoSizeColumnsMode   = DataGridViewAutoSizeColumnsMode.Fill;

            //show user and account type
            dataGridViewEmpDetails.DataSource = SysAdminHelper.ShowEmployeesLoginDetails();
            this.dataGridViewEmpDetails.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
        }
Exemplo n.º 2
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            if (!ID.Text.Equals(""))
            {
                string query = String.Format("update LogInDetails set accountType='admin' where employeeID='{0}'", this.ID.Text);
                DataAccess.ExecuteSQL(query);

                //load logindetails of employees
                dataGridViewEmpDetails.DataSource = SysAdminHelper.ShowEmployeesLoginDetails();;
                this.dataGridViewEmpDetails.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            }
            else
            {
                MessageBox.Show("You must need to enter Employee ID!");
            }
        }