Click here to Skip to main content
15,903,201 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: logging out Pin
kheer26-Aug-09 22:04
kheer26-Aug-09 22:04 
GeneralRe: logging out Pin
padmanabhan N26-Aug-09 23:05
padmanabhan N26-Aug-09 23:05 
AnswerRe: logging out Pin
nagendrathecoder26-Aug-09 22:47
nagendrathecoder26-Aug-09 22:47 
QuestionASP.NET Gridview DataBound event retaining previous value Pin
Inderjeet Kaur26-Aug-09 21:52
Inderjeet Kaur26-Aug-09 21:52 
AnswerRe: ASP.NET Gridview DataBound event retaining previous value Pin
Arun Jacob26-Aug-09 23:02
Arun Jacob26-Aug-09 23:02 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Inderjeet Kaur26-Aug-09 23:25
Inderjeet Kaur26-Aug-09 23:25 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Ibrahim Bello27-Aug-09 2:00
Ibrahim Bello27-Aug-09 2:00 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value [modified] Pin
Inderjeet Kaur27-Aug-09 16:53
Inderjeet Kaur27-Aug-09 16:53 
protected void objCardFeesReport_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
try
{
if (e.Exception != null)
{
e.ExceptionHandled = true;
}

Int32 totalSearchRows = 0;
if (e.ReturnValue.GetType() == typeof(System.Int32))
totalSearchRows = (Int32)e.ReturnValue;
lblSummary.Text = "Total Records Found :" + " " + Convert.ToString(totalSearchRows);

if (e.ReturnValue.GetType() == typeof(System.Data.DataSet))
{
DataSet ds = (DataSet)e.ReturnValue;

if (ds.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
String feeID = ds.Tables[0].Rows[i]["TRANTYPEID"].ToString();
Decimal feeAmount = Convert.ToDecimal(ds.Tables[0].Rows[i]["TRANSACTIONAMOUNT"]);

if (feeID == "7")
{
totNewCardFee = totNewCardFee + feeAmount;
}

else if (feeID == "8")
{
totAdditionalFee = totAdditionalFee + feeAmount;
}
else if (feeID == "163")
{
totTxnFee = totTxnFee + feeAmount;
}
else if (feeID == "21")
{
totActFee = totActFee + feeAmount;
}
else if (feeID == "165")
{
totAnnualFee = totAnnualFee + feeAmount;
}
else if (feeID == "12")
{
totAuthFee = totAuthFee + feeAmount;
}
else if (feeID == "25")
{
totInactFee = totInactFee + feeAmount;
}
else if (feeID == "24")
{
totCardShipFee = totCardShipFee + feeAmount;
}
else if (feeID == "9")
{
totReplCardFee = totReplCardFee + feeAmount;
}
else if (feeID == "23")
{
totStmntFee = totStmntFee + feeAmount;
}
}

lblTotalFee.Text = "";

if (totNewCardFee > 0)
{
lblTotalFee.Text = "Total New Card Fee :" + " " + totNewCardFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "</br>";
}

if (totTxnFee > 0)
{
lblTotalFee.Text += "Total Transaction Fee :" + " " + totTxnFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "</br>";
}

if (totAdditionalFee > 0)
{
lblTotalFee.Text += "Total Additional Fee :" + " " + totAdditionalFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "</br>";
}

if (totAuthFee > 0)
{
lblTotalFee.Text += "Total Authorization Fee :" + " " + totAuthFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "</br>";
}

if (totActFee > 0)
{
lblTotalFee.Text += "Total Activation Fee Reversal:" + " " + totActFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "</br>";
}

if (totAnnualFee > 0)
{
lblTotalFee.Text += "Total Annual Fee :" + " " + totAnnualFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "/br>";
}

if (totInactFee > 0)
{
lblTotalFee.Text += "Total Card Inactivity Fee:" + " " + totInactFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "</br>";
}

if (totCardShipFee > 0)
{
lblTotalFee.Text = "Total Card Shipping Fee:" + " " + totCardShipFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "</br>";
}

if (totReplCardFee > 0)
{
lblTotalFee.Text += "Total Replacement Card Fee:" + " " + totReplCardFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "</br>";
}

if (totStmntFee > 0)
{
lblTotalFee.Text += "Total Statement Fee Transaction:" + " " + totStmntFee.ToString(CMSAppConstants.Misc.DECIMAL_FORMAT) + "</br>";
}
}
}
}

catch (System.Threading.ThreadAbortException) { }
catch (CMSException cmsEX)
{
LogHandler.LogMessages(cmsEX);
CMSAppUtilities.CMSAppUtilities.ShowErrorMsg(cmsEX, divMsg, lblErrMsg);
}
catch (Exception Ex)
{
CMSException cmsEX = CMSUtility.BuildException(Ex, 100000, Ex.Message);
LogHandler.LogMessages(cmsEX);
CMSAppUtilities.CMSAppUtilities.ShowErrorMsg(cmsEX, divMsg, lblErrMsg);
}
}


protected void gvCardFeesRReport_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
switch (e.CommandName)
{
case "First":
gvCardFeesRReport.PageIndex = 0;
break;
case "Prev":
if (gvCardFeesRReport.PageIndex > 0)
gvCardFeesRReport.PageIndex = gvCardFeesRReport.PageIndex - 1;
break;
case "Next":
if (gvCardFeesRReport.PageIndex < gvCardFeesRReport.PageCount - 1)
gvCardFeesRReport.PageIndex = gvCardFeesRReport.PageIndex + 1;
break;
case "Last":
gvCardFeesRReport.PageIndex = gvCardFeesRReport.PageCount - 1;
break;
}

}
catch (System.Threading.ThreadAbortException)
{

}
catch (CMSException cmsEx)
{
LogHandler.LogMessages(cmsEx);
CMSAppUtilities.CMSAppUtilities.ShowErrorMsg(cmsEx, divMsg, lblErrMsg);
}
catch (Exception ex)
{
CMSException cmsEx = CMSUtility.BuildException(ex, 100000, ex.Message);
LogHandler.LogMessages(cmsEx);
CMSAppUtilities.CMSAppUtilities.ShowErrorMsg(cmsEx, divMsg, lblErrMsg);
}
}


This is my code. When i click on next page right value get stored in label but display the value of previous page. Dono know its happening at the tiem of rendering or what?

I have removed my code from DataBoundEvent to Selected event of ObjectDataSource. Still the problem is same.

Inderjeet Kaur
Sr. Software Engg

modified on Thursday, August 27, 2009 11:04 PM

GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Ibrahim Bello27-Aug-09 21:00
Ibrahim Bello27-Aug-09 21:00 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Inderjeet Kaur27-Aug-09 21:29
Inderjeet Kaur27-Aug-09 21:29 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Ibrahim Bello27-Aug-09 23:07
Ibrahim Bello27-Aug-09 23:07 
Questionmessagebox Pin
ankitjain111026-Aug-09 21:50
ankitjain111026-Aug-09 21:50 
AnswerRe: messagebox Pin
ankitjain111026-Aug-09 21:59
ankitjain111026-Aug-09 21:59 
GeneralRe: messagebox Pin
Coding C#26-Aug-09 22:22
Coding C#26-Aug-09 22:22 
GeneralRe: messagebox Pin
ankitjain111026-Aug-09 22:34
ankitjain111026-Aug-09 22:34 
GeneralRe: messagebox Pin
Coding C#26-Aug-09 22:39
Coding C#26-Aug-09 22:39 
GeneralRe: messagebox Pin
ankitjain111026-Aug-09 22:57
ankitjain111026-Aug-09 22:57 
GeneralRe: messagebox Pin
ankitjain111026-Aug-09 23:15
ankitjain111026-Aug-09 23:15 
QuestionHow to set CustomValidor for FileUpload Pin
shaik_mr26-Aug-09 21:27
shaik_mr26-Aug-09 21:27 
AnswerRe: How to set CustomValidor for FileUpload Pin
Ibrahim Bello27-Aug-09 1:20
Ibrahim Bello27-Aug-09 1:20 
QuestionAdding values to data gridview programmatically Pin
myinstincts26-Aug-09 21:26
myinstincts26-Aug-09 21:26 
Questionwhile using blank file , fileUpload doesn't work. Pin
Priyagdpl26-Aug-09 21:14
Priyagdpl26-Aug-09 21:14 
AnswerRe: while using blank file , fileUpload doesn't work. Pin
Arun Jacob26-Aug-09 21:33
Arun Jacob26-Aug-09 21:33 
GeneralRe: while using blank file , fileUpload doesn't work. Pin
Priyagdpl26-Aug-09 21:44
Priyagdpl26-Aug-09 21:44 
Questionthere is no source code available for the current location Pin
haleemasher26-Aug-09 21:13
haleemasher26-Aug-09 21:13 

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.