Пример #1
0
        public static void lueAddUser_OnChangeStep(IOthersAccessToUserCal form, EventArgs args)
        {
            IUser user = form.CurrentEntity as IUser;
            IUser userwantingaccess = form.lueAddUser.LookupResultValue as IUser;

            if (!user.UserCalendarExists(userwantingaccess))
            {
                user.AddUserCalendar(userwantingaccess);

                IWebDialogService dialogService = form.Services.Get <IWebDialogService>();
                dialogService.SetSpecs(235, 420, "EditCalPermissions");
                dialogService.EntityType        = typeof(IUserCalendar);
                dialogService.CompositeKeyNames = "UserId, CalUserId";
                dialogService.EntityID          = string.Format("{0},{1}", userwantingaccess.Id, user.Id);
                dialogService.ShowDialog();
            }
        }
Пример #2
0
        public static void lueAddUser_OnChangeStep(IOthersAccessToUserCal form, EventArgs args)
        {
            IUser user = form.CurrentEntity as IUser;
            IUser userwantingaccess = form.lueAddUser.LookupResultValue as IUser;

            if (!user.UserCalendarExists(userwantingaccess))
            {
                user.AddUserCalendar(userwantingaccess);

                Sage.Platform.WebPortal.Services.IWebDialogService dialogService = form.Services.Get <Sage.Platform.WebPortal.Services.IWebDialogService>();
                dialogService.SetSpecs(235, 420, "EditCalPermissions");
                dialogService.EntityType        = typeof(Sage.Entity.Interfaces.IUserCalendar);
                dialogService.CompositeKeyNames = "UserId, CalUserId";
                dialogService.EntityID          = string.Format("{0},{1}", userwantingaccess.Id, user.Id);
                dialogService.ShowDialog();
            }
            //else
            //throw new Sage.Platform.Application.ValidationException(form.GetResource("Error_CalendarAccessAlreadyExists").ToString());
        }