Exemplo n.º 1
0
 CarrierBankInfo CopyValueForModel(CarrierBankInfo org)
 {
     CarrierBankInfo dest = new CarrierBankInfo();
     foreach (PropertyInfo po in org.GetType().GetProperties())
     {
         foreach (PropertyInfo pd in dest.GetType().GetProperties())
         {
             if (pd.Name == po.Name)
             {
                 pd.SetValue(dest, po.GetValue(org, null), null);
                 break;
             }
         }
     }
     return dest;
 }