Better status messages during the retrieval of data for the report
Improved the Select statement used to get RO data from the database Status message added
This commit is contained in:
parent
efd971ffec
commit
f9992cd299
@ -29,6 +29,7 @@ using System.Windows.Forms;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
|
using VlnStatus;
|
||||||
|
|
||||||
|
|
||||||
// CmpRpt reads data for the RO database and puts the data into the
|
// CmpRpt reads data for the RO database and puts the data into the
|
||||||
@ -98,7 +99,6 @@ namespace CmpRpt
|
|||||||
string recid=null;
|
string recid=null;
|
||||||
string tbl=null;
|
string tbl=null;
|
||||||
RODB myrodb=null;
|
RODB myrodb=null;
|
||||||
|
|
||||||
// the next two lists contain group headers for the reports.
|
// the next two lists contain group headers for the reports.
|
||||||
ArrayList headers = new ArrayList();
|
ArrayList headers = new ArrayList();
|
||||||
ArrayList reversehdrs = new ArrayList();
|
ArrayList reversehdrs = new ArrayList();
|
||||||
@ -148,8 +148,13 @@ namespace CmpRpt
|
|||||||
success = myrodb.RODB_GetRootGroups(rootXml);
|
success = myrodb.RODB_GetRootGroups(rootXml);
|
||||||
if (success == false) return;
|
if (success == false) return;
|
||||||
|
|
||||||
|
VlnStatusBar showStatBar = new VlnStatusBar("Complete Referenced Object Report");
|
||||||
|
showStatBar.BarMax = roIDList.Length;
|
||||||
|
showStatBar.StatMsg = "Retrieving RO Information";
|
||||||
|
int inc = 1;
|
||||||
foreach (string roid in roIDList)
|
foreach (string roid in roIDList)
|
||||||
{
|
{
|
||||||
|
showStatBar.BarValue = inc++;
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
tbl = roid.Substring(0, 4);
|
tbl = roid.Substring(0, 4);
|
||||||
recid = (roid.Length > 4) ? roid.Substring(4, 8) : null;
|
recid = (roid.Length > 4) ? roid.Substring(4, 8) : null;
|
||||||
@ -225,7 +230,7 @@ namespace CmpRpt
|
|||||||
headers.Clear();
|
headers.Clear();
|
||||||
reversehdrs.Clear();
|
reversehdrs.Clear();
|
||||||
}// end foreach roid
|
}// end foreach roid
|
||||||
|
showStatBar.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string BuildROList(string[] args)
|
private static string BuildROList(string[] args)
|
||||||
|
@ -1638,14 +1638,15 @@ namespace RODBInterface
|
|||||||
public VlnXmlElement RODB_ReadRO(string tbl, string recid)
|
public VlnXmlElement RODB_ReadRO(string tbl, string recid)
|
||||||
{
|
{
|
||||||
VlnXmlElement retele = null;
|
VlnXmlElement retele = null;
|
||||||
string readstr = "SELECT ParentID, AccPageID, Info FROM " + tbl + " WHERE "+ ((recid==null)? "ParentID = '00000000'" : ("RecID = '" + recid + "'"));
|
string readstr = "SELECT ParentID, AccPageID, Info FROM " + tbl + " WHERE "+ ((recid==null)? "RecType=3 and ParentID = '00000000'" : ("RecID = '" + recid + "'"));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DBE.Command(readstr);
|
DBE.Command(readstr);
|
||||||
DBE.Reader();
|
DBE.Reader();
|
||||||
|
|
||||||
if (recid == null)
|
// With the additional check for a recid=null, in the WHERE statement (above), we now longer need to check and skip for a null recid - jsj 4-17-2015
|
||||||
DBE.Read(); // skip the first parentID record of 00000000
|
//if (recid == null)
|
||||||
|
// DBE.Read(); // skip the first parentID record of 00000000
|
||||||
|
|
||||||
if (DBE.Read())
|
if (DBE.Read())
|
||||||
{
|
{
|
||||||
|
@ -1146,7 +1146,7 @@ namespace RODBInterface
|
|||||||
if (chldnode is VlnXmlElement)
|
if (chldnode is VlnXmlElement)
|
||||||
{
|
{
|
||||||
VlnXmlElement elem = (VlnXmlElement) chldnode;
|
VlnXmlElement elem = (VlnXmlElement) chldnode;
|
||||||
// showStat.StatusMessage = elem.InnerText;
|
showStat.StatusMessage = elem.InnerText;
|
||||||
|
|
||||||
// if it's a group, recurse through it.
|
// if it's a group, recurse through it.
|
||||||
if (chldnode.Name == "vlnGroup")
|
if (chldnode.Name == "vlnGroup")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user