我正在使用gridview来填充数据,我检索新值但我需要旧的值用于报告目的,有没有办法可以检索这些旧值? 我正在使用templatefield
protected void TcGridView_RowEditing(object sender, GridViewEditEventArgs e)
{
TcGridView.EditIndex = e.NewEditIndex;
FillTravelers();
}
protected void TcGridView_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = TcGridView.Rows[e.RowIndex];
//FillTravelers();
TcGridView.EditIndex = -1;
TextBox txtFC = row.FindControl("FCTextBox1") as TextBox;
Label txtID = row.FindControl("IDLabel") as Label;
Label txtDC = row.FindControl("DCLabel") as Label;
Label txtRate = row.FindControl("RateLabel") as Label;
String FC = txtFC.Text;
String ID = txtID.Text;
String DC = txtDC.Text;
String Rate = txtRate.Text;
double newDC = Convert.ToDouble(FC) / Convert.ToDouble(Rate);
Transaction trs = new Transaction(Convert.ToInt32(ID), " ", " ", Convert.ToDouble(FC), Convert.ToDouble(Rate), newDC, " ", ID);
DatabaseHandler.EditTransaction(trs);
FillTravelers();
}
由于 卡尔