private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); String[] curSelectCommand = new String[1]; String[] curTableName = { "TrickList" }; curSelectCommand[0] = "Select * from TrickList "; if (myFilterCmd == null) { curSelectCommand[0] = curSelectCommand[0]; } else { if (myFilterCmd.Length > 0) { curSelectCommand[0] = curSelectCommand[0] + " Where " + myFilterCmd; } else { curSelectCommand[0] = curSelectCommand[0]; } } myExportData.exportData(curTableName, curSelectCommand); }
private void navExportAll_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); string curSelectCommand = "Select * from CodeValueList " + "Order by ListName, SortSeq, CodeValue"; myExportData.exportData("CodeValueList", curSelectCommand); }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); String[] curSelectCommand = new String[1]; String[] curTableName = { "NopsData" }; curSelectCommand[0] = "Select * from NopsData "; myExportData.exportData(curTableName, curSelectCommand); }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); string curSelectCommand = "Select * from CodeValueList "; if (myFilterCommand != null && myFilterCommand.Length > 0) { curSelectCommand += "Where ListName = '" + myFilterCommand + "' "; } curSelectCommand += "Order by ListName, SortSeq, CodeValue"; myExportData.exportData("CodeValueList", curSelectCommand); }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); String mySelectCommand = "Select * from SkierRanking "; String filterCommand = ""; if (filterCommand != null) { if (filterCommand.Length > 1) { mySelectCommand = mySelectCommand + "Where " + filterCommand; } } myExportData.exportData("SkierRanking", mySelectCommand); }
private bool execDropTable(String inSqlStmt) { bool curReturnValue = true; int curDelimIdx, curDelimIdx2, curValueLen; ExportData curExportData = new ExportData(); String[] curTableName = new String[1]; String[] curSelectCommand = new String[1]; try { curDelimIdx = inSqlStmt.ToUpper().IndexOf("TABLE "); if (curDelimIdx > 0) { curDelimIdx2 = inSqlStmt.IndexOf(" ", curDelimIdx + 6); if (curDelimIdx2 < 0) { curValueLen = inSqlStmt.Length - curDelimIdx - 6; } else { curValueLen = curDelimIdx2 - curDelimIdx - 6; } curTableName[0] = inSqlStmt.Substring(curDelimIdx + 6, curValueLen); curSelectCommand[0] = "Select * from " + curTableName[0]; String curFileRef = Application.StartupPath + "\\" + curTableName[0] + ".tmp"; if (curTableName[0].Trim().EndsWith("Backup")) { execSchemaCmd(inSqlStmt); } else { if (curExportData.exportData(curTableName, curSelectCommand, curFileRef)) { execSchemaCmd(inSqlStmt); } } } } catch (Exception ex) { /* * MessageBox.Show( "Error: Executing drop table command " + inSqlStmt + "\n\nException: " + ex.Message + ); */ curReturnValue = false; } return(curReturnValue); }
private void navSaveAs_Click( object sender, EventArgs e ) { String curEvent = "Slalom"; if ( slalomButton.Checked ) { curEvent = "Slalom"; } else if ( trickButton.Checked ) { curEvent = "Trick"; } else if ( jumpButton.Checked ) { curEvent = "Jump"; } ExportData myExportData = new ExportData(); myExportData.exportData(EventRegDataGridView, curEvent + "RunOrderList.txt"); }
private void navExport_Click( object sender, EventArgs e ) { ExportData myExportData = new ExportData(); myExportData.exportData( scoreSummaryDataGridView ); }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); myExportData.exportData(mySummaryDataTable); }
private void navExport_Click( object sender, EventArgs e ) { ExportData myExportData = new ExportData(); String[] curSelectCommand = new String[1]; String[] curTableName = { "TrickList" }; curSelectCommand[0] = "Select * from TrickList "; if ( myFilterCmd == null ) { curSelectCommand[0] = curSelectCommand[0]; } else { if ( myFilterCmd.Length > 0 ) { curSelectCommand[0] = curSelectCommand[0] + " Where " + myFilterCmd; } else { curSelectCommand[0] = curSelectCommand[0]; } } myExportData.exportData( curTableName, curSelectCommand ); }
private void ExportLoadedButton_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); myExportData.exportData( loadedVideoDataGridView ); }
private void navExport_Click(object sender, EventArgs e) { // Display the form as a modal dialog box. exportDialogForm = new TourExportDialogForm(); exportDialogForm.ShowDialog(this); // Determine if the OK button was clicked on the dialog box. if (exportDialogForm.DialogResult == DialogResult.OK) { String exportCommand = exportDialogForm.ExportCommand; if (exportCommand.ToLower().Equals("list")) { winStatusMsg.Text = "Export list of tournaments"; ExportData myExportData = new ExportData(); myExportData.exportData("Tournament", "Select * from Tournament"); } else if (exportCommand.ToLower().Equals("data")) { winStatusMsg.Text = "Export all data for tournament " + editName.Text; ExportData myExportData = new ExportData(); myExportData.exportTourData(editSanctionId.Text); } else if (exportCommand.ToLower().Equals("perf")) { winStatusMsg.Text = "Export performance data for tournament " + TourName; ExportPerfData myExportData = new ExportPerfData(); myExportData.exportTourPerfData(editSanctionId.Text); } } }
private void navSaveAs_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); loadPrintTeamSkierList(); PrintMemberId.Visible = true; myExportData.exportData(PrintTeamDataGridView); PrintMemberId.Visible = false; }
private void ExportButton_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); myExportData.exportData(dataGridView, "SqlTableExport.txt"); }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); String[] curSelectCommand = new String[3]; String[] curTableName = { "TourReg", "EventReg", "EventRunOrder" }; curSelectCommand[0] = "SELECT * FROM TourReg " + "Where SanctionId = '" + mySanctionNum + "' " + "And EXISTS (SELECT 1 FROM EventReg " + " WHERE TourReg.SanctionId = EventReg.SanctionId AND TourReg.MemberId = EventReg.MemberId " + " AND TourReg.AgeGroup = EventReg.AgeGroup AND EventReg.Event = '" + myEvent + "') " + "And EXISTS (SELECT 1 FROM EventRunOrder " + " WHERE TourReg.SanctionId = EventRunOrder.SanctionId AND TourReg.MemberId = EventRunOrder.MemberId " + " AND TourReg.AgeGroup = EventRunOrder.AgeGroup AND EventRunOrder.Event = '" + myEvent + "' " + " AND EventRunOrder.Round = " + roundActiveSelect.RoundValue + ") " ; curSelectCommand[1] = "Select * from EventReg " + "Where SanctionId = '" + mySanctionNum + "' " + "And Event = '" + myEvent + "' " + "And EXISTS (SELECT 1 FROM EventRunOrder " + " WHERE EventReg.SanctionId = EventRunOrder.SanctionId AND EventReg.MemberId = EventRunOrder.MemberId " + " AND EventReg.AgeGroup = EventRunOrder.AgeGroup AND EventRunOrder.Event = '" + myEvent + "' " + " AND EventRunOrder.Round = " + roundActiveSelect.RoundValue + ") " ; curSelectCommand[2] = "Select * from EventRunOrder " + "Where SanctionId = '" + mySanctionNum + "' " + " And Event = '" + myEvent + "' " + " And Round = " + roundActiveSelect.RoundValue ; myExportData.exportData( curTableName, curSelectCommand ); }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); String mySelectCommand = "Select * from SkierRanking "; String filterCommand = ""; if (filterCommand != null) { if ( filterCommand.Length > 1 ) { mySelectCommand = mySelectCommand + "Where " + filterCommand; } } myExportData.exportData( "SkierRanking", mySelectCommand ); }
private void ExportButton_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); myExportData.exportData( dataGridView, "SqlTableExport.txt" ); }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); String[] curSelectCommand = new String[3]; String[] curTableName = { "TeamList", "TeamOrder", "EventReg" }; //---------------------------------------- //Export data related to teams //---------------------------------------- curSelectCommand[0] = "SELECT * FROM TeamList Where SanctionId = '" + mySanctionNum + "' "; curSelectCommand[1] = "SELECT * FROM TeamOrder Where SanctionId = '" + mySanctionNum + "' "; curSelectCommand[2] = "SELECT SanctionId, MemberId, AgeGroup, TeamCode, Event, LastUpdateDate FROM EventReg Where SanctionId = '" + mySanctionNum + "' AND TeamCode is not null "; myExportData.exportData( curTableName, curSelectCommand ); }
private void ExportButton_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); String[] curSelectCommand = new String[1]; String[] curTableName = { "TrickVideo" }; curSelectCommand[0] = "SELECT * FROM TrickVideo " + "Where SanctionId = '" + mySanctionNum + "' AND (LEN(Pass1VideoUrl) > 1 or LEN(Pass2VideoUrl) > 1)"; myExportData.exportData( curTableName, curSelectCommand ); }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); String[] curSelectCommand = new String[1]; String[] curTableName = { "NopsData" }; curSelectCommand[0] = "Select * from NopsData "; myExportData.exportData( curTableName, curSelectCommand ); }
private void navExport_Click( object sender, EventArgs e ) { if ( isDataModified ) { navSaveItem_Click( null, null ); } ExportData myExportData = new ExportData(); String mySelectCommand = "Select * from JumpMeterSetup "; mySelectCommand = mySelectCommand + " Where SanctionId = '" + mySanctionNum + "'"; myExportData.exportData( "JumpMeterSetup", mySelectCommand ); }
private void navExportAll_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); string curSelectCommand = "Select * from CodeValueList " + "Order by ListName, SortSeq, CodeValue"; myExportData.exportData( "CodeValueList", curSelectCommand ); }
private bool execDropTable( String inSqlStmt ) { bool curReturnValue = true; int curDelimIdx, curDelimIdx2, curValueLen; ExportData curExportData = new ExportData(); String[] curTableName = new String[1]; String[] curSelectCommand = new String[1]; try { curDelimIdx = inSqlStmt.ToUpper().IndexOf( "TABLE " ); if ( curDelimIdx > 0 ) { curDelimIdx2 = inSqlStmt.IndexOf( " ", curDelimIdx + 6 ); if ( curDelimIdx2 < 0 ) { curValueLen = inSqlStmt.Length - curDelimIdx - 6; } else { curValueLen = curDelimIdx2 - curDelimIdx - 6; } curTableName[0] = inSqlStmt.Substring( curDelimIdx + 6, curValueLen ); curSelectCommand[0] = "Select * from " + curTableName[0]; String curFileRef = Application.StartupPath + "\\" + curTableName[0] + ".tmp"; if ( curTableName[0].Trim().EndsWith( "Backup" ) ) { execSchemaCmd( inSqlStmt ); } else { if ( curExportData.exportData( curTableName, curSelectCommand, curFileRef ) ) { execSchemaCmd( inSqlStmt ); } } } } catch ( Exception ex ) { /* MessageBox.Show( "Error: Executing drop table command " + inSqlStmt + "\n\nException: " + ex.Message ); */ curReturnValue = false; } return curReturnValue; }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); string curSelectCommand = "Select * from CodeValueList "; if (myFilterCommand != null && myFilterCommand.Length > 0) { curSelectCommand += "Where ListName = '" + myFilterCommand + "' "; } curSelectCommand += "Order by ListName, SortSeq, CodeValue"; myExportData.exportData( "CodeValueList", curSelectCommand ); }
private void navExport_Click(object sender, EventArgs e) { String [] curSelectCommand = new String[7]; String[] curTableName = { "Tournament", "TourReg", "EventReg", "MemberList", "DivOrder", "OfficialWork", "OfficialWorkAsgmt" }; ExportData myExportData = new ExportData(); curSelectCommand[0] = "Select * from Tournament Where SanctionId = '" + mySanctionNum + "'"; curSelectCommand[1] = "Select * from TourReg "; if ( myFilterCmd == null ) { curSelectCommand[1] = curSelectCommand[1] + " Where SanctionId = '" + mySanctionNum + "'"; } else { if ( myFilterCmd.Length > 0 ) { curSelectCommand[1] = curSelectCommand[1] + " Where SanctionId = '" + mySanctionNum + "'" + " And " + myFilterCmd; } else { curSelectCommand[1] = curSelectCommand[1] + " Where SanctionId = '" + mySanctionNum + "'"; } } curSelectCommand[2] = "Select * from EventReg "; if ( myFilterCmd == null ) { curSelectCommand[2] = curSelectCommand[2] + " Where SanctionId = '" + mySanctionNum + "'"; } else { if ( myFilterCmd.Length > 0 ) { curSelectCommand[2] = curSelectCommand[2] + " Where SanctionId = '" + mySanctionNum + "'" + " And " + myFilterCmd; } else { curSelectCommand[2] = curSelectCommand[2] + " Where SanctionId = '" + mySanctionNum + "'"; } } curSelectCommand[3] = "Select * from MemberList " + " Where EXISTS (Select 1 From TourReg "; if ( myFilterCmd == null ) { curSelectCommand[3] = curSelectCommand[3] + " Where TourReg.MemberId = MemberList.MemberId And SanctionId = '" + mySanctionNum + "') "; } else { if ( myFilterCmd.Length > 0 ) { curSelectCommand[3] = curSelectCommand[3] + "Where TourReg.MemberId = MemberList.MemberId And SanctionId = '" + mySanctionNum + "' " + " And " + myFilterCmd + ") "; } else { curSelectCommand[3] = curSelectCommand[3] + "Where TourReg.MemberId = MemberList.MemberId And SanctionId = '" + mySanctionNum + "') "; } } curSelectCommand[4] = "Select * from DivOrder Where SanctionId = '" + mySanctionNum + "'"; curSelectCommand[5] = "Select * from OfficialWork W Where SanctionId = '" + mySanctionNum + "' "; curSelectCommand[6] = "Select * from OfficialWorkAsgmt Where SanctionId = '" + mySanctionNum + "' "; myExportData.exportData( curTableName, curSelectCommand ); }
private void navSaveAs_Click( object sender, EventArgs e ) { ExportData myExportData = new ExportData(); //tourRegDataGridView myExportData.exportData( tourRegDataGridView ); }
private void navExport_Click(object sender, EventArgs e) { ExportData myExportData = new ExportData(); String[] curSelectCommand = new String[8]; String[] curTableName = { "TourReg", "EventReg", "EventRunOrder", "SlalomScore", "SlalomRecap", "TourReg", "OfficialWork", "OfficialWorkAsgmt" }; String curFilterCmd = myFilterCmd; if (curFilterCmd.Contains( "Div =" )) { curFilterCmd = curFilterCmd.Replace( "Div =", "AgeGroup =" ); } curSelectCommand[0] = "SELECT * FROM TourReg " + "Where SanctionId = '" + mySanctionNum + "' " + "And EXISTS (SELECT 1 FROM EventReg " + " WHERE TourReg.SanctionId = EventReg.SanctionId AND TourReg.MemberId = EventReg.MemberId " + " AND TourReg.AgeGroup = EventReg.AgeGroup AND EventReg.Event = 'Slalom' "; if ( isObjectEmpty( curFilterCmd ) ) { curSelectCommand[0] = curSelectCommand[0] + ") "; } else { if ( curFilterCmd.Length > 0 ) { curSelectCommand[0] = curSelectCommand[0] + "And " + curFilterCmd + ") "; } else { curSelectCommand[0] = curSelectCommand[0] + ") "; } } curSelectCommand[1] = "Select * from EventReg "; if ( isObjectEmpty( curFilterCmd ) ) { curSelectCommand[1] = curSelectCommand[1] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = 'Slalom'"; } else { if ( curFilterCmd.Length > 0 ) { curSelectCommand[1] = curSelectCommand[1] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = 'Slalom'" + " And " + curFilterCmd; } else { curSelectCommand[1] = curSelectCommand[1] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = 'Slalom'"; } } curSelectCommand[2] = "Select * from EventRunOrder "; if (isObjectEmpty( curFilterCmd )) { curSelectCommand[2] = curSelectCommand[2] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = 'Slalom' And Round = " + roundActiveSelect.RoundValue + " "; } else { if (curFilterCmd.Length > 0) { curSelectCommand[2] = curSelectCommand[2] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = 'Slalom' And Round = " + roundActiveSelect.RoundValue + " " + " And " + curFilterCmd; } else { curSelectCommand[2] = curSelectCommand[2] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = 'Slalom' And Round = " + roundActiveSelect.RoundValue + " "; } } curSelectCommand[3] = "SELECT * FROM SlalomScore " + "Where SanctionId = '" + mySanctionNum + "' And Round = " + roundActiveSelect.RoundValue + " " + "And EXISTS (SELECT 1 FROM EventReg " + " WHERE SlalomScore.SanctionId = EventReg.SanctionId AND SlalomScore.MemberId = EventReg.MemberId " + " AND SlalomScore.AgeGroup = EventReg.AgeGroup AND EventReg.Event = 'Slalom' "; if ( isObjectEmpty( curFilterCmd ) ) { curSelectCommand[3] = curSelectCommand[3] + ") "; } else { if ( curFilterCmd.Length > 0 ) { curSelectCommand[3] = curSelectCommand[3] + "And " + curFilterCmd + ") "; } else { curSelectCommand[3] = curSelectCommand[3] + ") "; } } curSelectCommand[4] = "SELECT * FROM SlalomRecap " + "Where SanctionId = '" + mySanctionNum + "' And Round = " + roundActiveSelect.RoundValue + " " + "And EXISTS (SELECT 1 FROM EventReg " + " WHERE SlalomRecap.SanctionId = EventReg.SanctionId AND SlalomRecap.MemberId = EventReg.MemberId " + " AND SlalomRecap.AgeGroup = EventReg.AgeGroup AND EventReg.Event = 'Slalom' "; if ( isObjectEmpty( curFilterCmd ) ) { curSelectCommand[4] = curSelectCommand[4] + ") "; } else { if ( curFilterCmd.Length > 0 ) { curSelectCommand[4] = curSelectCommand[4] + "And " + curFilterCmd + ") "; } else { curSelectCommand[4] = curSelectCommand[4] + ") "; } } //---------------------------------------- //Export data related to officials //---------------------------------------- String tmpFilterCmd = ""; String curEventGroup = EventGroupList.SelectedItem.ToString(); if ( curEventGroup.ToLower().Equals( "all" ) ) { } else { tmpFilterCmd = "And EventGroup = '" + curEventGroup + "' "; } curSelectCommand[5] = "SELECT * FROM TourReg T " + "Where SanctionId = '" + mySanctionNum + "' " + "And EXISTS (SELECT 1 FROM OfficialWorkAsgmt O " + " WHERE T.SanctionId = O.SanctionId AND T.MemberId = O.MemberId And O.Event = 'Slalom' And Round = " + roundActiveSelect.RoundValue + " "; if ( isObjectEmpty( tmpFilterCmd ) ) { curSelectCommand[5] = curSelectCommand[5] + ") "; } else { if ( tmpFilterCmd.Length > 0 ) { curSelectCommand[5] = curSelectCommand[5] + tmpFilterCmd + ") "; } else { curSelectCommand[5] = curSelectCommand[5] + ") "; } } //---------------------------------------- //Export data related to officials //---------------------------------------- curSelectCommand[6] = "Select * from OfficialWork W Where SanctionId = '" + mySanctionNum + "' " + "And W.LastUpdateDate is not null " + "And EXISTS (SELECT 1 FROM EventReg R" + " WHERE W.SanctionId = R.SanctionId AND W.MemberId = R.MemberId AND R.Event = 'Slalom' "; if (isObjectEmpty( tmpFilterCmd )) { curSelectCommand[6] = curSelectCommand[6] + ") "; } else { if (tmpFilterCmd.Length > 0) { curSelectCommand[6] = curSelectCommand[6] + tmpFilterCmd + ") "; } else { curSelectCommand[6] = curSelectCommand[6] + ") "; } } curSelectCommand[6] = curSelectCommand[6] + "Union " + "Select * from OfficialWork W Where SanctionId = '" + mySanctionNum + "' " + "And W.LastUpdateDate is not null " + "And EXISTS (SELECT 1 FROM OfficialWorkAsgmt O " + " WHERE W.SanctionId = O.SanctionId AND W.MemberId = O.MemberId And O.Event = 'Slalom' And O.Round = " + roundActiveSelect.RoundValue + " "; if (isObjectEmpty( tmpFilterCmd )) { curSelectCommand[6] = curSelectCommand[6] + ") "; } else { if (tmpFilterCmd.Length > 0) { curSelectCommand[6] = curSelectCommand[6] + tmpFilterCmd + ") "; } else { curSelectCommand[6] = curSelectCommand[6] + ") "; } } curSelectCommand[7] = "Select * from OfficialWorkAsgmt " + " Where SanctionId = '" + mySanctionNum + "' And Event = 'Slalom' And Round = " + roundActiveSelect.RoundValue + " "; if ( isObjectEmpty( tmpFilterCmd ) ) { } else { if ( tmpFilterCmd.Length > 0 ) { curSelectCommand[7] = curSelectCommand[7] + tmpFilterCmd; } else { } } myExportData.exportData( curTableName, curSelectCommand ); }
private void navExport_Click(object sender, EventArgs e) { String curEvent = "Slalom"; if ( slalomButton.Checked ) { curEvent = "Slalom"; } else if ( trickButton.Checked ) { curEvent = "Trick"; } else if ( jumpButton.Checked ) { curEvent = "Jump"; } ExportData myExportData = new ExportData(); String[] curSelectCommand = new String[5]; String[] curTableName = { "TourReg", "EventReg", "EventRunOrder", "DivOrder", "OfficialWork" }; curSelectCommand[0] = "SELECT * FROM TourReg " + "Where SanctionId = '" + mySanctionNum + "' " + "And EXISTS (SELECT 1 FROM EventReg " + " WHERE TourReg.SanctionId = EventReg.SanctionId AND TourReg.MemberId = EventReg.MemberId " + " AND TourReg.AgeGroup = EventReg.AgeGroup AND EventReg.Event = '" + curEvent + "' "; if ( isObjectEmpty( myFilterCmd ) ) { curSelectCommand[0] = curSelectCommand[0] + ") "; } else { if ( myFilterCmd.Length > 0 ) { curSelectCommand[0] = curSelectCommand[0] + "And " + myFilterCmd + ") "; } else { curSelectCommand[0] = curSelectCommand[0] + ") "; } } curSelectCommand[1] = "Select * from EventReg "; if ( isObjectEmpty( myFilterCmd ) ) { curSelectCommand[1] = curSelectCommand[1] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = '" + curEvent + "'"; } else { if ( myFilterCmd.Length > 0 ) { curSelectCommand[1] = curSelectCommand[1] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = '" + curEvent + "'" + " And " + myFilterCmd; } else { curSelectCommand[1] = curSelectCommand[1] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = '" + curEvent + "'"; } } curSelectCommand[2] = "Select * from EventRunOrder "; if (isObjectEmpty( myFilterCmd )) { curSelectCommand[2] = curSelectCommand[2] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = '" + curEvent + "'"; } else { if (myFilterCmd.Length > 0) { curSelectCommand[2] = curSelectCommand[2] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = '" + curEvent + "'" + " And " + myFilterCmd; } else { curSelectCommand[2] = curSelectCommand[2] + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = '" + curEvent + "'"; } } curSelectCommand[3] = "Select * from DivOrder " + " Where SanctionId = '" + mySanctionNum + "'" + " And Event = '" + curEvent + "'"; curSelectCommand[4] = "Select * from OfficialWork W Where SanctionId = '" + mySanctionNum + "' " + "And W.LastUpdateDate is not null "; myExportData.exportData( curTableName, curSelectCommand ); }