/// <summary> /// Show group detail when user choose add group in popup /// </summary> /// <remarks> /// Mode = A /// </remarks> private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { //Add new group user frmGUserDetail frm = new frmGUserDetail("A", "", "", ""); DialogResult r = frm.ShowDialog(); if (r == DialogResult.Cancel) { ucUser_Load(sender, e); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
/// <summary> /// Show group detail when user choose edit in popup /// </summary> /// <remarks> /// Mode = E /// </remarks> private void itemEditGUser_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (groupUserId.Count() <= 0) { MessageBox.Show("Please choose user group!"); } else { frmGUserDetail frm = new frmGUserDetail("E", groupUserName, groupUserId, userId); DialogResult r = frm.ShowDialog(); if (r == DialogResult.Cancel) { GenTreeUserData(); } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }