protected override DialogOptions GetDialogOptions() { var opt = base.GetDialogOptions(); opt.Buttons = new List <DialogButton> { new DialogButton { Text = Q.Text("Dialogs.OkButton"), Click = delegate { RolePermissionService.Update(new RolePermissionUpdateRequest { RoleID = options.RoleID, Permissions = permissions.Value, Module = null, Submodule = null }, response => { DialogClose(); Window.SetTimeout(delegate() { Q.NotifySuccess(Q.Text("Site.RolePermissionDialog.SaveSuccess")); }, 0); }); }, }, new DialogButton { Text = Q.Text("Dialogs.CancelButton"), Click = DialogClose } }; opt.Title = String.Format(Q.Text("Site.RolePermissionDialog.DialogTitle"), options.Title); return(opt); }
public RolePermissionDialog(RolePermissionDialogOptions opt) : base(opt) { permissions = new PermissionCheckEditor(this.ById("Permissions")); RolePermissionService.List(new RolePermissionListRequest { RoleID = options.RoleID, Module = null, Submodule = null }, response => { permissions.Value = response.Entities; }); }