private void Edit_Button_Click(object sender, EventArgs e) { if ((Personel)Users_DataGridView.CurrentRow.DataBoundItem == null) { Alert.DisplayError("No item selected!"); return; } UserEditor addNewAccountWindow = new UserEditor((Personel)Users_DataGridView.CurrentRow.DataBoundItem); addNewAccountWindow.ShowDialog(); }
private void AddNewAccount_Button_Click(object sender, EventArgs e) { UserEditor addNewAccountWindow = new UserEditor(); addNewAccountWindow.ShowDialog(); }