示例#1
0
        public static List <Dictionary> GetList(string where)
        {
            List <Dictionary> dictionaryList = new List <Dictionary>();

            foreach (DictionaryDA dictionaryDA in DictionaryDA.FindAll(where))
            {
                Dictionary dictionary = new Dictionary(dictionaryDA);

                dictionaryList.Add(dictionary);
            }

            dictionaryList.Sort();

            return(dictionaryList);
        }
示例#2
0
        public bool Delete()
        {
            try
            {
                foreach (DictionaryDA dictionaryDA in DictionaryDA.FindAll(string.Format("where [ParentID]={0}", ID)))
                {
                    dictionaryDA.Delete();
                    dictionaryDA.Save();
                }

                m_DictionaryDA.Delete();
                m_DictionaryDA.Save();
                return(true);
            }
            catch (Exception exception)
            {
                Loger.Instance.WriteErrorLog(exception.Message);
                return(false);
            }
        }