Beispiel #1
0
        private void btnAddUser_Click(object sender, EventArgs e)
        {
            AddUser addUser = new AddUser();

            addUser.Text = "Add User";
            addUser.ShowDialog();
            if (AddUser.isSubmit)
            {
                loadData();
            }
        }
Beispiel #2
0
 private void dgv_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgv.Rows.Count > 0)
     {
         if (e.ColumnIndex == 3)
         {
             AddUser addUser = new AddUser();
             addUser.userID = Convert.ToInt32(dgv.CurrentRow.Cells["id"].Value.ToString());
             addUser.Text   = "Edit User";
             addUser.ShowDialog();
             if (AddUser.isSubmit)
             {
                 loadData();
             }
         }
     }
 }