private void btnEditAccount_Click(object sender, EventArgs e)
        {
            int index = this.gridUsers.Rows.IndexOf((GridViewDataRowInfo)this.gridUsers.CurrentRow);

            if (index < 0)
            {
                return;
            }

            Clients clients = (Clients)gridUsers.Rows[index].DataBoundItem;

            if (clients != null)
            {
                UserEdit edit = new UserEdit();

                edit.txtClientID.Text        = gridUsers.CurrentRow.Cells[0].Value.ToString();
                edit.txtName.Text            = gridUsers.CurrentRow.Cells[2].Value.ToString();
                edit.txtLastname.Text        = gridUsers.CurrentRow.Cells[3].Value.ToString();
                edit.txtPersonalID.Text      = gridUsers.CurrentRow.Cells[4].Value.ToString();
                edit.txtAdress.Text          = gridUsers.CurrentRow.Cells[5].Value.ToString();
                edit.rdDatePicker.Text       = gridUsers.CurrentRow.Cells[6].Value.ToString();
                edit.txtEmail.Text           = gridUsers.CurrentRow.Cells[8].Value.ToString();
                edit.txtPhone.Text           = gridUsers.CurrentRow.Cells[7].Value.ToString();
                edit.txtUsername.Text        = gridUsers.CurrentRow.Cells[9].Value.ToString();
                edit.txtPasswordUserAcc.Text = gridUsers.CurrentRow.Cells[10].Value.ToString();
                edit.txtBalance.Text         = gridUsers.CurrentRow.Cells[11].Value.ToString();
                edit.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        private void settingUserToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var formAdd = new UserEdit(Settings.Instance.currenUser);

            formAdd.Owner = this;
            formAdd.comboBoxGroup.Enabled = false;
            if (formAdd.ShowDialog() == DialogResult.OK)
            {
                //MessageBox.Show("OK");
            }
            CheckUserDialog();
        }
Ejemplo n.º 3
0
        private void InfoCommandFunc()
        {
            UserEdit edit = new UserEdit();

            edit.ShowDialog();
        }