private void gridView1_GotFocus(object sender, EventArgs e) { if (gridView1.GetFocusedRow()!=null) { ParentObj = gridView1.GetFocusedRow() as E_HonoraryTitle; } }
/// <summary> /// 新建对象设置Key值 /// </summary> /// <param name="newobj"></param> void gridViewOperation_CreatingObjectEvent(E_HonoraryTitle newobj) { try { int maxscore = 0; try { string sql2 = " select top 1 EndScore from E_HonoraryTitle order by EndScore desc"; maxscore = (int)MainHelper.PlatformSqlMap.GetObject("SelectE_HonoraryTitleEndScoreBySql", sql2); } catch (Exception) { } newobj.StartScore = maxscore + 1; newobj.EndScore = newobj.StartScore + 499; } catch (Exception ee) { } }