Ejemplo n.º 1
0
        /// <summary>
        /// Handles entity Inserted event.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">The <see cref="T:Terrasoft.Core.Entities.EntityAfterEventArgs" /> instance containing the
        /// event data.</param>
        public override void OnInserted(object sender, EntityAfterEventArgs e)
        {
            base.OnInserted(sender, e);
            var parthership     = (Entity)sender;
            var rightsRegulator = new SspEntityRightsRegulator(parthership.UserConnection, parthership.SchemaName);

            rightsRegulator.GrantOrganizationReadRights(parthership.PrimaryColumnValue,
                                                        parthership.GetTypedColumnValue <Guid>("AccountId"));
        }
 public void Execute(UserConnection userConnection, EntityEventAsyncOperationArgs arguments)
 {
     _rightsRegulator = new SspEntityRightsRegulator(userConnection, arguments.EntitySchemaName);
     ManageLeadOrganizationRights(arguments);
     ManageLeadOwnerRights((LeadEntityEventAsyncOperationArgs)arguments);
 }