public virtual DictionaryAssocContainer DictionaryAssocSelectAll()
 {
     TraceCallEnterEvent.Raise();
       try
       {
     DictionaryAssocContainer result;
     DataSet entitySet = m_DataContext.ndihdDictionaryAssocSelectAll();
     result = new DictionaryAssocContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
Пример #2
0
        // -------------------------------------------------------------------------------------
        /// <summary>
        /// Prepage Save action
        /// </summary>
        // -------------------------------------------------------------------------------------
        private void SaveData()
        {
            IDictionaryService dictSrv = ServiceFactory.GetDictionaryService();
              Dictionary dict;
              if (m_bNewItem)
              {
            CurrentID = Guid.NewGuid();
            dict = new Dictionary(CurrentID);
            dict.IsActive = true;
            dict.Word = txtWord.Text;
              }
              else
              {
            dict = dictSrv.DictionarySelect(CurrentID);
              }

              // Get control values
              dict.English = txtEnglish.Text;
              dict.Meaning = txtMeaning.Text;
              dict.Professional = rbProfessional.Checked;

              DictionaryAssocContainer assocs = new DictionaryAssocContainer();

              foreach (Dictionary dic in m_data.Current)
              {
            assocs.Add(new DictionaryAssoc(CurrentID, dic.ID));
              }
              dict.Relations = assocs;

              // Save data
              if (m_bNewItem)
            dictSrv.DictionaryInsert(dict);
              else
            dictSrv.DictionaryUpdate(dict);
        }
 public virtual DictionaryAssocContainer SelectChildrenByWordOfDictionary(DBGuid IDVal)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     DictionaryAssocContainer result;
     DataSet entitySet = m_DataContext.ndihdWordOfDictionarySelectBy(IDVal);
     result = new DictionaryAssocContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }