示例#1
0
 protected void grvRole_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         string roleName = (string)e.CommandArgument;
         if (e.CommandName == "imgBtnMod")
         {
             //修改
             this.btnSumbit.ImageUrl = "../../images/icon/img20.gif";
             SysRole oRole = SysRole.GetRole(roleName);
             RoleEditControl1.SetModifyUI(oRole);
             this.HidNewRole.Value = "block";
         }
         if (e.CommandName == "imgBtnDel")
         {
             SysRole role = new SysRole();
             role.RoleName = roleName;
             role.Delete();
             this.HidNewRole.Value = "none";
             BindRoles();
         }
     }
     catch
     {
         this.PrintfError("数据访问失败,请重试!");
         return;
     }
 }