private void button6_Click(object sender, EventArgs e)
 {
     doPrinting dp = new doPrinting();
     try
     {
         dp.setReportMaker(new BlokkReport((int)advBandedGridView1.GetFocusedRowCellValue("SZAMLA_FEJ_ID")));
     }
     catch { }
     dp.doPrint();
 }
 private void listBox1_Click(object sender, EventArgs e)
 {
     doPrinting dp = new doPrinting();
     if ((string)Syspar2.GetValue(ParamCodes.OSSZ_REPORT_FORMAT) == "L")
     {
         dp.setReportMaker(new OsszesitoReport(((OpenDay)listBox1.SelectedValue).EV
                                                 , ((OpenDay)listBox1.SelectedValue).HO,
                                                 ((OpenDay)listBox1.SelectedValue).NAP));
     }
     else
     {
         dp.setReportMaker(new OsszesitoReportSmall(((OpenDay)listBox1.SelectedValue).EV
                                                                 , ((OpenDay)listBox1.SelectedValue).HO,
                                                                 ((OpenDay)listBox1.SelectedValue).NAP));
     }
     dp.doPrint();
 }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string str = DEFS.NyitNap_EV.ToString() + "." + DEFS.NyitNap_HO.ToString() + "." + DEFS.NyitNap_NAP.ToString();
            if (MessageBox.Show("Valóban szeretné lezárni a " + str + " napot?", "Nap zárás", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                LoggedInUsers l = new LoggedInUsers();
                while (l.lLoggedInUsers.Count > 0)
                {
                    foreach (var u in l.lLoggedInUsers)
                    {
                        DEFS.UserLogout(u.USER_ID);
                    }
                    l = new LoggedInUsers();
                }

                nz.CloseDay();
                doPrinting dp = new doPrinting();
                if ((string)Syspar2.GetValue(ParamCodes.OSSZ_REPORT_FORMAT) == "L")
                {
                    dp.setReportMaker(new OsszesitoReport(DEFS.NyitNap_EV
                                                            , DEFS.NyitNap_HO,
                                                            DEFS.NyitNap_NAP));
                }
                else
                {
                    dp.setReportMaker(new OsszesitoReportSmall(DEFS.NyitNap_EV
                                                                            , DEFS.NyitNap_HO,
                                                                            DEFS.NyitNap_NAP));
                }
                dp.doPrint();
                button1.Visible = false;
                btnClose.Visible = false;
                btnKilep.Visible = true;

            }
        }
        private void button3_Click(object sender, EventArgs e)
        {
            if (rbReszletek.Checked == true)
            {
                if (tblHitelek.SelectedItems.Count() == 0)
                {
                    DEFS.SendInfoMessage("Nincs fizetendő kiválasztva!");

                }
                else
                {
                    int szamla_fej_id = DEFS.GenerateSzamlaFej(pPartner, -101, (int)Fizmond.Keszpenz);

                    if (szamla_fej_id != -1)
                    {
                        foreach (var r in tblHitelek.SelectedItems)
                        {
                            DEFS.AddSzlaTetel(szamla_fej_id, ((HitelCell)r.Cells[0]).hSor._SOR_ID);
                            ((HitelCell)r.Cells[0]).hSor.SetFizetve();
                        }

                        doPrinting dp = new doPrinting();
                        dp.setReportMaker(new BlokkReport(szamla_fej_id));
                        dp.doPrint();

                        DEFS.DebugLog("Hitelek fizetve");

                    }
                    refreshReszletesList();
                }
            }
            if (rbNemNevesitett.Checked == true) {
                if (tblHitelek.SelectedItems.Count() == 0)
                {
                    DEFS.SendInfoMessage("Nincs fizetendő kiválasztva!");

                }
                else
                {
                    int szamla_fej_id = DEFS.GenerateSzamlaFej(pPartner, -101, (int)Fizmond.Keszpenz);

                    if (szamla_fej_id != -1)
                    {

                        foreach (var r in tblHitelek.SelectedItems)
                        {
                            Partner_befizetes pb = new Partner_befizetes(pPartner, ((PartnerTartozasCell)r.Cells[0]).tartSor.OSSZEG, ((PartnerTartozasCell)r.Cells[0]).tartSor.JOGCIM);
                            try
                            {
                                DEFS.AddEgyebSzlaTetel(szamla_fej_id,
                                                                    pb.Save());
                                ((PartnerTartozasCell)r.Cells[0]).tartSor.FIZETVE = ((PartnerTartozasCell)r.Cells[0]).tartSor.OSSZEG;
                                ((PartnerTartozasCell)r.Cells[0]).tartSor.Save();
                            }
                            catch (Exception)
                            {
                                pb.Delete();
                                throw;
                            }

                        }

                        doPrinting dp = new doPrinting();
                        dp.setReportMaker(new BlokkReport(szamla_fej_id));
                        dp.doPrint();

                        DEFS.DebugLog("Hitelek fizetve");

                    }
                    refreshReszletesList();
                }

            }
        }