Beispiel #1
0
        private void DoApgr1()
        {
            var ad = MyData.GetKlonsRepAdapter("ROps2a") as ROps2aTableAdapter;

            if (ad == null)
            {
                return;
            }
            ad.FillBy_apgr_cur_01_clid(MyData.DataSetKlonsRep.ROps2a, startDate, endDate, ac, null, currency);
            MyData.ReportHelper.PrepareRops2a();

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_Apgr_Bil";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.ROps2a;

            rd.AddReportParameters(
                new string[]
            {
                "RSD", startDateStr,
                "RED", endDateStr,
                "RACX", cbAC.Text,
                "RACNM", lbACName.Text,
                "CompanyName", MyData.Params.CompNameX,
                "RCURRENCY", currency
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #2
0
        private void DoCurrCheck()
        {
            var adap = MyData.GetKlonsRepAdapter("ROps1a") as ROps1aTableAdapter;

            adap.FillBy_curcheck_01(MyData.DataSetKlonsRep.ROps1a,
                                    startDate, endDate, ac, null, currency);

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_DokSar_1";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.ROps1a;

            string paramstr = string.Format(
                "Dokumenti ar valūtas konvertācijas kļūdām \nDatums:[{0}-{1}], konts: [{2}]",
                startDateStr, endDateStr, cbAC.Text);

            rd.AddReportParameters(
                new string[]
            {
                "RSD", startDateStr,
                "RED", endDateStr,
                "RACX", "",
                "RACNM", paramstr,
                "CompanyName", MyData.Params.CompNameX
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #3
0
        public void ShowReport1()
        {
            var rd = new ReportViewerData();

            rd.FileName = "ReportA_MaksSar_1";
            rd.Sources["DSPayLists"] = RepPayLists;
            rd.AddReportParameters(new string[]
            {
                "CompanyName", MyData.Params.CompNameX,
                "RDate", Utils.DateToString(DateTime.Today)
            });

            rd.OnSubreport = (e) =>
            {
                string fnm = ReportHelper.ReportNameFromPath(e.ReportPath);
                if (fnm == "ReportA_MaksSar_1a")
                {
                    int nr = int.Parse(e.Parameters["RINR"].Values[0]);
                    var r  = new[] { RepPayLists[nr] };
                    var rr = RepPayLists[nr].Rows;
                    e.DataSources.Add(new ReportDataSource("DSPayList", r));
                    e.DataSources.Add(new ReportDataSource("DSRows", rr));
                }
            };

            MyData.MyMainForm.ShowReport(rd);
        }
Beispiel #4
0
        public void MakeReport3()
        {
            //var cnm = new[] { "Kat.", "Nol.kat.", "Nod.nol. kat.", "Strv.", "Atrodas" };
            var cnm = new[] {
                "Kategorija",
                "Nolietojuma kategorija",
                "Nolietojuma kategorija nodokļa aprēķinam",
                "Struktīr-vienība",
                "Atrošanās vieta"
            };
            var cnm2 = new string[5];

            for (int i = 0; i < 5; i++)
            {
                cnm2[i] = GroupFieldsOrderA[i] == -1 ? "" : cnm[GroupFieldsOrderA[i]];
            }

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "ReportP_Kustiba_3";
            rd.Sources["DataSet1"] = ReportMovement.ReportRows;
            rd.AddReportParameters(
                new string[]
            {
                "PCompany", MyData.Params.CompNameX,
                "PDate1", Utils.DateToString(DT1),
                "PDate2", Utils.DateToString(DT2),
                "PFilterStr", "Atlases parametri:" + MakeFilterStr(),
                "PCNM1", cnm2[0],
                "PCNM2", cnm2[1],
                "PCNM3", cnm2[2],
                "PCNM4", cnm2[3]
            });
            MyMainForm.ShowReport(rd);
        }
Beispiel #5
0
        private void DoIt()
        {
            string rt = Check();

            if (rt != "OK")
            {
                MyMainForm.ShowWarning(rt);
                return;
            }

            SaveParams();
            DataView rv = new DataView(MyData.DataSetKlons.Persons,
                                       "clid = '" + clid + "'", null, DataViewRowState.CurrentRows);

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_Rekins_1";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.TRepOPSd;
            rd.Sources["DataSet2"] = rv;
            rd.AddReportParameters(
                new string[]
            {
                "RCOMPNAME", MyData.Params.CompName,
                "RREGNR", MyData.Params.CompRegNr,
                "RPVNREGNR", MyData.Params.CompRegNrPVN,
                "RADRESE", MyData.Params.CompAddr + ", " + MyData.Params.CompAddrInd,
                "RBANKASKODS", MyData.Params.BankId,
                "RBANKA", MyData.Params.BankName,
                "RKONTS", MyData.Params.BankAcc,
                "RDESCR", tbDescr.Text,
                "RSIGNER", tbSigner.Text
            });
            MyMainForm.ShowReport(rd);
        }
Beispiel #6
0
        private void DoIt()
        {
            string rt = Check();

            if (rt != "OK")
            {
                MyMainForm.ShowWarning(rt);
                return;
            }

            ROps2aTableAdapter ad = MyData.GetKlonsRepAdapter("ROps2a") as ROps2aTableAdapter;

            if (ad == null)
            {
                return;
            }

            ad.FillBy_pvn_10(MyData.DataSetKlonsRep.ROps2a, startDate, endDate);

            SaveParams();

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_PVN_kops";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.ROps2a;
            rd.AddReportParameters(
                new string[]
            {
                "RSD", MyData.Params.RSD,
                "RED", MyData.Params.RED,
                "CompanyName", MyData.Params.CompName
            });
            MyMainForm.ShowReport(rd);
        }
Beispiel #7
0
        private void DoCurrDiff()
        {
            var ad = MyData.GetKlonsRepAdapter("ROps2a") as ROps2aTableAdapter;

            if (ad == null)
            {
                return;
            }
            ad.FillBy_currdiff_01(MyData.DataSetKlonsRep.ROps2a, startDate, endDate, ac, null, currency);

            if (MyData.DataSetKlonsRep.ROps2a.Count == 0)
            {
                MyMainForm.ShowWarning("Ar dotajiem parametriem dati netika atrasti");
                return;
            }

            var     dr = MyData.DataSetKlonsRep.ROps2a[0];
            decimal d1, d2, d3, d4;

            d1 = dr.ADb - dr.ACr;
            d2 = dr.BDb - dr.BCr;
            string s = ac.Substring(0, 1);

            if (s != "1" && s != "2")
            {
                d1 = -d1;
                d2 = -d2;
            }
            d3     = Math.Round(d1 * currrate, 2);
            d4     = d3 - d2;
            dr.ADb = d1;
            dr.ACr = d3;
            dr.TDb = d2;
            dr.TCr = d4;
            MyData.DataSetKlonsRep.ROps2a.AcceptChanges();

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_CurrDiff";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.ROps2a;

            s = string.Format(
                "Valūta: {0}\nKonts: {1} {2}\nPersona: {3} {4}",
                currency, cbAC.Text, lbACName.Text,
                cbClid.Text, lbClName.Text);

            rd.AddReportParameters(
                new string[]
            {
                "RSD", startDateStr,
                "RED", endDateStr,
                "RACX", cbAC.Text,
                "RACNM", s,
                "CompanyName", MyData.Params.CompNameX,
                "RCURRENCY", currency
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #8
0
        private void DoIt1(int selectedreport)
        {
            var ad  = MyData.GetKlonsAdapter("BalA21") as BalA21TableAdapter;
            var ad2 = MyData.GetKlonsAdapter("BalA22") as BalA22TableAdapter;

            if (ad == null)
            {
                return;
            }

            try
            {
                MyData.DataSetKlons.BalA21.Clear();
                MyData.DataSetKlons.BalA22.Clear();
                ad2.Fill(MyData.DataSetKlons.BalA22);
                ad.FillBy_bal_12(MyData.DataSetKlons.BalA21, startDate, endDate, balid);
            }
            catch (Exception)
            {
                MyMainForm.ShowWarning("Neizdevās sagatavot atskaiti.");
                return;
            }
            MyData.ReportHelper.FillBalA2FromBalA21(balid);


            ReportViewerData rd = new ReportViewerData();

            switch (selectedreport)
            {
            case 0:
                rd.FileName = "Report_Bilance_2";
                break;

            case 1:
                rd.FileName = "Report_Bilance_1";
                break;
            }

            DataView dv = new DataView(
                MyData.DataSetKlons.BalA22,
                "balid = '" + balid + "'",
                "dc, nr",
                DataViewRowState.CurrentRows);

            rd.Sources["DataSet1"] = dv;
            rd.AddReportParameters(
                new string[]
            {
                "RSD", MyData.Params.RSD,
                "RED", MyData.Params.RED,
                "CompanyName", MyData.Params.CompNameX,
                "RTITLE", rtitle,
                "RAKTIVS", raktivs,
                "RPASIVS", rpasivs
            });
            MyMainForm.ShowReport(rd);
        }
Beispiel #9
0
        private void DoIt2(int selectedreport)
        {
            var ad  = MyData.GetKlonsAdapter("BalA2") as BalA2TableAdapter;
            var ad2 = MyData.GetKlonsRepAdapter("SP_REP_BAL_22") as SP_REP_BAL_22TableAdapter;

            if (ad == null)
            {
                return;
            }

            try
            {
                MyData.DataSetKlons.BalA2.Clear();
                MyData.DataSetKlons.BalA22.Clear();
                MyData.DataSetKlonsRep.SP_REP_BAL_22.Clear();
                ad.Fill(MyData.DataSetKlons.BalA2);
                ad2.Fill(MyData.DataSetKlonsRep.SP_REP_BAL_22, startDate, endDate, balid);
            }
            catch (Exception)
            {
                MyMainForm.ShowWarning("Neizdevās sagatavot atskaiti.");
                return;
            }

            List <RepRow_BalMT> reprows = null;

            ReportViewerData rd = new ReportViewerData();

            switch (selectedreport)
            {
            case 2:
                reprows     = PrepareReportMt_apgr(balid, MyData.DataSetKlonsRep.SP_REP_BAL_22);
                rd.FileName = "Report_Bilance_31";
                break;

            case 3:
                reprows     = PrepareReportMt_atl(balid, MyData.DataSetKlonsRep.SP_REP_BAL_22);
                rd.FileName = "Report_Bilance_41";
                break;
            }

            rd.Sources["DataSet1"] = reprows;
            rd.AddReportParameters(
                new string[]
            {
                "RSD", MyData.Params.RSD,
                "RED", MyData.Params.RED,
                "CompanyName", MyData.Params.CompNameX,
                "RTITLE", rtitle,
                "RAKTIVS", raktivs,
                "RPASIVS", rpasivs
            });
            MyMainForm.ShowReport(rd);
        }
Beispiel #10
0
        private void DoIt(int k)
        {
            string rt = Check();

            if (rt != "OK")
            {
                MyMainForm.ShowWarning(rt);
                return;
            }

            SaveParams();

            var ad = MyData.GetKlonsRepAdapter("ROps1a") as ROps1aTableAdapter;

            if (k == 1)
            {
                ad.FillBy_skaidra_01(MyData.DataSetKlonsRep.ROps1a, startDate, endDate, limit1, "JP");
            }
            else
            {
                ad.FillBy_skaidra_02(MyData.DataSetKlonsRep.ROps1a, startDate, endDate, limit2, "FP");
            }

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_Skaidra_1";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.ROps1a;

            string s1 = "", s = "              ";
            int    i = 13;

            if (k == 2)
            {
                i = startDate.Month;
            }
            s1  = s.Substring(0, i - 1);
            s1 += "X";
            s1 += s.Substring(0, 13 - i);

            rd.AddReportParameters(
                new string[]
            {
                "PYEAR", startDate.Year.ToString(),
                "PMONTH", s1,
                "Company", MyData.Params.CompName,
                "Addr", MyData.Params.CompAddr,
                "AddrInd", MyData.Params.CompAddrInd,
                "RegNr", MyData.Params.CompRegNr,
                "Manager", MyData.Params.CompMName,
                "Phone", MyData.Params.CompPhone
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #11
0
        private void MakeReport()
        {
            ReportViewerData rd = new ReportViewerData();

            rd.FileName          = "ReportP_NodNolGads_1";
            rd.Sources["dsRows"] = bsRows;
            rd.AddReportParameters(
                new string[]
            {
                "PCompany", MyData.Params.CompNameX,
                "PYear", YearCurrent.ToString()
            });
            MyMainForm.ShowReport(rd);
        }
Beispiel #12
0
        public void MakeReport2()
        {
            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "ReportP_Kustiba_2";
            rd.Sources["DataSet1"] = ReportMovement.ReportRows;
            rd.AddReportParameters(
                new string[]
            {
                "PCompany", MyData.Params.CompNameX,
                "PDate1", Utils.DateToString(DT1),
                "PDate2", Utils.DateToString(DT2),
                "PFilterStr", "Atlases parametri:" + MakeFilterStr()
            });
            MyMainForm.ShowReport(rd);
        }
Beispiel #13
0
        public void MakeReport()
        {
            ReportViewerData rd = new ReportViewerData();

            rd.FileName = "ReportA_Kopsavilkums_1";
            rd.Sources["dsSalaryReport"] = ReportRows;
            rd.AddReportParameters(new string[]
            {
                "CompanyName", MyData.Params.CompName,
                "RFilter", RFilter,
                "RPeriod", RPeriod,
                "RRemark", "",
                "RCaption", RCaption
            });
            MyData.MyMainForm.ShowReport(rd);
        }
Beispiel #14
0
        public void MakeReport()
        {
            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "ReportP_NodNol_1";
            rd.Sources["DataSet1"] = ReportMovement.ReportRows;
            rd.AddReportParameters(
                new string[]
            {
                "PCompany", MyData.Params.CompNameX,
                "PYR", YR.ToString(),
                "PDate1", "01.01.\n" + YR,
                "PDate2", "31.12.\n" + YR
            });
            MyMainForm.ShowReport(rd);
        }
Beispiel #15
0
        private void DoIt()
        {
            string rt = Check();

            if (rt != "OK")
            {
                MyMainForm.ShowWarning(rt);
                return;
            }
            SaveParams();

            ROps1aTableAdapter ad1a = MyData.GetKlonsRepAdapter("ROps1a") as ROps1aTableAdapter;
            ROps2aTableAdapter ad2a = MyData.GetKlonsRepAdapter("ROps2a") as ROps2aTableAdapter;
            ROps3aTableAdapter ad3a = MyData.GetKlonsRepAdapter("ROps3a") as ROps3aTableAdapter;

            ReportViewerData rd = new ReportViewerData();

            rd.Sources["DataSet1"]   = MyData.DataSetKlonsRep.ROps1a;
            rd.Sources["DataSet_2a"] = MyData.DataSetKlonsRep.ROps2a;
            rd.Sources["DataSet_3a"] = MyData.DataSetKlonsRep.ROps3a;

            ad1a.FillBy_koresp_11_clid2(MyData.DataSetKlonsRep.ROps1a, startDate, endDate, ac, clid);
            ad2a.FillBy_apgr_01_clid2(MyData.DataSetKlonsRep.ROps2a, startDate, endDate, ac, clid);
            ad3a.FillBy_koresp_01_clid2(MyData.DataSetKlonsRep.ROps3a, startDate, endDate, ac, clid);

            MyData.ReportHelper.PrepareRops1a();
            MyData.ReportHelper.PrepareRops2a();
            MyData.ReportHelper.PrepareRops2aRAC();

            rd.AddReportParameters(
                new string[]
            {
                "RSD", startDateStr,
                "RED", endDateStr,
                "RAC", cbAC.Text,
                "RACNM", lbACName.Text,
                "CompanyName", MyData.Params.CompNameX,
                "RPER", MyData.Params.RPER,
                "RPERNM", lbClName.Text,
                "AVNR", tbNr.Text,
                "PAC", null,
                "PCLID", null
            });

            rd.FileName = "Report_AvNor_1";
            MyMainForm.ShowReport(rd);
        }
Beispiel #16
0
        public void MakeReport(DLJoinView jview, CalendarMonthInfo calmt, string title,
                               ERoportType roporttype, MyStyleDefs mystyldDefs)
        {
            HeaderHolyDay    = mystyldDefs.HeaderHolyDayBack;
            HeaderWeekEndDay = mystyldDefs.HeaderWeekEndBack;
            VacationDay      = mystyldDefs.VacationBack;
            SickDay          = mystyldDefs.SickDayBack;
            FreeDay          = mystyldDefs.FreeDayBack;
            HolyDay          = mystyldDefs.HolyDayBack;

            MakeReportA(jview, calmt);
            if (ReportRows.Count == 0)
            {
                return;
            }

            var period = string.Format("{0}. gada {1}",
                                       calmt.Year, Utils.MonthNames[calmt.Month - 1]);

            ReportViewerData rd = new ReportViewerData();

            if (roporttype == ERoportType.Simple)
            {
                rd.FileName = "ReportA_DarbaLaiks_1";
            }
            else
            {
                rd.FileName = "ReportA_DarbaLaiks_1k";
            }
            rd.Sources["DataSet1"] = ReportRows;
            rd.AddReportParameters(new string[]
            {
                "CompanyName", MyData.Params.CompNameX,
                "RPerson", "",
                "RPeriod", period,
                "RLastVisibleDay", calmt.DaysInMonth.ToString(),
                "RTitle", title,
                "RRemark", ""
            });
            rd.AddReportParameter("RHeaders", Headers);
            if (roporttype == ERoportType.WithColors)
            {
                rd.AddReportParameter("RHeaderColors", HeaderColors);
            }
            MyData.MyMainForm.ShowReport(rd);
        }
Beispiel #17
0
        private void MakeReport()
        {
            var dr = bsCatT.CurrentDataRow as KlonsPDataSet.CATTRow;

            ReportViewerData rd = new ReportViewerData();

            rd.FileName          = "ReportP_NodNolKat_1";
            rd.Sources["dsRows"] = bsRows;
            rd.AddReportParameters(
                new string[]
            {
                "PCompany", MyData.Params.CompNameX,
                "PCatStr", $"[{dr.CODE}] {dr.DESCR}",
                "PCatRate", $"{dr.RATE}%"
            });
            MyMainForm.ShowReport(rd);
        }
Beispiel #18
0
        public void MakeReport()
        {
            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "ReportA_Zinas";
            rd.Sources["DataSet1"] = ReportRows;
            rd.AddReportParameters(new string[]
            {
                "CompanyName", MyData.Params.CompName,
                "RREGNR", MyData.Params.CompRegNr,
                "RVARDS", MyData.Params.RVARDS,
                "RAMATS", MyData.Params.RAMATS,
                "RTELEFONS", MyData.Params.RTELEFONS,
                "RDATUMS", tbDate.Text
            });
            MyData.MyMainForm.ShowReport(rd);
        }
Beispiel #19
0
        private void DoIt()
        {
            string rt = Check();

            if (rt != "OK")
            {
                MyMainForm.ShowWarning(rt);
                return;
            }
            ROps2aTableAdapter ad = MyData.GetKlonsRepAdapter("ROps2a") as ROps2aTableAdapter;

            if (ad == null)
            {
                return;
            }

            if (cbCharCount.Text == "*")
            {
                ad.FillBy_apgr_np_11(MyData.DataSetKlonsRep.ROps2a, startDate, endDate, ac);
            }
            else
            {
                ad.FillBy_apgr_np_12(MyData.DataSetKlonsRep.ROps2a, startDate, endDate, ac, int.Parse(cbCharCount.Text));
            }

            SaveParams();

            MyData.ReportHelper.PrepareRops2a();

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_Apgr_NP";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.ROps2a;
            rd.AddReportParameters(
                new string[]
            {
                "RSD", MyData.Params.RSD,
                "RED", MyData.Params.RED,
                "RACX", MyData.Params.RACX,
                "RACNM", MyData.Params.RACNM,
                "CompanyName", MyData.Params.CompNameX
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #20
0
        public void MakeReport2()
        {
            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "ReportA_IINK2";
            rd.Sources["DataSet1"] = ReportRows.Where(d => d.Use);
            rd.AddReportParameters(new string[]
            {
                "CompanyName", MyData.Params.CompNameX,
                "RegNr", MyData.Params.CompRegNrPVNa,
                "RNAME", MyData.Params.RVARDS,
                "RPOSITION", MyData.Params.RAMATS,
                "RPHONE", MyData.Params.RTELEFONS,
                "RDATE", tbDate.Text,
                "RYear", cbYear.Text
            });
            MyData.MyMainForm.ShowReport(rd);
        }
Beispiel #21
0
        private void DoApgrPers1()
        {
            var ad = MyData.GetKlonsRepAdapter("ROps2a") as ROps2aTableAdapter;

            if (ad == null)
            {
                return;
            }
            ad.FillBy_apgr_cur_01_clid(MyData.DataSetKlonsRep.ROps2a, startDate, endDate, ac, clid, currency);
            MyData.ReportHelper.PrepareRops2a();

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_Pers_1";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.ROps2a;

            string s = string.Format("{1} Konts: [{0}]", cbAC.Text, currency);

            if (!string.IsNullOrEmpty(lbACName.Text))
            {
                s = string.Format("{0} {1}", s, lbACName.Text);
            }
            if (!string.IsNullOrEmpty(cbClid.Text))
            {
                s = string.Format("{0}\nPersona: [{1}]", s, cbClid.Text);
            }
            if (!string.IsNullOrEmpty(lbClName.Text))
            {
                s = string.Format("{0} {1}", s, lbClName.Text);
            }

            rd.AddReportParameters(
                new string[]
            {
                "RSD", startDateStr,
                "RED", endDateStr,
                "RACX", cbAC.Text,
                "RACNM", s,
                "CompanyName", MyData.Params.CompNameX
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #22
0
        private void DoIt()
        {
            string rt = Check();

            if (rt != "OK")
            {
                MyMainForm.ShowWarning(rt);
                return;
            }
            ROps2aTableAdapter ad2a = MyData.GetKlonsRepAdapter("ROps2a") as ROps2aTableAdapter;
            ROps3aTableAdapter ad3a = MyData.GetKlonsRepAdapter("ROps3a") as ROps3aTableAdapter;

            if (ad2a == null)
            {
                return;
            }
            if (ad3a == null)
            {
                return;
            }

            ad2a.FillBy_apgr_dz_12(MyData.DataSetKlonsRep.ROps2a, startDate, endDate);
            ad3a.FillBy_apgr_dz_11(MyData.DataSetKlonsRep.ROps3a, startDate, endDate);

            SaveParams();

            MyData.ReportHelper.PrepareRops2a();

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_Apgr_DZ_1";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.ROps2a;
            rd.Sources["DataSet2"] = MyData.DataSetKlonsRep.ROps3a;
            rd.AddReportParameters(
                new string[]
            {
                "RSD", MyData.Params.RSD,
                "RED", MyData.Params.RED,
                "CompanyName", MyData.Params.CompNameX
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #23
0
        public void ShowReport(int yr, int mt, string title)
        {
            var period = string.Format("{0}. gada {1}",
                                       yr, Utils.MonthNames[mt - 1]);

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "ReportA_DarbaLaiks_2";
            rd.Sources["DataSet1"] = ReportRowsA;
            rd.AddReportParameters(new string[]
            {
                "CompanyName", MyData.Params.CompNameX,
                "RPerson", "",
                "RPeriod", period,
                "RTitle", title,
                "RRemark", "",
            });
            MyData.MyMainForm.ShowReport(rd);
        }
Beispiel #24
0
        private void DoIt()
        {
            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "ReportA_VidIzp_1";
            rd.Sources["DataSet1"] = AvPayCalcInfo.ReportRows;
            rd.AddReportParameters(
                new string[]
            {
                "CompanyName", MyData.Params.CompNameX,
                "RPerson", string.Format("{0} {1}", AvPayCalcInfo.FName, AvPayCalcInfo.LName),
                "RPeriod", string.Format("{0}.{1:00}", AvPayCalcInfo.Year, AvPayCalcInfo.Month),
                "RRateHour", AvPayCalcInfo.RateHour.ToString("N2"),
                "RRateDay", AvPayCalcInfo.RateDay.ToString("N2"),
                "RRateCalDay", AvPayCalcInfo.RateCalendarDay.ToString("N2"),
                "RRemark", AvPayCalcInfo.UsingMinRate? "Izmantotās minimālās likmes.":""
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #25
0
        public void MakeReport()
        {
            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "ReportA_VSAOI_1";
            rd.Sources["DataSet1"] = ReportRows;
            rd.AddReportParameters(new string[]
            {
                "CompanyName", MyData.Params.CompName,
                "RREGNR", MyData.Params.CompRegNr,
                "RVARDS", MyData.Params.RVARDS,
                "RAMATS", MyData.Params.RAMATS,
                "RTELEFONS", MyData.Params.RTELEFONS,
                "RDATUMS", tbDate.Text,
                "RGADS", cbYear.Text,
                "RMENESIS", Utils.MonthNames[Month - 1],
                "RMAKSDAT", PayDay.ToString(),
                "RTP", ReportTP.ToString()
            });
            MyData.MyMainForm.ShowReport(rd);
        }
Beispiel #26
0
        public static void MakeReport(KlonsADataSet.SALARY_SHEETSRow dr_algas_lapa, ERepType tp)
        {
            var sh = new SalarySheetInfo(dr_algas_lapa);
            var er = sh.SetUpLightFromSarRow(dr_algas_lapa);

            if (er != "OK")
            {
                MyData.MyMainForm.ShowWarning(er);
                return;
            }
            var rep = Report_Salary2.MakeReport2(sh);

            if (rep.Count == 0)
            {
                return;
            }

            var period = MakePeriodString(sh.DT1, sh.DT2);

            ReportViewerData rd = new ReportViewerData();

            if (tp == ERepType.WithPosNoSign)
            {
                rd.FileName = "ReportA_AlgasLapa_1";
            }
            else
            {
                rd.FileName = "ReportA_AlgasLapa_2";
            }
            rd.Sources["dsSalaryReport"] = rep;
            rd.AddReportParameters(new string[]
            {
                "CompanyName", MyData.Params.CompNameX,
                "RNr", dr_algas_lapa.SNR.ToString(),
                "RPerson", "",
                "RPeriod", period,
                "RRemark", "",
            });
            MyData.MyMainForm.ShowReport(rd);
        }
Beispiel #27
0
        private void DoIt()
        {
            string rt = Check();

            if (rt != "OK")
            {
                MyMainForm.ShowWarning(rt);
                return;
            }

            var ad1 = MyData.GetKlonsRepAdapter("TREPPVNZ1") as TREPPVNZ1TableAdapter;

            if (ad1 == null)
            {
                return;
            }

            string speriod = string.Format("{0}. gada {1}", startDate.Year, Utils.MonthNames[startDate.Month - 1]);

            SaveParams();

            ReportViewerData rd = new ReportViewerData();

            ad1.FillBy_PVNZ1(MyData.DataSetKlonsRep.TREPPVNZ1, startDate, endDate);
            rd.FileName = "Report_PVNZ_1";

            MyData.ReportHelper.PrepareTRepDarz1();

            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.TREPPVNZ1;
            rd.AddReportParameters(
                new string[]
            {
                "RPERIOD", speriod,
                "CompanyName", MyData.Params.CompNameX,
                "PRID0", firstPRowNr.ToString(),
                "PFirstPageNr", firstPageNr.ToString()
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #28
0
        private void DoKoresp1()
        {
            var ad1a = MyData.GetKlonsRepAdapter("ROps1a") as ROps1aTableAdapter;
            var ad2a = MyData.GetKlonsRepAdapter("ROps2a") as ROps2aTableAdapter;
            var ad3a = MyData.GetKlonsRepAdapter("ROps3a") as ROps3aTableAdapter;

            ReportViewerData rd = new ReportViewerData();

            rd.Sources["DataSet1"]   = MyData.DataSetKlonsRep.ROps1a;
            rd.Sources["DataSet_2a"] = MyData.DataSetKlonsRep.ROps2a;
            rd.Sources["DataSet_3a"] = MyData.DataSetKlonsRep.ROps3a;

            ad1a.FillBy_koresp_11_cur(MyData.DataSetKlonsRep.ROps1a, startDate, endDate, ac, clid, currency);
            ad2a.FillBy_apgr_cur_01_clid(MyData.DataSetKlonsRep.ROps2a, startDate, endDate, ac, clid, currency);
            ad3a.FillBy_koresp_01_cur(MyData.DataSetKlonsRep.ROps3a, startDate, endDate, ac, clid, currency);

            MyData.ReportHelper.PrepareRops1a();
            MyData.ReportHelper.PrepareRops2a();
            MyData.ReportHelper.PrepareRops2aRAC(cbAC.Text, lbACName.Text, cbClid.Text, lbClName.Text);

            rd.AddReportParameters(
                new string[]
            {
                "RSD", startDateStr,
                "RED", endDateStr,
                "RAC", cbAC.Text,
                "RACNM", lbACName.Text,
                "CompanyName", MyData.Params.CompNameX,
                "RPER", MyData.Params.RPER,
                "RPERNM", lbClName.Text,
                "PAC", null,
                "PCLID", null,
                "RCURRENCY", currency
            });

            rd.FileName = "Report_Koresp_1";

            MyMainForm.ShowReport(rd);
        }
Beispiel #29
0
        private void DoIt()
        {
            string rt = Check();

            if (rt != "OK")
            {
                MyMainForm.ShowWarning(rt);
                return;
            }
            TRepApAnTableAdapter ad = MyData.GetKlonsRepAdapter("TRepApAn") as TRepApAnTableAdapter;

            if (ad == null)
            {
                return;
            }

            ad.FillBy_apgr_full_11(MyData.DataSetKlonsRep.TRepApAn, startDate, endDate,
                                   ac1, ac2, ac3, ac4, ac5, cl,
                                   xac1, xac2, xac3, xac4, xac5, xcl);

            SaveParams();

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_Apgr_Full_11";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.TRepApAn;
            rd.AddReportParameters(
                new string[]
            {
                "RSD", MyData.Params.RSD,
                "RED", MyData.Params.RED,
                "RACX", "",
                "RACNM", param,
                "CompanyName", MyData.Params.CompNameX
            });

            MyMainForm.ShowReport(rd);
        }
Beispiel #30
0
        private void DoIt()
        {
            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "ReportA_SlimibasNauda_1";
            rd.Sources["DataSet1"] = SickDayCalcInfo.Rows;
            rd.AddReportParameters(
                new string[]
            {
                "CompanyName", MyData.Params.CompNameX,
                "RPerson", Person,
                "RPeriod", Period,
                "RPay", SickDayCalcInfo.TotalRow.SickDayPay.ToString("N2"),
                "RPay75", SickDayCalcInfo.TotalRow.SickDayPay75.ToString("N2"),
                "RPay80", SickDayCalcInfo.TotalRow.SickDayPay80.ToString("N2"),
                "RRateHour", SickDayCalcInfo.AvPayRateHour.ToString("N4"),
                "RRateDay", SickDayCalcInfo.AvPayRateDay.ToString("N4"),
                "RRateCalDay", SickDayCalcInfo.AvPayRateCalendarDay.ToString("N4"),
                "RRemark", ""
            });

            MyMainForm.ShowReport(rd);
        }