/// <summary>
/// 预览收费
/// </summary>
public void JieZhangYuLan()
{
string _sCaoZuoY = CurrentUser.UserName.ToString();
ColumnView view
= (ColumnView)grc_WeiJieKuanJR.FocusedView;
decimal N_je=0, N_ShiShouZNJ=0,Z_JE=0;
for(int i=0;i<view.RowCount;i++)
{
N_je
= (decimal)view.GetFocusedRowCellValue("N_JE");
N_ShiShouZNJ
= (decimal)view.GetFocusedRowCellValue("N_ShiShouZNJ");
}
Z_JE
=N_je+N_ShiShouZNJ;
string[] str ={ Z_JE.ToString(), DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), _sCaoZuoY };
DataTable dt1
= new DataTable();
dt1.Columns.Add(
"标题1");
dt1.Columns.Add(
"标题2");
dt1.Columns.Add(
"标题3");
DataRow row
= dt1.NewRow();
row[
"标题1"] = str[0];
row[
"标题2"] = str[1];
row[
"标题3"] = str[2];
dt1.Rows.Add(row);
this.gridYuLan.DataSource = dt1;
}
posted on 2011-05-13 17:51  天之饺子  阅读(4450)  评论(0编辑  收藏  举报