|
1金钱
public void s(object item1)
{
string[] split = textBox1.Text.Split('|');
string str = (string)item1;
foreach (string item in split)
{
dt = DateTime.Now.ToString("yyyyMMdd");
string Strpath = @"\\192.168.39.206\" + item + "$" + @"\Dexter\DexterLite\DexterLite_" + item + "\\" + CmbWorkName;
if (Directory.Exists(Strpath))
{
savepath1 = @"\\192.168.39.206\" + item + "$" + @"\Dexter\DexterLite\DexterLite_" + item + "\\" + CmbWorkName + "\\All_Report";
txtSavePath.Text = savepath1 + "\\" + dt;
if (Directory.Exists(savepath1))
{
if (!Directory.Exists(savepath1 + "\\" + dt))
{
Directory.CreateDirectory(savepath1 + "\\" + dt);
}
path = @"\\192.168.39.206\" + item + "$" + @"\Dexter\DexterLite\DexterLite_" + item + "\\" + CmbWorkName + "\\" + str;
if (Directory.Exists(path))
{
string[] str222 = Directory.GetFiles(path, "*VendorReport.db3", SearchOption.AllDirectories);
if (str222.Length>0)
{
foreach (string str123 in str222)
{
string db3 = Path.GetFileName(str123);
File.Copy(str123, savepath1 + "\\" + dt + "\\" + db3, true);
}
}
else
{
list.Add(str);
}
}
else
{
list.Add(str);
}
}
else
{
list.Add(str);
}
break;
}
}
StreamWriter sw = new StreamWriter(txtSavePath.Text.Trim() + "\\" + "Err.txt", false, Encoding.Default);
sw.WriteLine(list);
sw.Flush();
sw.Dispose();
sw.Close();
}
以上是我线程池所调用的函数
txtSavePath = {Text = “((System.Windows.Forms.TextBox)(txtSavePath)).Text”引发了“Microsoft.VisualStudio.Debugger.Runtime.CrossThreadMessagingException”类型的异常}抛出以上异常
|
|