Esempio n. 1
0
 public void InitReportData(DataSet projectData, Dictionary <string, object> exParams)
 {
     if (this.propertyValid)
     {
         try
         {
             SqliteData sqliteData = new SqliteData(this);
             data = sqliteData.GetData(projectData, exParams);
             if (data != null)
             {
                 verifyDataTable();
                 dataValid = true;
             }
             else
             {
                 dataValid = false;
             }
         }
         catch
         {
             dataValid = false;
             throw;
         }
     }
     if (dataValid)
     {
         RaiseDataChanged();
     }
 }
Esempio n. 2
0
        public void InitReportDataByPrjIndex(int prjIndex)
        {
            if (projectDataManager != null && propertyValid)
            {
                SqliteData sqliteData = new SqliteData(this);
                try
                {
                    if (prjIndex == -1)
                    {
                        data = sqliteData.GetData(projectDataManager.ProjectData);
                    }
                    else
                    {
                        if (projectDataManager.StartCheckProject(desrcLevel, prjIndex))
                        {
                            data = sqliteData.GetData(projectDataManager.ProjectData);
                            projectDataManager.EndCheckProject();
                        }
                    }

                    if (data != null)
                    {
                        verifyDataTable();
                        dataValid = true;
                    }
                    else
                    {
                        dataValid = false;
                    }
                }
                catch (ReportReadDataException readDataException)
                {
                    Function.Alert(readDataException.Message, "提示");
                    dataValid = false;
                }
                catch (Exception e)
                {
                    dataValid = false;
                    throw e;
                }
                if (dataValid)
                {
                    RaiseDataChanged();
                }
            }
        }