private void gridView1_GotFocus(object sender, EventArgs e) { if (gridView1.GetFocusedRow()!=null) { ParentObj = gridView1.GetFocusedRow() as E_BusinesInfo; } }
private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (gridView1.GetFocusedRow() != null) { ParentObj = gridView1.GetFocusedRow() as E_BusinesInfo; CommentHelper.SaveFile(ParentObj.WordData, ParentObj.BySCol1); } }
/// <summary> /// 新建对象设置Key值 /// </summary> /// <param name="newobj"></param> void gridViewOperation_CreatingObjectEvent(E_BusinesInfo newobj) { newobj.UserID = MainHelper.User.UserName; newobj.CreateTime = DateTime.Now; }