Ejemplo n.º 1
0
        private void BtnSubmitQuery(object sender, RoutedEventArgs e)
        {
            try
            {
                DataSet _data = null;
                if (txtRslName.Text == "")
                {
                    GenevaParams genevaParams = new GenevaParams();
                    genevaParams.IsQuery = true;
                    genevaParams.RslQuery = txtGenevaQuery.Text.Replace("\n", " ").Replace("\r", " ");
                    _data = GenevaHelper.ExecuteRSLQuery(getGenevaConnection(), genevaParams);
                }
                else
                {
                    GenevaParams genevaParams = GetDataParams();
                    genevaParams.RslReportName = txtRslName.Text;
                    _data = GenevaHelper.ExecuteRSLQuery(getGenevaConnection(), genevaParams);
                }

                grdGenevaReuslts.ItemsSource = _data.Tables.Count > 1 ? _data.Tables["Data"] : _data.Tables[0];
            }
            catch (Exception ex)
            {
                MessageBox.Show( ex.Message, "Geneva Error");
            }
        }
Ejemplo n.º 2
0
  private GenevaParams GetDataParams()
  {
   string startDate = DateTime.Parse( CtlStartDatePicker.Text).ToShortDateString()  + ":00:00:00" ;
   string endDate = DateTime.Parse(CtlEndDatePicker.Text).ToShortDateString()  + ":23:59:59" ;
   string startDateMinu = DateTime.Parse(CtlStartDatePicker.Text).AddDays(-1).ToShortDateString() + ":23:59:59" ;
   string knowledgeDate = DateTime.Parse(CtlKnowledgeDatePicker.Text).ToShortDateString() + ":23:59:59";
   GenevaParams param = new GenevaParams("", "", TxtPortfolio.Text, startDate, endDate, knowledgeDate, "", startDateMinu,txtCustomFilter.Text,txtAcctFilter.Text);
   return param;
 }
Ejemplo n.º 3
0
 private static DataSet Execute(GenevaConnection pConnection, GenevaParams pParameters)
 {
    
    
     DataSet _getRSLData = new DataSet();
     GenWebAccessAccess queryMan = new GenWebAccessAccess(pConnection);
  
     if (pParameters.IsQuery)
     {
         _getRSLData = queryMan.runReportSelectLiteralDS( pParameters.RslQuery);
     }
     else
     {
         _getRSLData = queryMan.getReportResultsLiteralDS(pParameters.RslReportName, GetParameterString(pParameters));
     }
   
     return _getRSLData;
 }
Ejemplo n.º 4
0
        private static String GetParameterString(GenevaParams pParameters)
        {
            StringBuilder query = new StringBuilder();

            if (!String.IsNullOrEmpty(pParameters.Portfolio))
                query.Append(" -p " + pParameters.Portfolio);
            if (!String.IsNullOrEmpty(pParameters.PeriodStartDate))
                query.Append(" -ps " + pParameters.PeriodStartDate);
            if (!String.IsNullOrEmpty(pParameters.PeriodEndDate))
                query.Append(" -pe " + pParameters.PeriodEndDate);
            if (!String.IsNullOrEmpty(pParameters.KnowledgeBeginDate))
                query.Append(" -kd " + pParameters.KnowledgeBeginDate);

            if (pParameters.ReportType == GenevaParams.GenevaReportType.Detail)
                query.Append(" --ReportType  " + "Detail");
            else if (pParameters.ReportType == GenevaParams.GenevaReportType.Summary)
                query.Append(" --ReportType  " + "Summary");

            if (!String.IsNullOrEmpty(pParameters.Custom))
                query.Append(" " + pParameters.Custom);
            if (!String.IsNullOrEmpty(pParameters.Consolidate))
                query.Append(" --Consolidate " + pParameters.Consolidate);
            if (!String.IsNullOrEmpty(pParameters.AcctParameter))
                query.Append(" -ap " + pParameters.AcctParameter);
            if (!String.IsNullOrEmpty(pParameters.AcctParameter))
                query.Append(" -ap " + pParameters.AcctParameter);
            if (!String.IsNullOrEmpty(pParameters.AcctParameter))
                query.Append(" -af " + pParameters.AcctFilters);
            return query.ToString();

        }
Ejemplo n.º 5
0
 public static DataSet ExecuteRSLReport(GenevaConnection pConnection, GenevaParams pParameters)
 {
     return Execute(pConnection, pParameters);
 }