|
You need to raise with your business that this rule will cost a lot of money to work around, and does not gel with an audit requirement functionality because of the lack of transactional constraints in your XML handling.
"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 m using try command like this
try
{
// Statement which can cause an exception.
}
catch
{
// Statements for handling the exception
}
when perform catch statement then progrm not read next line go to try statement which can cause an exception
how can i do???
|
|
|
|
|
mjawadkhatri wrote: when perform catch statement then progrm not read next line go to try statement which can cause an exception
how can i do???
Can you explain a bit better what your asking?
Your program will execute the code within the try block, if an error occurs it will 'jump' to the catch block and execute the code there. It will not return to the try block.
If there is any code you always need/want to be executed use a 'finally' block.
|
|
|
|
|
I saw your Example code in Coding Horrors lol
I dont know what your problem is but its not done that way, what is the is of using the catch keywork and not use it.
try
{
}
catch(ApplicationExeption ex)
{
}
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Not sure what it is you want, however:
1.
there is no simple equivalent to ancient Basic's "On Error Goto Next"
2.
if your try block contains a loop, and fails in one iteration of said loop, anything in the try block is aborted, also the loop.
if you want the loop to continue with the next iteration, you have to turn things around, and put the try-catch construct inside the loop.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I am having trouble working out how i can make a beep occur for a given duration of time.
I have the following event handler that will recieve the beep duration and execute it for that amount of time. Lots of articles talk of beeping for intervals but have not found a way to make a continuous beep.
void VMCU_Beep(int BeepDurationInSeconds)
{
}
Does anyone know how this can be done
Thanx George
|
|
|
|
|
Use System.Console.Beep(frequency, duration)
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Thanx thats what i was looking for
|
|
|
|
|
gwithey wrote: a continuous beep
trying to keep the mosquitoes away?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
The GridView columns are as follow:
<Columns>
<asp:BoundField HeaderText="ID No." DataField="NRIC" />
<asp:BoundField HeaderText="Name" DataField="LabourName" />
<asp:BoundField HeaderText="Event Name/Duty Roster" DataField="EventName/DutyRoster" />
<asp:BoundField HeaderText="Working Date" DataField="WorkingDate" />
<asp:BoundField HeaderText="Normal(hr)" DataField="NormalHour" />
<asp:BoundField HeaderText="Amt(N)" DataField="NormalRate" />
<asp:BoundField HeaderText="Extra(hr)" DataField="ExtraHour" />
<asp:BoundField HeaderText="Amt(E)" DataField="ExtraRate" />
<asp:BoundField HeaderText="Weekend(hr)" DataField="WeekEndHour" />
<asp:BoundField HeaderText="Amt(W)" DataField="WeekEndRate" />
<asp:BoundField HeaderText="Holiday(hr)" DataField="HolidayHour" />
<asp:BoundField HeaderText="Amt(H)" DataField="HolidayRate" />
<asp:BoundField HeaderText="Allowance" DataField="Allowance" />
<asp:BoundField HeaderText="Total $" DataField="Total" />
<asp:BoundField DataField="Type" HeaderText="Type" Visible="False" />
</Columns>
The result must be:
------------|-------|---------------|-----------------|--------------|--------|---|------
LabourID|Name|Event Name|Working Date|Normal(Hr)|Amt(N)|...|Total
------------|-------|---------------|-----------------|--------------|--------|---|------
009 |ET | All | All | 5 | 35.0 |...|95.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Meeting | 10 Jul 09 | 2 | 20.0 |...|60.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Seminar | 13 Jul 09 | 3 | 15.0 |...|35.0
------------|-------|---------------|-----------------|--------------|--------|---|------
002 |Sue | All | All | 6 | 18.0 |...|40.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Promotion | 23 Jul 09 | 6 | 18.0 |...|40.0
------------|-------|---------------|-----------------|--------------|--------|---|------
I'm writing the code as follow:
void GetDataTable(DataTable tempDT)
{
DataTable dt_FromDB = tempDT;
DataTable dt_Grid = Grid_Table;
// DataRow adr = new DataRow();
decimal nHour=0;
decimal nRate=0;
decimal eHour=0;
decimal eRate=0;
decimal hHour=0;
decimal hRate=0;
decimal wHour=0;
decimal wRate=0;
decimal allow=0;
decimal total=0;
string labourNRIC = "";
string checkLabourNRIC = "";
foreach (DataRow dr_FromDB in dt_FromDB.Rows)
{
//string NRIC=dr_FromDB["NRIC"].ToString();
//while(dt_FromDB.Select("NRIC="+NRIC))
//{
if(dr_FromDB["NRIC"].ToString()==labourNRIC || labourNRIC=="")
{
nHour += Convert.ToDecimal(dr_FromDB["NormalHour"].ToString());
nRate += Convert.ToDecimal(dr_FromDB["NormalRate"].ToString());
eHour += Convert.ToDecimal(dr_FromDB["ExtraHour"].ToString());
eRate += Convert.ToDecimal(dr_FromDB["ExtraRate"].ToString());
hHour += Convert.ToDecimal(dr_FromDB["HolidayHour"].ToString());
hRate += Convert.ToDecimal(dr_FromDB["HolidayRate"].ToString());
wHour += Convert.ToDecimal(dr_FromDB["WeekEndHour"].ToString());
wRate += Convert.ToDecimal(dr_FromDB["WeekEndRate"].ToString());
allow += Convert.ToDecimal(dr_FromDB["Allowance"].ToString());
total += Convert.ToDecimal(dr_FromDB["Total"].ToString());
}
if (dr_FromDB["NRIC"].ToString() != checkLabourNRIC)
{
labourNRIC = dr_FromDB["NRIC"].ToString();
DataRow dr_Grid = dt_Grid.NewRow();
dr_Grid["NRIC"] = dr_FromDB["NRIC"].ToString();
dr_Grid["LabourName"] = dr_FromDB["LabourName"].ToString();
dr_Grid["EventNameOrDutyRoster"] = "All";
dr_Grid["WorkingDate"] = "All";
dr_Grid["NormalHour"] = nHour;
dr_Grid["NormalRate"] = nRate;
dr_Grid["ExtraHour"] = eHour;
dr_Grid["ExtraRate"] = eRate;
dr_Grid["HolidayHour"] = hHour;
dr_Grid["HolidayRate"] = hRate;
dr_Grid["WeekEndHour"] = wHour;
dr_Grid["WeekEndRate"] = wRate;
dr_Grid["Allowance"] = allow;
dr_Grid["Total"] = total;
dt_Grid.Rows.Add(dr_Grid);
ViewState["Grid"] = dt_Grid;
}
if (dr_FromDB["NRIC"].ToString() == labourNRIC)
{
DataRow dr_Grid = dt_Grid.NewRow();
dr_Grid["EventNameOrDutyRoster"] = dr_FromDB["EventNameOrDutyRoster"].ToString();
dr_Grid["WorkingDate"] = dr_FromDB["WorkingDate"].ToString();
dr_Grid["NormalHour"] = dr_FromDB["NormalHour"].ToString();
dr_Grid["NormalRate"] = dr_FromDB["NormalRate"].ToString();
dr_Grid["ExtraHour"] = dr_FromDB["ExtraHour"].ToString();
dr_Grid["ExtraRate"] = dr_FromDB["ExtraRate"].ToString();
dr_Grid["HolidayHour"] = dr_FromDB["HolidayHour"].ToString();
dr_Grid["HolidayRate"] = dr_FromDB["HolidayRate"].ToString();
dr_Grid["WeekEndHour"] = dr_FromDB["WeekEndHour"].ToString();
dr_Grid["WeekEndRate"] = dr_FromDB["WeekEndRate"].ToString();
dr_Grid["Allowance"] = dr_FromDB["Allowance"].ToString();
dr_Grid["Total"] = dr_FromDB["Total"].ToString();
dr_Grid["Type"] = dr_FromDB["Type"].ToString();
dt_Grid.Rows.Add(dr_Grid);
ViewState["Grid"] = dt_Grid;
checkLabourNRIC = labourNRIC;
}
}
*How shall I continue this code?
*Thanks for your help.
Su
|
|
|
|
|
For the love of God, tag your code so that its pretty:
------------|-------|---------------|-----------------|--------------|--------|---|------
LabourID |Name |Event Name |Working Date |Normal(Hr) |Amt(N) |...|Total
------------|-------|---------------|-----------------|--------------|--------|---|------
009 |ET | All | All | 5 | 35.0 |...|95.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Meeting | 10 Jul 09 | 2 | 20.0 |...|60.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Seminar | 13 Jul 09 | 3 | 15.0 |...|35.0
------------|-------|---------------|-----------------|--------------|--------|---|------
002 |Sue | All | All | 6 | 18.0 |...|40.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Promotion | 23 Jul 09 | 6 | 18.0 |...|40.0
------------|-------|---------------|-----------------|--------------|--------|---|------
Then we can think about the problem.
The solution is not too hard and you needn't have posted 18 billion lines of code.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Can u give me solution? I need to accomplish it. Thanks.
|
|
|
|
|
I can give the solution but you'll learn morew by trying. However I've been told I'm too rude to everyone so, for _Maxx_'s benefit, I will point you gently in the right direction.
The problem is complicated by having the summary before the items, but there is an easy way to do this that does not require looping through the items twice. The follwoing psudo code should get you on your way:
summary is not set
for each item in the list
if the item key <> summary key
if the summary is set
update the grid entry for summary with the totals
create a new grid entry for summary with item key
set totals to zero
create a new grid entry for item
add item values to totals
if the summary is set
update the grid entry for summary with the totals
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Thanks for your help. I'm now trying to write my program according to your psudo code. At first, I thought this program in a very confused way. Thanks a lot!
|
|
|
|
|
Hi,
I want to develop a project in which mobiles based on windows mobile OS is used, this Mobiles will use GPRS to connect to internet and send signals to
camera attached to remote location , like to zoom etc.
As i am pretty new in this field can somebody guide which type of project i should make in visual studio 2008 IDE, I know smart device project but on that, i want to know about target platform.
Do any body have good tutorials on that.
|
|
|
|
|
Have you tried the Mobile Development Forumn?
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Hii
I am developing windows application. i want to display datatable data in table format in the zedgraph. Can anyone help me? plz send me the solution plz asap.
thanks in advance.
|
|
|
|
|
?? If you want to display a table, use DataGridView. ZedGraph is for showing chart.
|
|
|
|
|
HII
thanx for the reply..but i want to show that chart's data in table format below the same chart. example
strike PL
1000 500
2000 600
3000 700
like this
plz send me solution
thanx in advance.
|
|
|
|
|
use legend, if that is not enough, than you must write it by yourself.
|
|
|
|
|
Is is it possible to develop a web page(Asp.Net) where from I will pass the UID/PWD and straight way enter the Outlook Web Access Page. I ment it will skip the Outlook Web Access login window.
Can someone help me with a solution.
Thanks in advance.
|
|
|
|
|
I'm not an expert on OWA... but it would stand to reason that, instead of using their login page, you could develop a sort of redirect page that automatically POSTs the username and password to whatever the default login page POSTs to. Again, I could be wrong, but that would make sense.
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
How can we convert a webcam image or any other image in 16 bit
|
|
|
|
|
Well, i embedded this "axWindowsMediaPlayer1" player into my C# (Microsoft Visual), went to properties and added a link to my very small video.avi file online, i check it and it played perfectly! Then, i wanted a bigger video, i changed the url to a bigger video i uploaded (only 1:10), and it WONT PLAY! I click play, it says "connecting" "ready" and then i click it agian and it just says the same thing and plays nothing.
The first video is AVI and plays perfectly:
Video 1 (429.370 bytes)
The second video is AVI aswell and does NOT play:
Video 1 (6,000,172 bytes)
PLEASE HELP ME! Why wont the bigger file play? Why does it just not buffer!?
If this doesnt work, how do i simply just stream it from youtube? If i put a youtube browser in the client, it wont play and say i need flash! Please help ASAP!
Thankyou!
|
|
|
|