Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am developing a windows form application that will perform as a tool for data analyzation. I have two checkedlistbox's , two datetimepicker's, a data

I am developing a windows form application that will perform as a tool for data analyzation. I have two checkedlistbox's , two datetimepicker's, a data grid view, and a series chart. Once i have a checked box in my checkedlistbox it is identified by (checkedListBox1.GetItemCheckState() == CheckState.Checked) and a specific path is added to a list using if conditional statements. Im having trouble accessing the paths though I get an error.image text in transcribed

i will include the necessary syntax:

private void Submit_button_Click(object sender, EventArgs e)

{

Construct.distinctSerials.Clear();

Construct.fileDirectories.Clear();

Construct.files.Clear();

Construct.MainDataTable.Dispose();

Construct.MainDataTable.Columns.Clear();

Construct.MainDataTable.Rows.Clear();

Construct.totalInvalidTest = 0;

Construct.totalTest = 0;

GC.Collect();

int progressBarCount = 0;

progressBar1.Visible = true;

string earliestdate = dateTimePicker1.Value.ToString("yyyy-MM-dd");

string latestdate = dateTimePicker2.Value.ToString("yyyy-MM-dd");

List fileDirectories = new List();

if (checkedListBox1.GetItemCheckState(0) == CheckState.Checked)

{

if (checkedListBox2.GetItemCheckState(0) == CheckState.Checked)

{

fileDirectories.Add("\\\\Users\\tnooluade\\Desktop\ esult file path");

}

else if (checkedListBox2.GetItemCheckState(1) == CheckState.Checked)

{

fileDirectories.Add(\\\\Users\\tnooluade\\Desktop\ esult file path\ ew results);

}

else if (checkedListBox2.GetItemCheckState(2) == CheckState.Checked)

{

fileDirectories.Add(\\\\Users\\tnooluade\\Desktop\ esult file\\bad folder);

}..................................................................

.....................................................................

foreach (string selectedPath in fileDirectories)

{

string[] level1 = Directory.GetFiles(@selectedPath, "*.csv", SearchOption.AllDirectories);

foreach (string level2 in level1)

{................................................}

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

What is paper chromatography?

Answered: 1 week ago

Question

Explain the cost of capital.

Answered: 1 week ago

Question

Define capital structure.

Answered: 1 week ago

Question

4. What sales experience have you had?

Answered: 1 week ago