Click here to Skip to main content
15,893,190 members
Home / Discussions / C#
   

C#

 
QuestionDrag and Drop Treeview Item into listview Pin
Udayaraju21-Jan-09 19:36
Udayaraju21-Jan-09 19:36 
AnswerRe: Drag and Drop Treeview Item into listview Pin
Udayaraju22-Jan-09 0:31
Udayaraju22-Jan-09 0:31 
AnswerRe: Drag and Drop Treeview Item into listview Pin
DaveyM6922-Jan-09 1:51
professionalDaveyM6922-Jan-09 1:51 
GeneralRe: Drag and Drop Treeview Item into listview Pin
Udayaraju22-Jan-09 3:01
Udayaraju22-Jan-09 3:01 
GeneralRe: Drag and Drop Treeview Item into listview Pin
DaveyM6922-Jan-09 4:07
professionalDaveyM6922-Jan-09 4:07 
GeneralRe: Drag and Drop Treeview Item into listview Pin
Udayaraju22-Jan-09 4:14
Udayaraju22-Jan-09 4:14 
QuestionRe: Drag and Drop Treeview Item into listview Pin
Udayaraju22-Jan-09 4:10
Udayaraju22-Jan-09 4:10 
QuestionIssue with the Windows Service OnTimeElapsed Pin
mpavas21-Jan-09 19:33
mpavas21-Jan-09 19:33 
Hello,

I have a below issue with the windows service.

I have a method as below
private void OnElapsedTime(object source, ElapsedEventArgs e)
{
log.Info("OnElapsedTime");
BillPay.ProcessOrder();

}
I have a timer set for 1 mins in OnStart method
protected override void OnStart(string[] args)
{

//ad 1: handle Elapsed event
timer.Elapsed += new ElapsedEventHandler(OnElapsedTime);
//ad 2: set interval to 1 minute (= 60,000 milliseconds)
timer.Interval = 60000 ;
//ad 3: enabling the timer
timer.Enabled = true;
}

The problem:
If my ProcessOrder() method which process all orders do not get completed in 1 mins I see unexpected results in the database with duplicate entry. I suspect the method ProcessOrder() get called again onTimeElapsed, I have commit and rollback statements too. But does not help.

Please suggest as how can I resolve this issue.

Regards,
Pavas

AnswerRe: Issue with the Windows Service OnTimeElapsed Pin
Guffa21-Jan-09 21:51
Guffa21-Jan-09 21:51 
GeneralRe: Issue with the Windows Service OnTimeElapsed Pin
mpavas21-Jan-09 21:57
mpavas21-Jan-09 21:57 
GeneralRe: Issue with the Windows Service OnTimeElapsed Pin
mpavas21-Jan-09 22:18
mpavas21-Jan-09 22:18 
GeneralRe: Issue with the Windows Service OnTimeElapsed Pin
Guffa22-Jan-09 0:45
Guffa22-Jan-09 0:45 
AnswerRe: Issue with the Windows Service OnTimeElapsed Pin
#realJSOP22-Jan-09 0:21
mve#realJSOP22-Jan-09 0:21 
GeneralRe: Issue with the Windows Service OnTimeElapsed Pin
S. Senthil Kumar22-Jan-09 3:27
S. Senthil Kumar22-Jan-09 3:27 
Questionhow to make gridview1 inside gridview2 inside gridview3 Pin
thanhtike21-Jan-09 19:25
thanhtike21-Jan-09 19:25 
QuestionHow do you name controls? Pin
CooperWu21-Jan-09 19:14
CooperWu21-Jan-09 19:14 
AnswerRe: How do you name controls? Pin
Vikram A Punathambekar21-Jan-09 20:00
Vikram A Punathambekar21-Jan-09 20:00 
GeneralRe: How do you name controls? Pin
CooperWu21-Jan-09 21:14
CooperWu21-Jan-09 21:14 
AnswerRe: How do you name controls? Pin
DaveyM6921-Jan-09 21:34
professionalDaveyM6921-Jan-09 21:34 
AnswerRe: How do you name controls? Pin
#realJSOP22-Jan-09 0:24
mve#realJSOP22-Jan-09 0:24 
GeneralRe: How do you name controls? Pin
CooperWu22-Jan-09 14:47
CooperWu22-Jan-09 14:47 
QuestionHow to get device state(enable or disable)? Pin
lovnin21-Jan-09 18:45
lovnin21-Jan-09 18:45 
AnswerRe: How to get device state(enable or disable)? Pin
Ben Fair22-Jan-09 4:51
Ben Fair22-Jan-09 4:51 
AnswerRe: How to get device state(enable or disable)? Pin
CooperWu22-Jan-09 14:48
CooperWu22-Jan-09 14:48 
Questiongetting the row index in c# Pin
amitpathak02421-Jan-09 18:11
amitpathak02421-Jan-09 18:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.