Exemplo n.º 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;
     }
 }
Exemplo n.º 2
0
        public JsonResult Delete(string id)
        {
            SysRole.Delete("where id in (@0)", id.ToIntList());

            return(Json(ArtDialogResponseResult.SuccessResult));
        }