Example #1
0
 public void Check(DataRightEventArgs e)
 {
     if (!AllowAll)
     {
         throw new NoDataRightException(ErrorMessage);
     }
 }
Example #2
0
        public void Check(DataRightEventArgs e)
        {
            if (e.User.MainOrgId == null)
            {
                throw new NoDataRightException(ErrorMessage);
            }

            if (e.Row[fField.NickName].ToString() != e.User.MainOrgId.ToString())
            {
                throw new NoDataRightException(ErrorMessage);
            }
        }
Example #3
0
        public void Check(DataRightEventArgs e)
        {
            PageStyleClass         style = PageStyleClass.FromStyle(e.Style);
            CompositeDataRightItem item;

            if (fDictionary.TryGetValue(style, out item))
            {
                item.DataRight.CreateObject(e.FieldIndexer).Check(e);
            }
            else
            {
                if (!HasRightIfNoItem)
                {
                    throw new NoDataRightException();
                }
            }
        }