Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            FRM_Add_User FRM = new FRM_Add_User();

            FRM.ShowDialog();
            this.dataGridView1.DataSource = Login.SearchUsers("");
        }
Exemplo n.º 2
0
 private void إضافةمستخدمجديدToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         FRM_Add_User FRM = new FRM_Add_User();
         FRM.ShowDialog();
     }
     catch
     {
         MessageBox.Show("حدث خطأ ما !", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         FRM_Add_User FRM = new FRM_Add_User();
         FRM.txtID.Text    = dataGridView1.CurrentRow.Cells[0].Value.ToString();
         FRM.txtID.Enabled = false;
         FRM.txtName.Text  = dataGridView1.CurrentRow.Cells[1].Value.ToString();
         FRM.txtPWD.Text   = dataGridView1.CurrentRow.Cells[2].Value.ToString();
         FRM.txtCPWD.Text  = dataGridView1.CurrentRow.Cells[2].Value.ToString();
         FRM.txtType.Text  = dataGridView1.CurrentRow.Cells[3].Value.ToString();
         FRM.button1.Text  = "تحديث";
         FRM.Text          = "تعديل بيانات المستخدم";
         FRM.ShowDialog();
         this.dataGridView1.DataSource = Login.SearchUsers("");
     }
     catch
     {
         MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }