Пример #1
0
 protected override void OnSaving()
 {
     if (!SecurityUser.IsCreator())
     {
         this.Reload();
         throw new Exception("This is a Read only record  ");
     }
     base.OnSaving();
 }
Пример #2
0
 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();
 }