- 积分
- 0
- 在线时间
- 10 小时
- 主题
- 2
- 注册时间
- 2014-7-17
- 帖子
- 12
- 最后登录
- 2019-6-16
- 帖子
- 12
- 软币
- 99
- 在线时间
- 10 小时
- 注册时间
- 2014-7-17
|
发表于 2015-6-30 10:18:07
|
显示全部楼层
//选择单据编号带出数据
private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
{
if (e.Column.FieldName == "d_FBillNo")
{
string id = e.Value.ToString();
DataRow[] dr = edit_ds.Tables[0].Select(string.Format("单据编号 = '{0}'", id));
if (dr != null && dr.Length > 0)
{
DataRow row = dr[0];
string FBatchNo = row["批号"].ToString();
string FHeadSelfB0147 = row["订单单号"].ToString();
string FName = row["产品名称"].ToString();
string FModel = row["规格型号"].ToString();
string Unit = row["计量单位"].ToString();
string FStatus = row["审标"].ToString();
string Organization = row["购货单位"].ToString();
DateTime FDate = (DateTime)(row["单据日期"]);
gridView1.SetRowCellValue(e.RowHandle, "d_FBatchNo", FBatchNo);
gridView1.SetRowCellValue(e.RowHandle, "d_FHeadSelfB0147", FHeadSelfB0147);
gridView1.SetRowCellValue(e.RowHandle, "d_FName", FName);
gridView1.SetRowCellValue(e.RowHandle, "d_FModel", FModel);
gridView1.SetRowCellValue(e.RowHandle, "d_Unit", Unit);
gridView1.SetRowCellValue(e.RowHandle, "d_FStatus", FStatus);
gridView1.SetRowCellValue(e.RowHandle, "d_Organization", Organization);
gridView1.SetRowCellValue(e.RowHandle, "d_FDate", FDate);
// repositoryItemSearchLookUpEdit1View.se
}
} |
|