Ejemplo n.º 1
0
 internal static Account_Information_Generic_Value MapGenericValue(AccountInformationGeneric genericValue,
                                                                   int accountId)
 {
     return(new Account_Information_Generic_Value()
     {
         AccountId = accountId,
         AccountInformationGenericId = genericValue.AccountInformationGenericId,
         Id = genericValue.Id,
         Value = genericValue.Value
     });
 }
Ejemplo n.º 2
0
        internal static AccountInformationGeneric MapValue(Account_Information_Generic value)
        {
            AccountInformationGeneric info = null;

            try
            {
                info = new AccountInformationGeneric()
                {
                    AccountId = value.Account_Information_Generic_Value.FirstOrDefault() != null?value.Account_Information_Generic_Value.FirstOrDefault().AccountId : 0,
                    AccountInformationGenericId = value.Id,
                    Id    = value.Account_Information_Generic_Value.FirstOrDefault() != null?value.Account_Information_Generic_Value.FirstOrDefault().Id    : 0,
                    Value = value.Account_Information_Generic_Value.FirstOrDefault() != null?value.Account_Information_Generic_Value.FirstOrDefault().Value : "",
                    Name  = value.Name
                };
            }
            catch (Exception ex)
            {
                LogHelper.LogError(string.Format("Couldn't map AccountInformationGeneric: MapValue(Account_Information_Generic value)"), ex, 0);
            }

            return(info);
        }