Exemplo n.º 1
0
 private void OpenPath2_Click(object sender, EventArgs e)
 {
     openFileDialog1.Filter = "Execl file 2013 |*.xlsx";
     openFileDialog1.Title  = "Import of the file to be exported";
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         if (openFileDialog1.FileName == "")
         {
             MessageBox.Show("Please select path file....");
         }
         else
         {
             TxtSelectExcelFile2.Text = openFileDialog1.FileName.ToString();
         }
     }
     Run_Reports.Select();
 }
Exemplo n.º 2
0
 private void OutputPath_Click(object sender, EventArgs e)
 {
     saveFileDialog1.Filter = "Execl file |*.xls";
     saveFileDialog1.Title  = "Save path of the file to be exported";
     if (saveFileDialog1.ShowDialog() == DialogResult.OK)
     {
         if (saveFileDialog1.FileName == "")
         {
             MessageBox.Show("Please select output path file....");
         }
         else
         {
             txtOutputPath.Text = saveFileDialog1.FileName.ToString();
         }
     }
     Run_Reports.Select();
 }
Exemplo n.º 3
0
 private void OpenPath1_Click(object sender, EventArgs e)
 {
     openFileDialog1.Filter = "Execl file 2013 |*.xlsx";
     openFileDialog1.Title  = "Import of the file to be exported";
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         if (openFileDialog1.FileName == "")
         {
             MessageBox.Show("Please select path file....");
         }
         else
         {
             TxtSelectExcelFile1.Text = openFileDialog1.FileName.ToString();
             string   Batch    = System.IO.Path.GetFileNameWithoutExtension(openFileDialog1.FileName);
             string[] getBatch = Batch.Split(' ');
             txtbatchNum.Text = getBatch[1];
             if (File.ReadAllText("../../PathFile.txt") != TxtSelectExcelFile1.Text)
             {
                 File.WriteAllText("../../PathFile.txt", TxtSelectExcelFile1.Text);
             }
         }
     }
     Run_Reports.Select();
 }