/// <summary> /// 初始化数据 /// </summary> public void InitData() { if (this.Site!=null &&this.Site.DesignMode) return;//必要的,否则设计时可能会报错 //需要初始化数据时在这写代码 IList<E_ExamSet> list = MainHelper.PlatformSqlMap.GetList<E_ExamSet>(" where Code='yxnum'"); if (list.Count==0) { E_ExamSet eset = new E_ExamSet(); eset.Code = "yxnum"; eset.Value = 80; eset.Title = "优秀分数"; MainHelper.PlatformSqlMap.Create<E_ExamSet>(eset); } RefreshData(" order by CreateTime desc"); }
private void gridView1_GotFocus(object sender, EventArgs e) { if (gridView1.GetFocusedRow()!=null) { ParentObj = gridView1.GetFocusedRow() as E_ExamSet; } }
/// <summary> /// 新建对象设置Key值 /// </summary> /// <param name="newobj"></param> void gridViewOperation_CreatingObjectEvent(E_ExamSet newobj) { }