Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            FRM_ADD_USER frm = new FRM_ADD_USER();

            frm.btnSave.Text   = "حفظ المستخدم";
            frm.txtID.ReadOnly = false;
            frm.ShowDialog();
            this.dgvUsers.DataSource = login.SearchUsers("");
        }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            FRM_ADD_USER frm = new FRM_ADD_USER();

            frm.txtID.ReadOnly     = true;
            frm.txtID.Text         = dgvUsers.CurrentRow.Cells[0].Value.ToString();
            frm.txtFullName.Text   = dgvUsers.CurrentRow.Cells[1].Value.ToString();
            frm.txtPWD.Text        = dgvUsers.CurrentRow.Cells[2].Value.ToString();
            frm.txtPWDConfirm.Text = dgvUsers.CurrentRow.Cells[2].Value.ToString();
            frm.cmpType.Text       = dgvUsers.CurrentRow.Cells[3].Value.ToString();
            frm.btnSave.Text       = "تعديل المستخدم";
            frm.ShowDialog();
            this.dgvUsers.DataSource = login.SearchUsers("");
        }