void barBtnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var vw = new ItemEdt(); InitView(vw); vw.Calr = this.Calr; vw.EditMode = Business.Core.Define.EnViewEditMode.New; vw.ShowDialog(); }
void barBtnEdt_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { UltraDbEntity.T_ERP_Item et = null; switch (tbMain.SelectedTabPage.Text) { case "未审核": et = gc.GetFocusedDataSource<UltraDbEntity.T_ERP_Item>(); break; case "已审核": case "系统商品": et = gvaudit.GetFocusedDataSource<UltraDbEntity.T_ERP_Item>(); break; } if (null == et) return; var vw = new ItemEdt(); vw.Calr = this.Calr; vw.EditMode = Business.Core.Define.EnViewEditMode.Edit; vw.Ent = et; InitView(vw); if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK) gcaudit.RefreshDataSource(); }