示例#1
0
 /// <summary>
 /// Show access level or access group detail
 /// </summary>
 private void gridData_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         string id   = gridView1.GetFocusedRowCellValue(gcId).ToString();
         string name = gridView1.GetFocusedRowCellValue(gcName).ToString();
         if (xtraTabControl1.SelectedTabPage == xtabGroup)
         {
             ucAccessGroupDetail uc = new ucAccessGroupDetail(name, "E", userId, id);
             Panel p = (this.Parent as Panel);
             p.Controls.Clear();
             p.Controls.Add(uc);
             uc.Dock = DockStyle.Fill;
         }
         else
         if (xtraTabControl1.SelectedTabPage == xtabLevel)
         {
             ucAccessLevelDetail uc = new ucAccessLevelDetail(userId, "E", id);
             Panel p = (this.Parent as Panel);
             p.Controls.Clear();
             p.Controls.Add(uc);
             uc.Dock = DockStyle.Fill;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
示例#2
0
        /// <summary>
        /// Add new access group
        /// </summary>
        private void btnAddAG_Click(object sender, EventArgs e)
        {
            ucAccessGroupDetail uc = new ucAccessGroupDetail("Add New Access Group", "A", userId, "");
            Panel p = (this.Parent as Panel);

            p.Controls.Clear();
            p.Controls.Add(uc);
        }