OpenFileDialog fdAttachement = new OpenFileDialog();
fdAttachement.Filter = "All Files (*.*)*.*Text files (*.txt)*.txtWord Files (*.doc)*.docExcel Files (*.xls)*.xlsPDF Files (*.pdf)*.pdfImage Files(*.jpg,*.gif)*.jpg;*.gif";
//fdAttachement.InitialDirectory = "";
fdAttachement.DefaultExt = "*.*";
if (fdAttachement.ShowDialog(this) == DialogResult.Cancel)
return;
FileInfo fileInfo = new FileInfo(fdAttachement.FileName);
string[] fullName;
string fileName;
fullName = fdAttachement.FileName.Split('\\');
fileName = fullName[fullName.Length - 1];
fileInfo.CopyTo(CT.GetConfigVal("TempTaskAttachmentPath") + fileName, true);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment