예제 #1
0
 /// <summary>
 /// 刷新数据
 /// </summary>
 /// <param name="role"></param>
 /// <param name="powertype"></param>
 public void RefreshData(Role role, string powertype)
 {
     try
     {
         this.role      = role;
         this.powerType = powertype;
         if (role.Sysid == null)
         {
             throw new Exception("角色未保存");
         }
         if (bindingList != null)
         {
             bindingList.ListChanged -= new ListChangedEventHandler(menuinfoBindingList_ListChanged);
         }
         IList <IPower> powerList;
         powerClient.GetList(out powerList);
         bindingList              = new BindingList <IPower>(powerList);
         bindingList.ListChanged += new ListChangedEventHandler(menuinfoBindingList_ListChanged);
         Merge();
     }
     catch (Exception ex)
     {
         OnExceptionAction(ex);
     }
 }
예제 #2
0
 public void RedfreshData()
 {
     try
     {
         IList <T> itemList;
         rightsClient.GetList(out itemList);
         if (bindingList != null)
         {
             this.bindingList = new BindingList <T>(itemList.ToList());
         }
     }
     catch (Exception ex)
     {
         OnExceptionAction(ex);
     }
 }