コード例 #1
0
        private void opdaterRSMembershipToolStripMenuItem_Click(object sender, EventArgs e)
        {
            puls3060_dkEntities jdb       = new puls3060_dkEntities();
            clsPbs602           objPbs602 = new clsPbs602();

            objPbs602.betalinger_til_rsmembership(Program.dbData3060, jdb);
        }
コード例 #2
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
        }
コード例 #3
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
        }
コード例 #4
0
ファイル: clsSumma.cs プロジェクト: hafsjold/snvrepos
        public int BogforPaypalBetalinger()
        {
            var rec_regnskab = Program.qryAktivRegnskab();

            if (rec_regnskab.Afsluttet == true)
            {
                return(0);
            }

            DateTime?Startdato = rec_regnskab.Start;
            DateTime?Slutdato  = rec_regnskab.S**t;

            if (rec_regnskab.DatoLaas != null)
            {
                if (rec_regnskab.DatoLaas > Startdato)
                {
                    Startdato = rec_regnskab.DatoLaas;
                }
            }
            puls3060_dkEntities  jdb       = new puls3060_dkEntities();
            clsPbs602            objPbs602 = new clsPbs602();
            MemBogfoeringsKlader bogf      = objPbs602.konter_paypal_betalinger_fra_rsmembership(jdb, (DateTime)Startdato, (DateTime)Slutdato);

            int AntalBetalinger = 0;

            if (bogf.Count() > 0)
            {
                DateTime nu    = DateTime.Now;
                DateTime ToDay = new DateTime(nu.Year, nu.Month, nu.Day);;

                int BS1_SidsteNr = 0;
                try
                {
                    recStatus rec_Status = (from s in Program.karStatus where s.key == "BS1_SidsteNr" select s).First();
                    BS1_SidsteNr = int.Parse(rec_Status.value);
                }
                catch (System.InvalidOperationException)
                {
                }

                Program.karKladde = null;
                foreach (var b in bogf)
                {
                    recKladde kl = new recKladde
                    {
                        Dato             = b.Dato,
                        Bilag            = b.Bilag + BS1_SidsteNr,
                        Tekst            = b.Tekst,
                        Afstemningskonto = b.Afstemningskonto,
                        Belob            = b.Belob,
                        Kontonr          = b.Kontonr,
                        Faknr            = b.Faknr,
                        Sagnr            = b.Sagnr
                    };
                    Program.karKladde.Add(kl);
                    AntalBetalinger = (int)b.Bilag;
                }
                Program.karStatus.save();
                Program.karKladde.save();
                Program.dbData3060.SubmitChanges();
            }
            return(AntalBetalinger);
        }