Beispiel #1
0
        private void EdittoolStripButton_Click(object sender, EventArgs e)
        {
            fEdform fEditUser = new fEdform();

            fEditUser.EditParam = "edit";
            fEditUser.db        = db;
            DataRow[] drSelectedArray = ds.Tables["Users"].DefaultView.Table.Select("id = " + dgUsers.SelectedRows[0].Cells["id"].Value);
            fEditUser.drUser = drSelectedArray[0];
            //fEditUser.dUser = dgUsers.SelectedRows[0];
            fEditUser.ShowDialog();
            FillUserListByDiv();
        }
Beispiel #2
0
        private void AddtoolStripButton_Click(object sender, EventArgs e)
        {
            fEdform fAddUser = new fEdform();

            fAddUser.EditParam = "add";
            fAddUser.db        = db;
            drForNewUser.SetField("div_name", dgDivision.SelectedRows[0].Cells["div_name"].Value);
            drForNewUser.SetField("division_id", dgDivision.SelectedRows[0].Cells["id"].Value);
            fAddUser.drUser = drForNewUser;
            fAddUser.ShowDialog();
            FillUserListByDiv();
        }