R
RAM
Hello,
(Sorry for my English...)
I am learning .NET 2.0 (C#, ASP.NET, ADO.NET etc.).
I need to write a database application (SQL Server) consisting of a number
of database transactions (like accounting system). Each of these
transactions has enty in menu, parameters screen (.aspx page), some logic
(probably implemented in code-behind), and results screen (could be
same.aspx page). I need a good design, some ideas of experienced
programmers.
My idea is the following: I will use web.sitemap to implement menu, and
X.aspx/X.aspx.cs to implement transactions. In Default.aspx I have a menu
using sitemap data source. In X.aspx.cs I have written
protected void Page_Load(...)
{
if (!IsPostBack)
{
...
transaction = connection.BeginTransaction("...");
}
}
protected void SaveButton_Click(...)
{
...
transaction.Commit();
}
One of my problems is that I don't know where to put Rollback. It is not
enough (I think) to create CancelButton because user could press Back button
in his/her browser :-(. I can put Rollback code into Default.aspx.cs
Page_Load (to be called when new menu option is executed), but I don't like
this idea.
Could you help me please to correctly design my application? (I must use
ASP.NET!)
Thank you.
/RAM/
(Sorry for my English...)
I am learning .NET 2.0 (C#, ASP.NET, ADO.NET etc.).
I need to write a database application (SQL Server) consisting of a number
of database transactions (like accounting system). Each of these
transactions has enty in menu, parameters screen (.aspx page), some logic
(probably implemented in code-behind), and results screen (could be
same.aspx page). I need a good design, some ideas of experienced
programmers.
My idea is the following: I will use web.sitemap to implement menu, and
X.aspx/X.aspx.cs to implement transactions. In Default.aspx I have a menu
using sitemap data source. In X.aspx.cs I have written
protected void Page_Load(...)
{
if (!IsPostBack)
{
...
transaction = connection.BeginTransaction("...");
}
}
protected void SaveButton_Click(...)
{
...
transaction.Commit();
}
One of my problems is that I don't know where to put Rollback. It is not
enough (I think) to create CancelButton because user could press Back button
in his/her browser :-(. I can put Rollback code into Default.aspx.cs
Page_Load (to be called when new menu option is executed), but I don't like
this idea.
Could you help me please to correctly design my application? (I must use
ASP.NET!)
Thank you.
/RAM/