void barBtnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var vw = new EdtView(); vw.EditMode = Ultra.Business.Core.Define.EnViewEditMode.New; InitView(vw); if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK) barBtnRefresh_ItemClick(null, null); }
void barBtnEdt_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var et = gridView1.GetFocusedDataSource<UltraDbEntity.T_ERP_PostFeeType>(); if (null == et) return; var vw = new EdtView(); vw.Entity = et; vw.EditMode = Ultra.Business.Core.Define.EnViewEditMode.Edit; InitView(vw); if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK) barBtnRefresh_ItemClick(null, null); }