Esempio n. 1
0
        private void frmSelectRegnskab_Load(object sender, EventArgs e)
        {
            clsPbs objPbs = new clsPbs();

            objPbs.ReadRegnskaber();
            var rec_AktivRegnskab = Program.qryAktivRegnskab();

            if (rec_AktivRegnskab.Rid == 999)
            {
                this.cmdSidstAnventeRegnskab.Enabled = false;
            }
            this.Regnskab.Text = rec_AktivRegnskab.Navn;
        }
Esempio n. 2
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            #if (DEBUG)
            testToolStripMenuItem.Visible = true;
            #endif

            /*
            if (clsUtil.IsProcessOpen("Summa"))
            {
                DialogResult result = DotNetPerls.BetterDialog.ShowDialog(
                    "Medlem 3060", //titleString
                    "Du skal afslutte SummaSummarum inden du kan starte Medlem 3060.", //bigString
                    null, //smallString
                    null, //leftButton
                    "OK", //rightButton
                    global::Trans2SummaHDC.Properties.Resources.Message_info); //iconSet
                this.Close();
            }
            */
            clsPbs objPbs = new clsPbs();
            objPbs.ReadRegnskaber();
            var rec_AktivRegnskab = Program.qryAktivRegnskab();
            /*
            DialogResult res = (new frmSelectRegnskab()).ShowDialog();
            if (res != DialogResult.OK)
            {
                DialogResult result = DotNetPerls.BetterDialog.ShowDialog(
                    "Medlem 3060", //titleString
                    "Du har ikke valgt et regnskab. Medlem 3060 afsluttes.", //bigString
                    null, //smallString
                    null, //leftButton
                    "OK", //rightButton
                    global::Trans2SummaHDC.Properties.Resources.Message_info); //iconSet
                this.Close();
            }
            else */
            {
                var rec_regnskab = Program.qryAktivRegnskab();
                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;

                }
                catch (Exception)
                {
                    this.toolStripStatusLabel1.Text = "LogIn to UniConta Failed";
                    this.toolStripStatusLabel1.Alignment = ToolStripItemAlignment.Right;
                    this.toolStripStatusLabel2.Text = Program.ConnectStringWithoutPassword;
                    this.toolStripStatusLabel2.Alignment = ToolStripItemAlignment.Right;
                }

                /*
                object ReadKontoplan = Program.karKontoplan;
                Program.path_to_lock_summasummarum_kontoplan = rec_regnskab.Placering + "kontoplan.dat";
                Program.filestream_to_lock_summasummarum_kontoplan = new FileStream(Program.path_to_lock_summasummarum_kontoplan, FileMode.Open, FileAccess.Read, FileShare.None);
                */
            }

            importDanskebankToolStripMenuItem.Visible = true;
            importerMasterCardToolStripMenuItem.Visible = true;
            importActebisToolStripMenuItem.Visible = true;
            actebisFakturaToolStripMenuItem.Visible = true;
            printBilagToolStripMenuItem.Visible = true;
        }