Example #1
0
        protected override bool Execute(CodeActivityContext context)
        {
            List <Int32> L = PS_ID_List.Get(context);

            if (L == null || L.Count == 0)
            {
                Error.Set(context, "Не определен список ПС");
                return(false);
            }


            try
            {
                var res = ARM_Service.BPS_GetPSBalanceValidationList(PS_ID_List.Get(context),
                                                                     StartDateTime.Get(context),
                                                                     EndDateTime.Get(context),
                                                                     enumTimeDiscreteType.DBInterval,
                                                                     DataSourceType,
                                                                     isPower, null);
                BalanceValidationList.Set(context, res);
                if (res.Errors != null && res.Errors.Length > 0)
                {
                    Error.Set(context, res.Errors.ToString());
                }
            }

            catch (Exception ex)
            {
                Error.Set(context, ex.Message);
                if (!HideException.Get(context))
                {
                    throw ex;
                }
            }

            return(string.IsNullOrEmpty(Error.Get(context)));
        }