protected override void OnSaving() { if (!SecurityUser.IsCreator()) { this.Reload(); throw new Exception("This is a Read only record "); } base.OnSaving(); }
protected override void OnSaving() { if (IsApproved == 1 || !SecurityUser.IsCreator()) { this.Reload(); throw new Exception("This is a Read only record "); } this.ModifiedBy = SecurityUser.CurrentUser.UserId; this.ModifiedAt = DateTime.Now; base.OnSaving(); }