protected override bool Execute(CodeActivityContext context) { DateTime dt = new DateTime(Year.Get(context), Month.Get(context), 1); try { TI_ChanelType ti = new TI_ChanelType { ChannelType = ChannelType.Get(context), TI_ID = TiId.Get(context), DataSourceType = null }; SectionIntegralComplexResults result = ARM_Service.GroupTP_GetActConsumptionPowerTi(ti, ExcelAdapterType, dt, 2, ".", IsReadCalculatedValues.Get(context), isExportAllIncludetTi.Get(context), false, null, WcfTimeOut.Get(context)); if (!string.IsNullOrEmpty(result.Errors.ToString())) { Error.Set(context, result.Errors.ToString()); } else { SendEmail(context, CompressUtility.DecompressGZip(result.Document)); } } catch (Exception ex) { Error.Set(context, ex.Message); if (!HideException.Get(context)) { throw ex; } } return(string.IsNullOrEmpty(Error.Get(context))); }