|
|
|
In the classcal SOA system, there are several documents transmit ways,
such as once-and-only-once delivery),at-most-once delivery,duplicate message elimination,guaranteed message delivery
How to achieve these ways in the mission-critical systems?
Does any one can help me?
|
|
|
|
|
hi guys,
I have 13 classes like clsSales, clsOrder, clsInvoice, clsEmail, clsTimesheet, etc..... every class has obviously different fields and
properties. But there is one class like Sales which have all fields and properties which other classes have.
Now there are 2 options
first one I should create all classes seperately like
clsSales
saleid, orderid, orderdate, invoiceid, invoicedate, emailid, emaildate, timesheetid, timesheetdate.
clsOrder
orderid, orderdate
clsInvoice
invoiceid, invoicedate
clsEmail
emailid, emaildate
and the second option is I should inherit all classes from clsSales class.
My question is if I Implement 2nd option will this improve or make worse web page performance.
thanks
kind regards,
learner
|
|
|
|
|
Learner520 wrote: My question is if I Implement 2nd option will this improve or make worse web page performance.
You won't get any performance problems. Readability, maintainability and choice of design is all matters here. Also inheriting all the classes from sales just to get the common fields is not a good idea. How about a design like,
Order
orderid, orderdate
Invoice
invoiceid, invoicedate
Email
emailid, emaildate
Sales
saleid, Order, Invoice, Email, timesheetid, timesheetdate. Sales class contains references to related classes. So to get an order id from a sales object, you could write salesObject.Order.orderid . You are not repeating any properties here.
BTW, I don't prefix cls to my classes.
Best wishes,
Navaneeth
|
|
|
|
|
Hi...
I have used Adrotator in master page and put it alongwith timer control inside update panel.
In one of my content page I also used update panel and put dropdownlist inside it.
when I browse this content page, and click dropdown list, list appears but as soon as the image of adrotator which is in master page changes , dropdown list gets previous state.
why update panel or timer control of master page affect the content page update panel ?
thanks,,
By:
Hemant Thaker
|
|
|
|
|
set the content page update panel's updatemode as conditional as
UpdateMode="Conditional"
it is by default Always
Update this update panel from serverside code as per your requirement using the code
UpdatePanel1.Update();
If you wont set the updatemode then bydefault evry updatepanel gets updated on any partial/full postback
Let me know if you have any query.
Cheers!!
Brij
|
|
|
|
|
fantastic,,, its working..
thanks for the help,
By:
Hemant Thaker
|
|
|
|
|
Your welcome
Cheers!!
Brij
|
|
|
|
|
Hello!
sorry if this has been asked before, couldn't find anything.
I've a gridview populated with data from database.
I want to allow user to click on a column, send the action to the server which will recognize the column selected.
The only actions I can see send the row which was clicked on, and not the column.
For exampel this action:
protected void MainGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
string s = ((DataRowView)e.Row.DataItem).ToString();
}
Thanks for help!
|
|
|
|
|
I know this is not the perfect solution, but you can apply this until you find another one.
Enable Sorting on the gridview and then handle the Sorting event.
inside that you will get a e.SortExpression . which is the Column name you clicked on.
Now call some method by passing it as parameter and return; .
I am not sure but most probably this will work.
|
|
|
|
|
thanks for the quick reply
that seems to be a good approach. I tried implement it but it doesn't invoke the action when i click on the grid.
have i forgot something? (I enabled sorting)
|
|
|
|
|
all you have to do is, AllowSorting = "true" and then handle the "Sorting" event (OnSorting="GridView1_Sorting"). and then click on the column names (it should be appeared as links) at the run time.
|
|
|
|
|
|
I'm using OWC 11.0 in ASP.NET and C# to create excel file.
I need to protect/unprotect the sheet by a password. I tried to protect the sheet by following code.
string Password = "Password123";
object getPasswordFromUser =(object)Password;
xl.ActiveSheet.Protect(ref getPasswordFromUser, ref obj,
ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj,
ref obj, ref obj, ref obj, ref obj, ref objTrue, ref obj);
But it throws an exception "Exception from HRESULT: 0xE0040059"
Kindly help me to resolve this issue. Code works well if I miss the password.
|
|
|
|
|
Hi All
I am using paging in grid view
<br />
<asp:GridView ID="gridOrganizationDetails" runat="server" <br />
AutoGenerateColumns ="false" OnRowEditing ="gridOrganizationDetails_RowEditing"<br />
OnRowDeleting ="gridOrganizationDetails_RowDeleting" CellPadding="7" <br />
onrowcreated="gridOrganizationDetails_RowCreated" AllowPaging="True" <br />
PageSize="1"><br />
<RowStyle ForeColor="#000066" /><br />
<FooterStyle BackColor="White" ForeColor="#000066" /><br />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /><br />
<PagerSettings Mode="NextPrevious" /><br />
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /><br />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /><br />
<AlternatingRowStyle BackColor="#ffffff" /><br />
<AlternatingRowStyle BackColor="#ffffff" /><br />
<Columns><br />
<asp:BoundField HeaderText="Id" Visible ="true" DataField ="pk" /> <br />
<asp:BoundField HeaderText="Organization Name" Visible ="true" DataField ="name" /> <br />
<asp:BoundField HeaderText="Address 1" Visible ="true" DataField ="address1" /> <br />
<asp:TemplateField HeaderText="Active"><br />
<ItemTemplate><%# DisplayActive((Byte)Eval("is_Active"))%></ItemTemplate><br />
</asp:TemplateField> <br />
<asp:CommandField ShowEditButton ="true" HeaderText ="Edit" <br />
HeaderStyle-HorizontalAlign ="Center" ItemStyle-HorizontalAlign ="Center" ><br />
<HeaderStyle HorizontalAlign="Center"></HeaderStyle><br />
<br />
<ItemStyle HorizontalAlign="Center"></ItemStyle><br />
</asp:CommandField><br />
</Columns><br />
</asp:GridView><br />
in this i am following 3 tier architecture from Page i m calling business logic
from UI
<br />
DataSet ds = myAction.GetOrganizationDetailsPaging(roleId, userId);<br />
<br />
gridOrganizationDetails.DataSource = ds;<br />
gridOrganizationDetails.DataBind();<br />
in second layer
if (roleId == Convert.ToInt32(UserRole.Admin))
{
query = "Select * from organization";
}
else
{
query = "select * from organization orga , user us where (orga.pk =us.org_fk) and us.role_fk ='" + roleId + "'" + "and (us.pk ='" + userId + "')";
}
DbAction dbConnector = new DbAction();
DataSet ds = new DataSet();
ds = dbConnector.ExecuteDataSet(query);
return ds;
from 3 layer i am returning the following thing
public DataSet ExecuteDataSet(String query)
{
DataSet ds = new DataSet();
MySqlDataAdapter adapter = new MySqlDataAdapter(query, ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
adapter.Fill(ds);
return ds;
}
if i m defiing page size 2 then only 2 record is coing and no paging option is coming
i am using My sql
thanks and regars
amit
|
|
|
|
|
According to me if paging option is not coming than only 2 record is returned form the database try to run query in query analyzer and see the result
if not than plz try to provide more info
|
|
|
|
|
Because you forgot to handle PageIndexChanging event of Grid View.
On that event you need to assign new page index to the gridview and then you need to bind the data set again.
i.e.
protected void gridOrganizationDetails_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gridOrganizationDetails.PageIndex = e.NewPageIndex;
ds =
gridOrganizationDetails.DataSource = ds;
gridOrganizationDetails.DataBind();
}
|
|
|
|
|
i checked from data base 10 record is coming.
and i also handle page index changing event
but still that footer is with record not coming.
|
|
|
|
|
I've already posted this on StackOverflow[^] but haven't seen much traffic yet...
I've got a web form (set in a master page) and want to check to see if the page has any changes before exiting (either by success or redirect). If any changes have been made, a dialog is displayed and the user can click ok or cancel.
I've created a panel to act as a dialog box (change z-layer, and apply shading and opacity to background) but my problem is in handling the click events from the buttons on the dialog. For a given exit scenario, I want to do something like:
protected void btnWelcomePage_Click(object sender, ImageClickEventArgs e)
{
if (this.HasChanges())
{
lblDialogTitle.Text = "Confirm Exit";
lblDialogMessage.Text = "Are you sure? Click OK to continue and lose any data entered";
ClearEventHandlers(btnDialogOK);
btnDialogOK_Click.Click += new EventHandler(btnDialogOK_Click);
ClearEventHandlers(btDialogCancel);
btnDialogCancel_Click += new EventHandler(btnDialogCancel_Click);
pnlDialog.Visible = true;
}
else
{
Response.Redirect("~/WelcomePage.aspx");
}
}
where the event handler for the buttons will do the appropriate work to hide the dialog and redirect if required.
My problem is that the EventHandler doesn't appear to bind between postbacks - setting a breakpoint in the Click event handler doesn't do anything; the page does an empty postback.
I assumed that the postback trashes the EventHandlers so I enabled ViewState on the buttons but to no avail. Can anyone suggest a model for handling this type of change? I've been searching through google but everything appears to relate to the dynamic creation of controls rather than the dynamic assignment of EventHandlers.
Thanks in advance
Dave
It definitely isn't definatley
|
|
|
|
|
try to bind event with control when change are there in prerender event of the page
hope this will work because code did by you is right it should work
|
|
|
|
|
to add controls (with eventhandlers) on pageweb you have to add it on page-init.
try this:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
lblDialogTitle.Text = "Confirm Exit";
lblDialogMessage.Text = "Are you sure? Click OK to continue and lose any data entered";
ClearEventHandlers(btnDialogOK);
btnDialogOK_Click.Click += new EventHandler(btnDialogOK_Click);
ClearEventHandlers(btDialogCancel);
btnDialogCancel_Click += new EventHandler(btnDialogCancel_Click);
}
protected void btnWelcomePage_Click(object sender, ImageClickEventArgs e)
{
if (this.HasChanges())
{
pnlDialog.Visible = true;
}
else
{
Response.Redirect("~/WelcomePage.aspx");
}
}
good luck
Mehdi
|
|
|
|
|
How to detect thread end,
Actually i want to give a message to the user after thread ends
|
|
|
|
|
i gr8 wrote: detect thread end
Which thread? Are you creating any new thread?
Can you please explain in detail?
"Never put off until run time what you can do at compile time."
- David Gries, in "Compiler Construction for Digital Computers", circa 1969.
|
|
|
|
|
if u creating Thread using Delegate then u child thread returns IAsyncResult which can we use to determinr whether thread is completed or not
|
|
|
|