示例#1
0
 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;
        }
示例#3
0
 public void Dispose()
 {
     warehouseContext.Dispose();
 }