Exemplo n.º 1
0
        private void butDelete_Click(object sender, EventArgs e)
        {
            DataRow dataRowWork = Global.DataSet.Tables["Users"].Select(filter).OrderBy(u => u["Login"]).ToList()[listBoxUsers.SelectedIndex];
            Form    formUser    = new FormUserUpdate(StatusForm.Delete, dataRowWork);

            formUser.ShowDialog();

            ListBoxUpdate();
        }
Exemplo n.º 2
0
        private void listBoxUsers_DoubleClick(object sender, EventArgs e)
        {
            // двойное нажатие
            DataRow dataRowWork = Global.DataSet.Tables["Users"].Select(filter).OrderBy(u => u["Login"]).ToList()[listBoxUsers.SelectedIndex];
            Form    formUser    = new FormUserUpdate(StatusForm.Edit, dataRowWork);

            formUser.ShowDialog();

            ListBoxUpdate();
        }
Exemplo n.º 3
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            DataRow rw   = null;
            Form    ifrm = new FormUserUpdate(StatusForm.Add, rw);

            ifrm.ShowDialog();

            var usersTable = Global.DataSet.Tables["Users"];
            int cn         = usersTable.Rows.Count;

            ListBoxUpdate();
        }