Пример #1
0
 internal void DisplaySingle(Control control, object entity)
 {
     if (control == null)
     {
         return;
     }
     try
     {
         BaseEntry baseEntry = _fillEntrys[control] as BaseEntry;
         if (control == null || baseEntry == null)
         {
             return;
         }
         //if (baseEntry is GridEntry)
         //{
         //    ((GridEntry)baseEntry).ClearSingle(control);
         //    ((GridEntry)baseEntry).DisplaySingle(control, entity);
         //    return;
         //}
         baseEntry.Clear(control);
         if (entity != null)
         {
             baseEntry.DisplayEntity(control, entity);
         }
     }
     catch
     {
         throw;
     }
 }
Пример #2
0
 public void DisplayEntity(object entity)
 {
     try
     {
         foreach (DictionaryEntry fillEntry in _fillEntrys)
         {
             Control   control   = fillEntry.Key as Control;
             BaseEntry baseEntry = fillEntry.Value as BaseEntry;
             if (control != null && baseEntry != null)
             {
                 baseEntry.Clear(control);
                 if (entity != null)
                 {
                     baseEntry.DisplayEntity(control, entity);
                 }
             }
         }
     }
     catch
     {
         throw;
     }
 }