Ejemplo n.º 1
0
 public void ChooseFolder()
 {
     if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
     {
         GetDataC getDataC = new GetDataC();
         getDataC.Destination = folderBrowserDialog1.SelectedPath;
         textBox1.Text        = folderBrowserDialog1.SelectedPath;
     }
 }
Ejemplo n.º 2
0
 public void ViewClientForm()
 {
     try
     {
         GetDataC dataToGet = new GetDataC();
         foreach (DataRow r in dataToGet.ViewClient().Rows)
         {
             dataGridView1.Rows.Add(r["business_name"].ToString(), r["status"].ToString(), r["clients_name"].ToString(), r["barangay_name"].ToString(), r["municipal_name"].ToString(), r["region_name"].ToString(), r["province_name"].ToString());
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 3
0
        private void button1_Click_2(object sender, EventArgs e)
        {
            GetDataC gdataC = new GetDataC();

            if (textBox1.Text == null || textBox1.Text == "")
            {
                MessageBox.Show("Please choose a specific destination");
            }
            else
            {
                try
                {
                    gdataC.writeCSV(dataGridView1, textBox1.Text + "\\result.csv");
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }

                MessageBox.Show("Converted successfully to *.csv format in " + textBox1.Text);
            }
        }