public void Load()
        {
            _client = new TL_MENUClient();
            _client.TL_MENU_UpdCompleted += _client_TL_MENU_UpdCompleted;
            _client.TL_MENU_InsCompleted += _client_TL_MENU_InsCompleted;
            _client.TL_MENU_LstAsync();
            _client.TL_MENU_LstCompleted += _client_TL_MENU_LstCompleted;

            _currentItem = new TL_MENU_SearchResult();
            DataItemParent = new ObservableCollection<MENU_PARENT_EX>();
        }
Example #2
0
        private void Load()
        {
            DataItemParent = new ObservableCollection<MENU_PARENT_EX>();
            _currentSearch = new TL_MENU_SearchResult();
            _dataItem = new ObservableCollection<MENU_EX>();
            _currentSelectedItem = new MENU_EX();

            _client = new TL_MENUClient();
            _client.TL_MENU_SearchCompleted += _client_TL_MENU_SearchCompleted;
            _client.TL_MENU_LstAsync();
            _client.TL_MENU_LstCompleted += _client_TL_MENU_LstCompleted;
            _client.TL_MENU_DelCompleted += _client_TL_MENU_DelCompleted;
        }
 public IEnumerable<TL_MENU_SearchResult> TL_MENU_Search(TL_MENU_SearchResult data, int? top)
 {
     try
     {
         using (var db = new OOAD_EDUManagementDataContext())
         {
             return db.TL_MENU_Search( data.menuName, data.menuNameEL, data.menuParentID, data.menuLink, data.menuNumber, data.menuIcon, data.menuLevel, top).ToList();
         }
     }
     catch (Exception e)
     {
         return new List<TL_MENU_SearchResult>();
     }
 }
 public TL_MENU_UpdResult TL_MENU_Upd(TL_MENU_SearchResult data)
 {
     try
     {
         using (var db = new OOAD_EDUManagementDataContext())
         {
             return db.TL_MENU_Upd(data.menuID, data.menuName, data.menuNameEL, data.menuParentID, data.menuLink, data.menuNumber, data.menuIcon, data.menuLevel).FirstOrDefault();
         }
     }
     catch (Exception e)
     {
         return new TL_MENU_UpdResult() { MENUID = null, RESULT = "-1", ERRORDESC = e.Message };
     }
 }