|
I have the 3 business objects in each business object class iam calling the partcular data access layer method
Suppose for Business object Person, in the person class save i am doing the data access layer method call:
SAVE(person s)
{
updatePerson(person s);
}
2)Business object Animal, in the animal class save method like this:
Save(Animal a)
{
UpdateAnimal(Animal a); a contain all the Web layer data.
}
3) Business object Birds, in the Bird Class Save:
Save(Bird b)
{
UpdateBird(Bird b)
}
Coming to the Data Access layer code
UpdatePerson(Person s)
{
call ProcPersonInsert to into person table
}
UpdateAnimal(Animal a)
{
Call ProcAnimalInsert to insert into Animal table.
}
This is same for the Bird class also. Now My problem is I want to do all those three updates in the TRANSACTIONS. How to use transactions in my case. Can anyone give me some idea in this?
Thanks in advance
|
|
|
|
|
Do you mean make them all atomic, so they all succeed, or they all fail ? The only way to do this using a transaction is to make one database call that updates them all.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Can Visual Studio still do this?
Anyone know how? Yikes, this is crazy I know!
John Held
|
|
|
|
|
document.getElementById('<%=DropDownList.ClientID%>').disabled = false;
I tried this. Its not working. Can you help me with the correct code for making a dropdownlist disabled?
Also, finding a problem with this one. Both of them are throwing errors.
document.getElementById('<%=Label10.ClientID%>').style.visibility = false;
document.getElementById('<%=Label10.ClientID%>').visible = false;
Please help.
Thanks
|
|
|
|
|
function DisableButton()
{
document.getElementById('ExcelExportButton').disabled =true;
}
This code works fine with me, my button's id is ExcelExportButton
|
|
|
|
|
also look at this, what I am using for button in some of my pages, change the attributes accordingly and this should work fine with a combo box as well
Me.LoginButton.Attributes.Add("onclick", GetPostBackEventReference(Me.LoginButton) & ";this.value='Please wait..';this.disabled = true;")
|
|
|
|
|
It's working just fine. Setting the disabled property to false makes it not disabled. If you want it disabled you should set the property to true .
The style.visibility property is not a boolean. Why don't you just look up some documentation[^] instead of guessing how to use things?
---
single minded; short sighted; long gone;
|
|
|
|
|
First of all, is this in your main page or in a js file ? If the latter, then the <%= will not be changed to be the Id
beyond that, like Guffa said, it's better to read some docs than to make random guesses, but disabled = false plainly will enable to control.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Is there a dropdownlist control which the ID is 'DropDownList'? If no, you should replace 'DropDownList' to the correct ID of the dropdownlist control which you want to disabled.
document.getElementById('<%=Label10.ClientID%>').style.visibility = false;
It should change into below:
document.getElementById('<%=Label10.ClientID%>').style.visibility = 'hidden';
==============================
I Believe I Can fly!~~~
|
|
|
|
|
I'm getting the following error trying to debug (F5) a web application on my Vista Machine. What could be the cause?
Unable to start debugging on the web server. Could not start ASP.NET or ATL Server debugging.
Verify that ASP.NET or ATL Server is correctly installed on the server.
I'm quite pressed for time so would appreciate suggestions if anyone has already been through this, before I invest time going through it.
Thanks in advance.
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
Did you verify that ASP.NET or ATL Server is correctly installed on the server?
You can also try doing the view in browser option then Debug -> Attach to Process and pick WebDev.WebServer.EXE and see if that works.
|
|
|
|
|
Another test application runs OK using the built in VS2005 web server.
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
Hi all
Here is the situation, I have a button named "Export To Excel", Now when someone clicks the button the button gets disabled as I added the following code to Page_Load
Me.ExcelExportButton.Attributes.Add("onclick", GetPostBackEventReference(Me.ExcelExportButton) & ";this.value='Please wait...';this.disabled = true;")
Now I execute some code for generating the excel file, at the end of the event I use the following statements to open a "Save As" dialog box so the use can save it,
Response.ContentType = "application/excel"
Response.AppendHeader("Content-Disposition", "attachment; filename=Report " + System.DateTime.Now.ToString.Replace("/", "-").Replace(":", ".") + ".xls")
Response.TransmitFile(fileName)
Response.End()
It all works fine but the disabled button does not enable back whatever I do, the only way I think I can enable the button is to redirect the page to itself,
But if I use Response.Redirect next to Response.End the page redirects but the "Save As" dialog does not appear and so the user can not save the file,
any help would be really appreciated,
Thanks in advance
Sri
|
|
|
|
|
You can only send one response back to the browser. You can't both send back an Excel document and a page.
If you want to do both, you have to send two requests from the browser, one that gets the Excel document and opens in a different window, and one that gets the new page.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: You can only send one response back to the browser. You can't both send back an Excel document and a page.
If you want to do both, you have to send two requests from the browser, one that gets the Excel document and opens in a different window, and one that gets the new page.
Thanks, I think I got it.
|
|
|
|
|
Am relatively new to Asp.Net and OOP. Can someone expose me to the concept of Data Access Objects and a simple application
|
|
|
|
|
Am using the DetailsView web server control but which to validate some fields for data entry or edit. How do I validate desired fields
|
|
|
|
|
I can't log on to my web app after deployment (which I can do before deployment). Though I use aspnet in-bult Membership Provider.
Can anyone help me?
|
|
|
|
|
Im trying to build scott mitchells online photo album
in chapter 23 i built a manage categories page to enter and edit categories
in chapter 24 i built a default pge to enter pictures in the detailsview a dropdownlist
is supposed to show the category id. But the category id list stays empty
|
|
|
|
|
Can you show the code that you used to populated the Dropdownlist?
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
how do I send the code here from my desktop?
|
|
|
|
|
learningman wrote: how do I send the code here from my desktop?
send it through World Wide Web
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Do you have a email address?
|
|
|
|
|
I need the code that closes the window i'm in.
thx
BiG RaLpH
|
|
|
|
|
try this on button click
Button1.Attributes.Add("OnClick", "javascript:window.close();");
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|