Exemplo n.º 1
0
        private void RunDimensionApi(string templateFullDescription, string[] attributeIdList, string[] attributeNameList, DateTime?lastUpdate, string outputFileName)
        {
            DateTime toDate = DateTime.Now;
            AgressoQueryParameterList agressoQueryParameterList = new AgressoQueryParameterList(templateFullDescription);

            if (lastUpdate.HasValue)
            {
                agressoQueryParameterList.AddAgressoQueryParameter(new AgressoQueryParameter {
                    ParameterName = "last_update", ParameterType = ">", ParameterFromValue = (lastUpdate ?? DateTime.MinValue).ToString("MMddyyyy")
                });                                                                                                                                                                                                                                     // MMddyyyy
            }
            if (attributeIdList.Length > 0)
            {
                agressoQueryParameterList.AddAgressoQueryParameter(new AgressoQueryParameter {
                    ParameterName = "attribute_id", ParameterType = "()", ParameterFromValue = string.Join(",", attributeIdList)
                });
            }
            if (attributeNameList.Length > 0)
            {
                agressoQueryParameterList.AddAgressoQueryParameter(new AgressoQueryParameter {
                    ParameterName = "att_name", ParameterType = "()", ParameterFromValue = string.Join(",", attributeNameList)
                });
            }

            AgressoQuery aq = new AgressoQuery(agressoQueryParameterList, _credentials, outputFileName);

            aq.RootDirectory = _rootDirectory;
            aq.ExportAgressoQueryToCsv();
        }
Exemplo n.º 2
0
 public AgressoQuery(AgressoQueryParameterList agressoQueryParameterList, WSCredentials credentials, string outputFileName)
 {
     _credentials = credentials;
     _service     = new QueryEngineV200606DotNetSoapClient();
     _agressoQueryParameterList = agressoQueryParameterList;
     _outputFileName            = outputFileName;
 }
Exemplo n.º 3
0
        private void RunMeasureApi(string templateFullDescription, DateTime?fromDate, DateTime?lastUpdate)
        {
            DateTime toDate = DateTime.Now;

            foreach (DateTime i in GetAllMonths(toDate, fromDate ?? toDate))
            {
                AgressoQueryParameterList agressoQueryParameterList = new AgressoQueryParameterList(templateFullDescription);
                if (fromDate.HasValue)
                {
                    agressoQueryParameterList.AddAgressoQueryParameter(new AgressoQueryParameter {
                        ParameterName = "period", ParameterType = "=", ParameterFromValue = i.ToString("yyyyMM")
                    });
                }
                if (lastUpdate.HasValue)
                {
                    agressoQueryParameterList.AddAgressoQueryParameter(new AgressoQueryParameter {
                        ParameterName = "last_update", ParameterType = ">", ParameterFromValue = (lastUpdate ?? DateTime.MinValue).ToString("MMddyyyy")
                    });                                                                                                                                                                                                                                     // MMddyyyy
                }
                AgressoQuery aq = new AgressoQuery(agressoQueryParameterList, _credentials, "");
                aq.RootDirectory = _rootDirectory;
                aq.ExportAgressoQueryToCsv();
            }
        }