//************************************************************************************************************* //************************************************************************************************************* public clsAppQueue() { try { UCInitializer.UnicontaLogin(); } catch { } queueClient = new QueueClient(ServiceBusConnectionString, QueueName); //Schedule(); var cts = new CancellationTokenSource(); this.ReceiveMessagesAsync(ServiceBusConnectionString, QueueName, cts.Token).Wait(); }
private void FrmMain_Load(object sender, EventArgs e) { try { UCInitializer.UnicontaLogin(); var CurrentCompany = UCInitializer.CurrentCompany; this.toolStripStatusLabel1.Text = "Firma: " + CurrentCompany.CompanyId + " " + CurrentCompany.Name; this.toolStripStatusLabel1.Alignment = ToolStripItemAlignment.Right; this.toolStripStatusLabel2.Text = Program.ConnectStringWithoutPassword; this.toolStripStatusLabel2.Alignment = ToolStripItemAlignment.Right; this.toolStripStatusLabel2.AutoSize = true; } catch (Exception) { this.toolStripStatusLabel1.Text = "LogIn to UniConta Failed"; this.toolStripStatusLabel1.Alignment = ToolStripItemAlignment.Right; this.toolStripStatusLabel2.Text = Program.ConnectStringWithoutPassword; this.toolStripStatusLabel2.Alignment = ToolStripItemAlignment.Right; this.toolStripStatusLabel2.AutoSize = true; } try { var antalBogføringer = Program.dbData3060.tblbets.Where(b => b.bogforingsdato > DateTime.Now.AddDays(-30)).Count(); } catch { DialogResult result = DotNetPerls.BetterDialog.ShowDialog( "Medlem3060uc", //titleString "Ingen forbindelse til Database Server", //bigString null, //smallString null, //leftButton "OK", //rightButton global::Medlem3060uc.Properties.Resources.Message_info); //iconSet } #if (DEBUG) testToolStripMenuItem.Visible = true; #endif }