protected override bool Execute(CodeActivityContext context)
        {
            List <int>     id_List    = ListSectionID.Get(context);
            DateTimeOffset _EventDate = EventDate.Get(context);
            bool           roundData  = RoundData.Get(context);

            if (id_List == null || id_List.Count == 0)
            {
                Error.Set(context, "Список секций не может быть пустым");
                return(false);
            }

            try
            {
                Stream       Res = ARM_Service.XMLExportGetSection80020ForSectionArray(_EventDate, id_List, DataSourceType, BusRelation, roundData, false, TimeZoneId, true, false, false, 1, true).XMLStream;
                MemoryStream ms  = new MemoryStream();
                Res.CopyTo(ms);
                ms.Position = 0;

                Document.Set(context, ms);
            }

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

            return(string.IsNullOrEmpty(Error.Get(context)));
        }
Esempio n. 2
0
        protected override bool Execute(CodeActivityContext context)
        {
            List <int> ps_id_List = ListPsId.Get(context);
            DateTime   _EventDate = EventDate.Get(context);
            bool       roundData  = RoundData.Get(context);

            if (ps_id_List == null || ps_id_List.Count == 0)
            {
                Error.Set(context, "Список ПС не может быть пустым");
                return(false);
            }

            try
            {
                Stream Res = ARM_Service.XMLExportGetPS80020ForPSArray(_EventDate, ps_id_List, DataSourceType, requiredATSCode, isReadCalculatedValues, roundData, false, UTCTimeShiftFromMoscow, false, false, 1, true).XMLStream;

                MemoryStream ms = new MemoryStream();
                Res.CopyTo(ms);
                ms.Position = 0;

                Document.Set(context, ms);
            }

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

            return(string.IsNullOrEmpty(Error.Get(context)));
        }
Esempio n. 3
0
        protected override bool Execute(CodeActivityContext context)
        {
            string         _AisId     = AisId.Get(context);
            DateTimeOffset _EventDate = EventDate.Get(context);
            bool           roundData  = RoundData.Get(context);

            if (string.IsNullOrEmpty(_AisId))
            {
                Error.Set(context, "Идентификатор АИС не может быть пустым");
                return(false);
            }

            try
            {
                XMLATSExportSingleObjectResultCompressed Res = ARM_Service.XMLExportGetAIS80020(_EventDate, _AisId, DataSourceType, isReadCalculatedValues, roundData, false, false, false, false, 1, true);
                if (!string.IsNullOrEmpty(Res.Errors))
                {
                    Error.Set(context, Res.Errors);
                }

                Document.Set(context, Res.XMLStreamCompressed);
            }

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

            return(string.IsNullOrEmpty(Error.Get(context)));
        }
        protected override bool Execute(CodeActivityContext context)
        {
            int            id         = SectionID.Get(context);
            DateTimeOffset _EventDate = EventDate.Get(context);
            bool           roundData  = RoundData.Get(context);

            try
            {
                XMLATSExportSingleObjectResult Res = ARM_Service.XMLExportGetSection80020(_EventDate, id, DataSourceType, BusRelation, TimeZoneId, roundData, false, false, true, false, false, 1, true);
                Document.Set(context, Res.XMLStream);
            }

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

            return(string.IsNullOrEmpty(Error.Get(context)));
        }
Esempio n. 5
0
        //[Category(ActivitiesSettings.PropertyGridCategoryName_Out)]
        //[DisplayName("Имя файла документа")]
        //public OutArgument<string> DocumentFileName { get; set; }

        protected override bool Execute(CodeActivityContext context)
        {
            int      ps_id      = PsId.Get(context);
            DateTime _EventDate = EventDate.Get(context);
            bool     roundData  = RoundData.Get(context);

            try
            {
                XMLATSExportSingleObjectResult Res = ARM_Service.XMLExportGetPS80020(_EventDate, ps_id, DataSourceType, requiredATSCode, isReadCalculatedValues, roundData, false, false, UTCTimeShiftFromMoscow, false, false, 1, true);
                Document.Set(context, Res.XMLStream);
                //DocumentFileName.Set(context, Res.FileName);
            }

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

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