public static void dgUserAccessToOthersCal_OnRowSelectedStep( IUserAccessToOthersCal form,  EventArgs args)
        {
            IUserCalendar userCalendar = form.dsUserAccessToOthersCal.Current as IUserCalendar;
            IUser user = form.CurrentEntity as IUser;

            user.OthersAccessToUserCal.Remove(userCalendar);
            userCalendar.Delete();

            form.dgUserAccessToOthersCal.SelectedIndex = -1;
        }
        public static void dgUserAccessToOthersCal_OnRowSelectedStep(IUserAccessToOthersCal form, EventArgs args)
        {
            IUserCalendar userCalendar = form.dsUserAccessToOthersCal.Current as IUserCalendar;
            IUser         user         = form.CurrentEntity as IUser;

            user.OthersAccessToUserCal.Remove(userCalendar);
            userCalendar.Delete();

            form.dgUserAccessToOthersCal.SelectedIndex = -1;
        }
예제 #3
0
        public static void lueAddUser_OnChangeStep(IUserAccessToOthersCal form, EventArgs args)
        {
            IUser userwantingaccess = form.CurrentEntity as IUser;
            IUser user = 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();
            }
        }
        public static void lueAddUser_OnChangeStep(IUserAccessToOthersCal form, EventArgs args)
        {
            IUser userwantingaccess = form.CurrentEntity as IUser;
            IUser user = 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());
        }
        public static void lueAddUser_OnChangeStep( IUserAccessToOthersCal form,  EventArgs args)
        {
            IUser userwantingaccess = form.CurrentEntity as IUser;
            IUser user = 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());
        }