Пример #1
0
        public void ReLoad(DataEnum dataClass)
        {
            //重新读取数据
            DataTable table = BaseDal.GetDataTable(dataClass);
            Data      data  = new Data(table);

            if (htDatas.ContainsKey(dataClass))
            {
                htDatas.Remove(dataClass);
            }
            htDatas.Add(dataClass, data);
        }
Пример #2
0
 public Data this[DataEnum dataClass]
 {
     get
     {
         if (htDatas.ContainsKey(dataClass))
         {
             object objData = htDatas[dataClass];
             return((Data)objData);
         }
         else
         {
             DataTable table = BaseDal.GetDataTable(dataClass);
             Data      data  = new Data(table);
             htDatas.Add(dataClass, data);
             return(data);
         }
     }
 }