コード例 #1
0
ファイル: ChargeManager.cs プロジェクト: ognjenm/egle
 /// <summary>
 /// Update Charge Logo information
 /// </summary>
 /// <param name="logo">Charge Logo object</param>
 public void UpdateChargeLogo(ChargeLogo logo)
 {
     chargeDao.UpdateChargeLogo(logo);
 }
コード例 #2
0
 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)
         };
 }
コード例 #3
0
ファイル: ChargeDao.cs プロジェクト: ognjenm/egle
        /// <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);
        }