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