|
hi all,
i need a help... need to create a dynamic sub folder to store particular job_id's excel files within the sub folder with job_id's name, here the job_id is identity column.. say for eg., JON101, JON123, etc...
sqlcmdsql.Parameters.AddWithValue("@fullFileName", "C:\Bcp\" + Utilities.Jobid + ".xls")
the above code is for generating excel file within common folder, now i need to create sub_folder...
anyone came across this issue, pls help me to resolve
|
|
|
|
|
//this is code to create folder....
private string CreateFolder(string FolderName)
{
if ((!Directory.Exists(@"D:\ " + FolderName + "")))
{
DirectoryInfo oDirectoryInfo = default(DirectoryInfo);
oDirectoryInfo = Directory.CreateDirectory(@"D:\ " + FolderName + "");
}
}
|
|
|
|
|
//to move data from one folder to another
DirectoryInfo dir1= new DirectoryInfo("F:Folder1");
DirectoryInfo dir2 = new DirectoryInfo("F:Folder2");
FileInfo[] Folder1Files = dir1.GetFiles();
if(Folder1Files.Length > 0)
{
foreach(FileInfo aFile in Folder1Files)
{
if(File.Exists("F:Folder2" + aFile.Name))
{
File.Delete("F:Folder2" + aFile.Name);
}
aFile.MoveTo("F:Folder2" + aFile.Name);
}
}
|
|
|
|
|
//Create folder in server
fso = Server.CreateObject("Scripting.FileSystemObject");
fso.CreateFolder("d:\New Folder1");
//example 2
System.IO.Directory.CreateDirectory(Server.MapPath("path_name")+ "\\NewFolder1");
|
|
|
|
|
hi friends,
i am new to .net.please help with the code ,that can display the items from a tab control to the flowlayout control.
i have tab control which contains few buttons and when these buttons are double clicked ,flow layout must show that buttons irrespective of tab pages.if there is a solution to this, provide it with me as early as possible.
i am urgent friends........
|
|
|
|
|
In my crystal report I want to have two detail sections with a seperate header section for each.I mean I want the headers to appear right at the top of their corresponding detail sections . But in the section expert there is no way to change the sections order.How can I achieve the result ?
|
|
|
|
|
Is it possible to use callbacks (like in the old days with C++/MFC) to display listview items? Or how about an observable collection that tells a listview that its data has changed?
Anything like that?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
in vb.net to get the items in listview take this
dim name as string
dim ind as integer
for each items as listviewitem in listview1.items
' here you get the name of the item
name = items.text ' or items
'here your get the index
ind = items.index
next items
|
|
|
|
|
|
This is not a WPF application.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
|
One way to achieve this would be to have your collection implement INotifyCollectionChanged (if using ObservableCollection is out of bounds), and use a mediator class to monitor the changes. Obviously you'd want to use INotifyPropertyChanged for individual items in the collection.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Would using a DataGridView be a better option? I don't want anything fancy - I just need the listview to update items that have changed (possibly hundreds of items changing every 2 or three seconds or so).
BTW, this isn't a WPF application...
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
I don't know that DGV would be a better choice. The fact that the listview supports virtualisation is a big plus. BTW - I figured it wasn't WPF.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
Hi,
I want monitor com port already open. I am tring to use win api, with overlapped I/O setting, but don't work.
I suppose need to intercept windows event that contain data excanged from application to com port.
Qualcuno ha un idea su come fare??
Thanks in advance,
Cris
http://bugbusters.altervista.org[^]
|
|
|
|
|
I'm trying to create a Component that sits in the Forms designer component tray and contains additional subcomponents that can be selected and configured via the document outline view (or through a collection property of the main component).
I've looked at numerous code project articles and even peeking at some MS components that behave kind of like this (e.g. ListView), but I can't seem to get my sub-components to show up in the Document Outline.
The MSDN is non-helpful in this area, their "documentation" consists of is a 2 sentence blurb describing an esoteric example and then 10 pages of code that assumes an intimate understanding of the entire .NET component model.
Anyone know of a good source of documentation on this area, or better yet any tips on what I might try?
Thanks,
-Chris
[solved]
I figured out how to do it. In my main component, add a custom designer:
[Designer(typeof(MyDesigner), typeof(IDesigner))]
public class MyComponent : Component
Then in MyDesigner , inherit from System.ComponentModel.Design.ComponentDesigner and override a couple methods, shown below:
public override void Initialize(IComponent component)
{
base.Initialize(component);
_myComponent = (MyComponent) component;
}
public override System.Collections.ICollection AssociatedComponents
{
get
{
if (_myComponent == null)
{
return base.AssociatedComponents;
}
return _myComponent.Subcomponents;
}
}
Now my sub components are selectable via Document Outline, but suppressed in the component tray (so as to keep it tidy).
modified on Friday, December 4, 2009 11:57 AM
|
|
|
|
|
Dear All:
I have a major problem, my web application was supposed to be multinational, so i worked through resource files. But the problem am facing can't be solved by resource file, when i get date Date.Now.DaysOfWeek
the date is in english such as "Monday" how could i directly retrieve the date "Lundi" which is using the french culture.
|
|
|
|
|
Check out the remarks section of this[^] page.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Oh no, not the documentation again!
|
|
|
|
|
|
I have this piece of code that "selects" from an Excel data stream and also from an XML one:
foreach (var ex in dataExcel)
{
ExcelRecs++;
IEnumerable<xelement> part =
from item in Partlists.Descendants("Partx")
where (string)item.Element("Part_name") == ex.Name
select item;
.....
}
How do I make the comparison "case INSENSITIVE"? that is either one of item.Element("Part_name") or ex.Name can be upper case and the other lower case, the == comparise would still be true.
Thanks for your help!
|
|
|
|
|
you want to compare two strings in a special way?
what class could possibly help you?
and what would be a nice name for a relevant method in such class?
|
|
|
|
|
Luc Pattyn wrote: what class could possibly help you?
and what would be a nice name for a relevant method in such class?
I know! I know!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Luc Pattyn wrote: you want to compare two strings in a special way?
what class could possibly help you?
Oooh oooh! Is it CompareTwoStrings.InASpecialWay ?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|