|
Hi,
Thanks for you reply.
Problem is
In real both value represent same time instance
2008-11-02T02:00:00.0-07:00(this is not exist in DateTime) == 2008-11-02T01:00:00.0-08:00(This is exist)
But I need this value in DateTime object "2008-11-02T02:00:00.0-07:00"
If I use AddHour() member of DateTime
enddate contains "2008-11-02T02:00:00.0-08:00"
enddate = enddate.AddHour(-1) //"2008-11-02T01:00:00.0-08:00"
enddate = enddate.AddHour(-1) //"2008-11-02T01:00:00.0-07:00"
If you have any question, please let me know.
If you can give me some sample I will appreciate it.
Thanks,
-Samir.
|
|
|
|
|
Oh man, just one link :
TimeZone[^]
We have use this library in our projects and is awesome.
Hope this help.
Cheers.
|
|
|
|
|
But that timepoint does/will exist, and I expect to sleep through it. So I don't understand your problem.
|
|
|
|
|
Hello everyone, in a windows service i am using log4net and its SmtpAppender to send the exceptions to an email account.
Everything is fine, but the email is a little bit ugly. I want to know if exists some library which take a generic exception and return an string in html format. Something like the yellow pages showing in asp net websites.
|
|
|
|
|
Hello everyone,
There is a project here where the next step is to be able to communicate with a mail server. Right now I'm using Telnet to get the job done, but in the near future this will become huge and I need a way to automate this.
When I start, I type: "telnet mail.theserver.com 25". This starts up a connection with theserver on port 25 (the mail server). After that, I'm communicating directly with the server through port 25.
I need to be able to automatically send information through this port using C# so that I can have an interface, instead of typing everything by hand. I found a few leads that have to do with sockets, sending and listening for data, and I'm stuck.
Is there a way to do what I want with a minimum of trouble? I just need something that lets me open a connection to an IP address and a port, and start sending and receiving info.
Thanks for your time,
Michael Fritzius
|
|
|
|
|
Dear Friends
I want to know which rows in my dataset were changed and after that update a coulmn in rows that were changed. I can get Changed rows by GetChanges but this function put data in new dataset so I can't change that coulmn in real dataset.
Thanks
Agh
|
|
|
|
|
dataSet.Tables["yourTable"].Columns.Add(yourNewColumn);
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
hi
how can i pick some records in datagrid ?
in c# code
thanks
|
|
|
|
|
Hi Guys, I've been trying for quite sometime to accomplish this task but now I am at my wits end so I turn to you "the professionals" for assistance. My problem is as follows: I have a method which executes a stored procedure with two select queries which return two tables of data which is rans accross the several databses to view individual store performace. This data is then available to the application in a data set. The first table (table[0]) returns the transactions details (i.e. ProductID, ProductName, Cost, Sales date) while the second table(table [1]) returns a summary of each stores sales activity. What I am hoping to is display the "Details"(Table[0]) the below those records display the summary of the stores activity. However, this query is ran over several databse (one per store) thus when the dataset is returned information for all the stores are in there hence it looks something like this:
Table[0]
StoreID StoreName Product TotalSold TotalIncome
0015 Joe's Store SomeBeer 1000 $10,0000
0016 Mike's Store FoodItem 500 $2500
0017 Mary's Store Clothing 500 $2500
and so on...
Table[1]
StoreID ProductName Unitcost UnitSold Total
0015 SomeBeer1 $10.00 50 500.00
0015 SomeBeer2 $8.00 50 400.00
0015 SomeBeer3 $10.00 50 500.00
0015 SomeBeer4 $10.00 50 500.00
0016 SomeBeer1 $10.00 50 500.00
0016 SomeBeer2 $8.00 50 400.00
0016 SomeBeer3 $10.00 50 500.00
0016 SomeBeer4 $10.00 50 500.00
0017 SomeBeer1 $10.00 50 500.00
0017 SomeBeer2 $8.00 50 400.00
0017 SomeBeer3 $10.00 50 500.00
0017 SomeBeer4 $10.00 50 500.00
and so on....
What I need is:
Store 15
StoreID ProductName Unitcost UnitSold Total
0015 SomeBeer1 $10.00 50 500.00
0015 SomeBeer2 $8.00 50 400.00
0015 SomeBeer3 $10.00 50 500.00
0015 SomeBeer4 $10.00 50 500.00
StoreID StoreName Product TotalSold TotalIncome
0015 Joe's Store SomeBeer 1000 $10,0000
Store 16
StoreID ProductName Unitcost UnitSold Total
0016 SomeBeer1 $10.00 50 500.00
0016 SomeBeer2 $8.00 50 400.00
0016 SomeBeer3 $10.00 50 500.00
0016 SomeBeer4 $10.00 50 500.00
StoreID StoreName Product TotalSold TotalIncome
0016 Mike's Store FoodItem 500 $2500
Store 17
StoreID ProductName Unitcost UnitSold Total
0017 SomeBeer1 $10.00 50 500.00
0017 SomeBeer2 $8.00 50 400.00
0017 SomeBeer3 $10.00 50 500.00
0017 SomeBeer4 $10.00 50 500.00
StoreID StoreName Product TotalSold TotalIncome
0017 Mary's Store Clothing 500 $2500
Here is the code that I am using to try to accomplish this:
public Table GetInfoTable(DataSet MyDS)
{
Table DisplayTable = new Table();
try
{
foreach (DataTable CurrentTable in MyDS.Tables)
{
foreach (DataRow CurrentRow1 in CurrentTable.Rows)
{
TableRow DisplayRow1 = new TableRow();
DisplayTable.Rows.Add(DisplayRow1);
foreach (DataColumn CurrentColumn1 in CurrentTable.Columns)
{
TableCell DisplayCell1 = new TableCell();
DisplayRow1.Cells.Add(DisplayCell1);
DisplayCell1.Text += CurrentColumn1.Caption;
foreach (DataRow CurrentRow in CurrentTable.Rows)
{
TableRow DisplayRow = new TableRow();
DisplayTable.Rows.Add(DisplayRow);
string currentTableFIName = DisplayTable.Rows[0].ToString();
foreach (DataColumn CurrentColumn in CurrentTable.Columns)
{
TableCell DisplayCell = new TableCell();
DisplayRow.Cells.Add(DisplayCell);
if (CurrentRow[CurrentColumn] != null)
if (CurrentRow[CurrentColumn] != DBNull.Value)
{
DisplayCell.Text += CurrentRow[CurrentColumn].ToString();
}
else
{
DisplayCell.Text += string.Empty;
}
}
}
}
}
}
}
catch
{
}
this.DisplayTableDate = DisplayTable;
return displayTable;
}
Skan
If you knew it would not compile why didn't you tell me?!?!?!
modified on Wednesday, January 23, 2008 4:38:31 PM
|
|
|
|
|
You can return the data in 1 query by using the ROLLUP[^] command in your SELECT statement. ROLLUP is used to for producing summary information for a set of rows. In your case, you can use it to produce subtotals for each set of sales records grouped by store.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
ThanksPmar, however, I have used "Rollup" in the SP itself thus the calculation. The result is table[1]. However table[0] counts the transcation based on a different criteria. I got all the information I need from the DB, however it can not be done in single query. All I need is to display the dat from the dataset.
Skan
If you knew it would not compile why didn't you tell me?!?!?!
|
|
|
|
|
Using C#.net express edition I created an application that has the main code in the parent form.
In this form I create an object and I want that object to change values in the parent form before the object returns a value (I am doing a progressbar).
I could create a form object from the child object but that would not look as nice.
HELP!
shwa guy
|
|
|
|
|
shwaguy wrote: Using C#.net express edition I created an application that has the main code in the parent form.
In this form I create an object and I want that object to change values in the parent form before the object returns a value (I am doing a progressbar).
I could create a form object from the child object but that would not look as nice.
Either have your object fire progress events, which you can wire and use to update your ProgressBar from the main form, or pass the ProgressBar to the object and have it do the update directly. The first method is more code, but vastly preferrable.
If your object uses threads, beware of UI marshalling issues.
Share and enjoy.
Sean
|
|
|
|
|
thanks for the reply.
I still do not know how do what I need to do, but I think I might be on the right path now.
I never had to fire events before, I guess I am about to learn.
shwa guy
|
|
|
|
|
|
Applications don't have IP addresses, machines do. Go study your subject matter and come back after you have gained an understanding of it sufficient for forming your question in a way that it actually makes sense.
led mike
|
|
|
|
|
It should look like this one.
Welcome to The Quiz Program!
You can be quizzed on any of the following operators:
1) % (modulus, or 'remainder')
2) * (multiplication)
3) / (integer division)
4) / % (integer division & modulus in a combined challenge!
Type the number of the operator that you wish to be quizzed on: 1
I will ask you to tell me the result of
A % B
What is the smallest value of A: 0
What is the largest value of A: 100
What is the smallest value of B: 40
What is the largest value of B: 50
How many times do you wish to be quizzed:
3
Ok, we're ready to go!
What is the result of 92 % 44? 4
4 is correct!
What is the result of 92 % 48? 4
Good try, but no: 92 % 48 = 44
What is the result of 18 % 47? 47
Good try, but no: 18 % 47 = 18
Thank you for using this program - have a nice day!
Press the 'Return' key to exit
|
|
|
|
|
|
No one here will write the program for you, but if you need help with writing the program the forums can help. And the program you are speaking of sounds like a basic program.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Looks like homework to me...
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
When is your homework due?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Here's a quiz question for you:
What happens when someone asks members of a CodeProject forum to do their homework for them?
When you figure out the answer, hopefully you'll understand what you have to do.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hellllooooooo. Hellloooooooo. Can you hear the wind whistling unhindered through the vast emptiness existing between your ears? It must be lonely for your last remaining braincell.
|
|
|
|
|
Hello all,
I have a C# project (.net 1.1) that references a .net dll. When this dll is put in the same folder as the project's executable file, everything works fine.
But I need to put this dll in another folder, not related to the project. I already tried putting it in system32 folder, but it still didn't work. I get a fileNotFound exception.
How can I do that?
Thanks
Peterson
|
|
|
|
|
Hi,
Try to give the dll reference thru browse(eg. say c:\test) not project reference and also make the property CopyLocal as false.
In addition, you give the path (c:\test) in ReferencePath tabe of Project's Property window.
Thanks
Srini
|
|
|
|