protected void btnOk_Click(object sender, EventArgs e)
        {
            Permission permission = new Permission
            {
                PermissionName = ddlPermissionName.SelectedValue,
                Description    = txtDescription.Text,
                PathId         = int.Parse(ddlPath.SelectedValue)
            };

            if (id != 0)
            {
                permission.PermissionId = id;
                permissionService.Update(permission);
            }
            else
            {
                permissionService.Create(permission);
            }
            PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
        }
예제 #2
0
        public IHttpActionResult Create(PermissionRequest entity)
        {
            var result = _permissionService.Create(entity);

            return(Ok(result));
        }