protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
public void CallAddProductPage() { var dbcontext = new WarehouseContext(); var tab = WindowMgr.CreateTabPage("添加产品信息", "添加产品信息", false); var form = CallAddProductControl(null, dbcontext, (u) => { WindowMgr.SendNotification("添加产品信息成功", NotificationLevel.Information); WindowMgr.CloseTabPage(tab); dbcontext.Dispose(); }); tab.Content = form; }
public void Dispose() { warehouseContext.Dispose(); }