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