/// <summary> /// Update Charge Logo information /// </summary> /// <param name="logo">Charge Logo object</param> public void UpdateChargeLogo(ChargeLogo logo) { chargeDao.UpdateChargeLogo(logo); }
private static List<string> MapImageUrlFromLogo(ChargeLogo image) { if (image == null || string.IsNullOrEmpty(image.LogoDigest) || string.IsNullOrEmpty(image.LogoExtension)) { return null; } return new List<string> { string.Format( ConfigurationManager.AppSettings["eviivo.Eagle.Business.Mailing.EmailManager.ImagenImageTemplate"], string.Empty, image.LogoDigest, "{0}", "{1}", image.LogoExtension) }; }
/// <summary> /// Update Charge Logo information /// </summary> /// <param name="logo">Charge Logo object</param> public void UpdateChargeLogo(ChargeLogo logo) { const string SQL = "Update Pricing.Charge SET LogoId = @LogoId, LogoDigest = @LogoDigest, LogoExtension = @LogoExtension WHERE Id = @Id"; var parameters = new List<SqlParameter> { DbHelper.CreateParameter(BusinessMapper.Parameters.Id, logo.ChargeId), DbHelper.CreateParameter(BusinessMapper.Parameters.LogoDigest, logo.LogoDigest), DbHelper.CreateParameter(BusinessMapper.Parameters.LogoExtension, logo.LogoExtension), DbHelper.CreateParameter(BusinessMapper.Parameters.LogoId, logo.LogoId) }; DbHelper.ExecuteNonQueryCommand(SQL, parameters: parameters); }