Example #1
0
        protected void RaiseEvent()
        {
            if (_valueManager.IsDirty != _SaveButtonVisible)
            {
                //判斷權限
                if (Attribute.IsDefined(GetType(), typeof(FeatureCodeAttribute)))
                {
                    FeatureCodeAttribute fca = Attribute.GetCustomAttribute(GetType(), typeof(FeatureCodeAttribute)) as FeatureCodeAttribute;
                    if (fca != null)
                    {
                        if (Framework.Legacy.GlobalOld.Acl[GetType()].Editable)
                        {
                            RefreshSaveButtonStatus();
                        }
                    }
                }
                else //沒有定議權限就按照平常方法處理。
                {
                    RefreshSaveButtonStatus();
                }

                if (this.CancelButtonVisibleChanged != null)
                {
                    CancelButtonVisibleChanged.Invoke(this, new EventArgs());
                }
            }
        }
Example #2
0
 protected void RaiseEvent()
 {
     if (_ValueManager.IsDirty != SaveButtonVisible)
     {
         SaveButtonVisible   = _ValueManager.IsDirty;
         CancelButtonVisible = _ValueManager.IsDirty;
         if (this.SaveButtonVisibleChanged != null)
         {
             SaveButtonVisibleChanged.Invoke(this, new EventArgs());
         }
         if (this.CancelButtonVisibleChanged != null)
         {
             CancelButtonVisibleChanged.Invoke(this, new EventArgs());
         }
     }
 }