Exemple #1
0
 private void dgvUserList_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         if (e.ColumnIndex == 6)
         {
             int result = int.Parse(dgvUserList.Rows[e.RowIndex].Cells[0].Value.ToString());
             if (result != 0)
             {
                 frmUserDetails frmAdd = new frmUserDetails(result);
                 frmAdd.FormClosed += async delegate {
                     if (!string.IsNullOrWhiteSpace(txtSearchName.Text))
                     {
                         SearchQuery(txtSearchName.Text);
                     }
                     else
                     {
                         await GetData();
                     }
                 };
                 frmAdd.ShowDialog();
             }
         }
     }
 }
Exemple #2
0
        private void btnAddUser_Click(object sender, EventArgs e)
        {
            frmUserDetails frmUd = new frmUserDetails();

            frmUd.ShowDialog();
        }