Ejemplo n.º 1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            var res = rolesSvc.Edit(new Model.Roles()
            {
                Roles_Id         = Guid.Parse(this.txtId.Text),
                Roles_Title      = this.txtName.Text,
                Roles_UpdateTime = DateTime.Now
            });
            ReturnMsg rm = res > 0
                ? new ReturnMsg()
            {
                Code    = StatusCode.OK,
                Message = "修改权限成功",
                Data    = null
            }
                : new ReturnMsg()
            {
                Code    = StatusCode.Error,
                Message = "修改权限失败",
                Data    = null
            };

            Session["Msg"] = rm;
            Response.Redirect("Roles_List.aspx");
        }
        protected void btnSumbit_OnClick(object sender, EventArgs e)
        {
            int id    = int.Parse(this.RolesId.Text);
            var title = this.RolesTitle.Text;
            int rs    = bll.Edit(new Model.Roles()
            {
                Id    = id,
                Title = title
            });

            if (rs > 0)
            {
                Response.Write("<script>alert('修改成功');location.href='RolesList.aspx'</script>");
            }
            else
            {
                Response.Write("<script>alert('修改失败');</script>");
            }
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> Edit(EditRoleInputDto model)
        {
            await rolesService.Edit(model);

            return(Ok());
        }