private void FormMain_Load(object sender, EventArgs e) { try { lblVer.Text = @"Ver " + Application.ProductVersion; timerNow_Tick(null, null); timerNotify.Start(); superTabControlMain.Tabs.Clear(); try { Init(); } catch (Exception ex) { MessageHelper.ShowError(ex); } SpareEntities db = EntitiesFactory.CreateSpareInstance(); NotifyController.AddStockNotify(db, GlobalVar.Oper.OperName); db.SaveChanges(); } catch (Exception ex) { this.Close(); } }