コード例 #1
0
ファイル: frmMain.cs プロジェクト: hafsjold/snvrepos
        private void betalingerFraPBSToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string bigString        = null;
            string smallString      = null;
            int    AntalImportFiler = 0;

            clsPbs601 objPbs601 = new clsPbs601();
            clsPbs602 objPbs602 = new clsPbs602();
            clsPbs603 objPbs603 = new clsPbs603();
            clsPbs686 objPbs686 = new clsPbs686();

            clsSFTP objSFTP = new clsSFTP(Program.dbData3060);

            AntalImportFiler = objSFTP.ReadFraSFtp(Program.dbData3060);  //Læs direkte SFTP
            objSFTP.DisconnectSFtp();
            objSFTP = null;
            //AntalImportFiler = objPbs602.ReadFraPbsFile(); //Læs fra Directory FraPBS

            int Antal602Filer = objPbs602.betalinger_fra_pbs(Program.dbData3060);
            int Antal603Filer = objPbs603.aftaleoplysninger_fra_pbs(Program.dbData3060);
            int Antal686Filer = objPbs686.aftaleoplysninger_fra_pbs(Program.dbData3060);

            Tuple <int, int> tresult = objPbs601.advis_auto(Program.dbData3060);
            int AntalAdvis           = tresult.Item1;
            int lobnr = tresult.Item2;

            if ((AntalAdvis > 0))
            {
                objPbs601.advis_email(Program.dbData3060, lobnr);
            }

            clsSumma objSumma        = new clsSumma();
            int      AntalBetalinger = objSumma.BogforIndBetalinger();

            if (AntalBetalinger > 0)
            {
                bigString = String.Format("Der er {0} bogførte betalinger.", AntalBetalinger);
            }
            else
            {
                bigString = "Der er ingen nye betalinger";
            }
            smallString = String.Format("Antal indlæste filer fra PBS: {0} \nAntal nye 602 filer: {1}\nAntal nye 603 filer: {3}\nAntal nye 686 filer: {4}\nAntal nye betalinger: {2}.", AntalImportFiler, Antal602Filer, AntalBetalinger, Antal603Filer, Antal686Filer);



            DialogResult result = DotNetPerls.BetterDialog.ShowDialog(
                "Filer fra PBS",                                       //titleString
                bigString,                                             //bigString
                smallString,                                           //smallString
                null,                                                  //leftButton
                "OK",                                                  //rightButton
                global::nsPuls3060.Properties.Resources.Message_info); //iconSet
        }
コード例 #2
0
        private void betalingerFraPBSToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string bigString        = null;
            string smallString      = null;
            int    AntalImportFiler = 0;

            clsPbs602 objPbs602 = new clsPbs602();
            clsPbs603 objPbs603 = new clsPbs603();

            clsSFTP objSFTP = new clsSFTP();

            AntalImportFiler = objSFTP.ReadFraSFtp();  //Læs direkte SFTP
            objSFTP.DisconnectSFtp();
            objSFTP = null;
            //AntalImportFiler = objPbs602.ReadFraPbsFile(); //Læs fra Directory FraPBS

            int Antal602Filer = objPbs602.betalinger_fra_pbs();
            int Antal603Filer = objPbs603.aftaleoplysninger_fra_pbs();

            clsSumma objSumma   = new clsSumma();
            int      AntalOrdre = objSumma.Order2Summa();

            bigString = String.Format("Antal indlæste filer fra PBS: {0} \nAntal nye 602 filer: {1}\nAntal nye 603 filer: {3}\nAntal nye ordre: {2}.", AntalImportFiler, Antal602Filer, AntalOrdre, Antal603Filer);
            if (AntalOrdre > 0)
            {
                smallString = String.Format("Åben SummaSummarum\nTryk på ikonet Bilag i venstre side\nbogfør de {0} nye ordre.", AntalOrdre);
            }
            else
            {
                smallString = "Der er ingen nye odre";
            }

            DialogResult result = DotNetPerls.BetterDialog.ShowDialog(
                "Betalinger fra PBS",                                  //titleString
                bigString,                                             //bigString
                smallString,                                           //smallString
                null,                                                  //leftButton
                "OK",                                                  //rightButton
                global::nsPuls3060.Properties.Resources.Message_info); //iconSet
        }