|
This is not the correct forum for this question; try the VB.NET forum, and please fix the formatting of your message.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I am working on setting up a C# 2010 application that will search directory file paths to see when there has been a files added
to the directory since the last time the directory was searched. I basically want to look for the following:
1. files that end with *.xls or *.xlsx.
2. I will look for files in the 'highest' level directory path and serach for new files that have been added since the last time the search was made.
Thus I am hoping you can tell me how to accomplish this goal and/or point me to referneces that will let me how to accomplish this goal.
|
|
|
|
|
rachel_m wrote: Thus I am hoping you can tell me how to accomplish this goal
..divide it into smaller pieces that can be conquered. Aint' that hard.
rachel_m wrote: that will search directory file paths to see when there has been a files added
to the directory since the last time the directory was searched.
I foresee a Sqlite-database (or similar) that holds all those names and the date/time they were encountered. Ideally, it'd also provide a hash-value of it's contents.
rachel_m wrote: I will look for files in the 'highest' level directory path and serach for new files that have been added since the last time the search was made.
Did you have a database-structure in mind for that?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Directory.GetFiles() [^] will help you find the list of names in the directory. From there you can check details such as date created etc.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
How do you tell when a new file has been added to a selected directory path?
|
|
|
|
|
rachel_m wrote: How do you tell when a new file has been added You can either keep a list of existing files and compare with that, or check the creation date to see whether it is newer than the last time you searched.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Write a C# program to add the values of two integer variables, then
display the result with an appropriate message.
|
|
|
|
|
int a = 1;
int b = 2;
Console.Write("{0} + {1} might be equal to {2}", a, b, a + b);
I know homework is boring, but you won't learn much if I just give you the answer.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
i know thank soooooo much.
|
|
|
|
|
becky suinner wrote: i know thank soooooo much.
You're cheating when you should be workin'. You'd better do your homework next time and learn the syntax of Console.WriteLine , because those kind of questions are often ignored here. There ain't no free lunches out there.
Google for 'MSDN Console WriteLine', and bookmark the thing called documentation; it might be your bread and butter one day.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
i also need samples of winsforms or videos cos i tired deminoid.me dont think its functioning anymore.plssssssss
|
|
|
|
|
becky suinner wrote: i also need samples of winsforms or videos cos i tired deminoid.me dont think its functioning anymore.plssssssss
Drop the textspeak, and step into the land of adults
The documentation also contains video's[^], from the "How do I" department.
What is a deminoid[^]?
becky suinner wrote: plssssssss
If you want to be taken seriously, then don't repeat a character more than twice.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Start with these tutorials[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
That is one of the most trivial applications you could write. The fact you could not manage it suggests that you need to buy this[^] book.
If we tell you how to solve your homework, it isn't helping you to learn how to code. If you want to do this professionally, you have to learn how to do this for yourself.
|
|
|
|
|
private void button4_Click(object sender, EventArgs e)
{
mycon.con.Close();
mycon.adp = new SqlDataAdapter("delete from Inquiry_management where Inquiry_ID='" +listBox1.SelectedIndex + "'", mycon.con);
mycon.adp.Fill(ds, "Inquiry_management");
mycon.con.Open();
mycon.con.Close();
listBox1.Update();
MessageBox.Show("Row Deleted");
}
|
|
|
|
|
There is no need to data Adapter , see this :
System.Data.SqlClient.SqlConnection sqlConnection1 =
new System.Data.SqlClient.SqlConnection("YOUR CONNECTION STRING ");
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
cmd.CommandType = System.Data.CommandType.Text;
cmd.CommandText = "delete from Inquiry_management where Inquiry_ID='" +listBox1.SelectedIndex + "'";
cmd.Connection = sqlConnection1;
sqlConnection1.Open();
cmd.ExecuteNonQuery();
sqlConnection1.Close();
|
|
|
|
|
it doesn't work because i am using the class method;
this is my class coding.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
///
/// Summary description for mycon
///
namespace WindowsFormsApplication1
{
class mycon
{
public static int x = 0;
public static SqlConnection con=new SqlConnection("Data Source=DRONAVAT-PC\\SQLEXPRESS;Initial Catalog=InventoryControl;Integrated Security=True");
public static SqlCommand cmd;
public static SqlDataReader dr;
public static SqlCommandBuilder cd;
public static SqlDataAdapter adp;
public static void enable()
{
}
public static void disable()
{
}
}
}
|
|
|
|
|
hi , i have a little problem here , i have a datagridview that has a plenty of rows and all of that rows are filling with persian words like ("مثلا یه چیزی") , when i'm trying to print this datagridview using printPreviewDialog + print document , it show me the words in wrong spelling . that mean if im seen this word ("محمد") in datagridview it'll print it like this one ("دمحم").
it print it inverse . i have used itextsharp and it also dosnt support persian language .
so any idea ?
|
|
|
|
|
mohammadkaab wrote: it print it inverse
Inverse? You mean from right to left? Most of us can't read Arabic, might be handy to have an English example.
Could you try the setting the RightToLeft[^] property and see if it helps?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
It is printing in reverse the OP's example, "Muhammed" is doing the equivalent of:
"mhmd" is displaying as "dmhd"
I've left the vowels out in the above, as these are written as diacritic marks over/under the main characters for [short] vowels and are customarily left out for most texts. The irony is, I can't speak any other European languages except some schoolboy French and German. Oh and some words in Norwegian, Danish and Dutch are the same as the dialect of English that I speak.
|
|
|
|
|
Keith Barrow wrote: "mhmd" is displaying as "dmhd"
..and where did that extra 'd' come from? Too busy making a point to be correct, are we?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Have you set the RightToLeft property to true? IIRC you will get exactly the problems you describe (the letters being displayed in the reverse order) if you don't. If you can, set the property in the designer, not code.
I'm not sure about the print dialog, the RTL support in winforms is pretty poor.
|
|
|
|
|
couple hours ago , i had download the Spire.DataExport components , it work fine ,but i have a littile problem init , when i want to show my datatable Rows in Pdf it Show It Like this ???? like qustion mark , why ?
the language im using is persian and it's very close to Arabic language , the words is sth like this ("محمد کعب") and it show it like this ("???? ???").
even i have set the property of encoding to UTF8 but nothing happend , just gave me a strange words like this (Ù…ØÙ…).
|
|
|
|
|
You might be having a problem with two different encoding standards. Windows uses a standard for Arabic called Windows-1256. Farsi might be in the same standard. When it is displayed as UTF8 it displays as you describe, with accented characters. You'll need to either encode as UTF8 from Windows 1256 or just set the encoding to windows 1256.
You can see what I mean a bit better here http://forums.digitalpoint.com/showthread.php?t=537748[^]
|
|
|
|
|
I try to find a solution from many places, but not yet solved...and hence I have a
different issue for update dbf file [free table -vfp] from C# OleDbDataAdapter.
string MyConStr = "Provider=VFPOLEDB.1; Data Source='C:\\Temp'; Persist Security Info=False";
VFPDAp = new OleDbDataAdapter();
VFPDAp.InsertCommand = new OleDbCommand();
VFPDAp.UpdateCommand = new OleDbCommand();
VFPDAp.InsertCommand.CommandText = "insert into my_table1 (my_time,reminder) values(?, ?, ?)";
VFPDAp.UpdateCommand.CommandText = "update my_table1 set my_time=?, reminder=? where sl_no=? ";
VFPDAp.InsertCommand.Connection = OleCon1;
VFPDAp.UpdateCommand.Connection = OleCon1;
OleDbParameter Par1 = new OleDbParameter("my_time", -1);
Par1.DbType = DbType.String;
Par1.SourceColumn = "my_time";
Par1.ParameterName = "my_time";
OleDbParameter Par2 = new OleDbParameter("reminder", -1);
Par2.DbType = DbType.String;
Par2.SourceColumn = "reminder"; Par2.ParameterName = "reminder";
OleDbParameter Par3 = new OleDbParameter("my_time", -1);
Par3.DbType = DbType.String;
Par3.SourceColumn = "my_time";
Par3.ParameterName = "my_time";
OleDbParameter Par4 = new OleDbParameter("reminder", -1);
Par4.DbType = DbType.String;
Par4.SourceColumn = "reminder";
Par4.ParameterName = "reminder";
VFPDAp.InsertCommand.Parameters.Add(Par1);
VFPDAp.InsertCommand.Parameters.Add(Par2);
VFPDAp.UpdateCommand.Parameters.Add(Par3);
VFPDAp.UpdateCommand.Parameters.Add(Par4);
OleCon1.ConnectionString = MyConStr;
OleCon1.Open();
VFPDAp.Update(VfpTbl);
OleCon1.Close();
Thanks For The Helps
|
|
|
|