vendredi 27 février 2015

How can I pull a destination from a textbox? C#

I have a textbox that generates a code based on the selections made by the user. I would like each possible code to correlate with copying and moving a folder into another. The folder is chosen by another textbox that allows the user to manually select the path for the new files to be moved to. What I am looking to do is set up a string of if/else if statements for each of the possible codes from textbox1. Take a look at my code below and see wha tyou find. Everything seems to work except for my statements uder


Private void button1_click...



private void button1_Click(object sender, EventArgs e)
{
string destination = textBox1.Text;
if (textBox2.Text == "111")
String sourceFile = (@"C:\Program Files (x86)\OrganizerPro\TFSN Internal Advisor to SWAG PPW");

System.IO.File.Move(sourceFile, destination);
}

Aucun commentaire:

Enregistrer un commentaire