private void txtJgRate_TextChanged(object sender, EventArgs e)
{
decimal jgRate = Convert.ToDecimal( this.txtJgRate.Text.Trim());
try
{
for (int i = 0; i < this.gridView1.RowCount; i++)
{
//循环遍历整个gridview明细行
//string batchcode = this.gridView1.GetRowCellValue(i, gridView1.Columns[@"订单批次号"]).ToString();
//DateTime senddate = Convert.ToDateTime(this.gridView1.GetRowCellValue(i, gridView1.Columns[@"发货日期"]));
decimal qtys = Convert.ToDecimal(this.gridView1.GetRowCellValue(i, gridView1.Columns[@"Qtys"]));
decimal dj = Convert.ToDecimal(this.gridView1.GetRowCellValue(i, gridView1.Columns[@"dj"]));
decimal jgdj = dj * jgRate;
decimal jgje = qtys * jgdj;
this.gridView1.SetRowCellValue(i, gridView1.Columns["jgdj"], jgdj.ToString("f4"));
this.gridView1.SetRowCellValue(i, gridView1.Columns["jgje"], jgje.ToString("f2"));
}
}
catch
{
MessageBox.Show(@"err:数据转化错误!");
}
}