コード例 #1
0
 /// <summary>
 /// 点击添加按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     Initialize();
     pnlEdit.Visible = true;
     PermissionByCommonEdit1.Command = "ADD";
     PermissionByCommonEdit1.Initialize();
 }
コード例 #2
0
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            Repeater list = (Repeater)PermissionByCommonList1.FindControl("rptList");
            string   id   = UIControlHelper.GetCheckBoxByRepeater(list, "chkId");

            if (id.Length == 0)
            {
                MessageHelper.ShowAndBack(Page, MessageHelper.GetMessage("NOCHECK"));
                return;
            }
            if (id.Split(',').Length > 1)
            {
                MessageHelper.ShowAndBack(Page, MessageHelper.GetMessage("MORECHECK"));
                return;
            }
            Initialize();
            pnlEdit.Visible = true;
            PermissionByCommonEdit1.Identity = int.Parse(id);
            PermissionByCommonEdit1.Command  = "EDIT";
            PermissionByCommonEdit1.Initialize();
        }