Beispiel #1
0
        private void TSMIShowAccountDetails_Click(object sender, EventArgs e)
        {
            #region Set Report Needs and show report
            ///////////////////////// Start Set value to Parameter of Report /////////////////////////
            #region Report Parameters
            List <ReportParameter> rp = new List <ReportParameter>();
            rp.Add(new ReportParameter("rpReportDate", GS.dateManager.GetCurrentPersianDate()));
            #endregion

            #region Report datasource
            List <ReportDataSource> rdsList = new List <ReportDataSource>();
            rdsList.Add(new ReportDataSource("dsP", cSC.ToDatatable()));

            string q = "SELECT * FROM `accounting` WHERE `personalId`='" + cSC.ID + "'";
            rdsList.Add(new ReportDataSource("dsPA", GS.db.Query(q)));
            #endregion

            #region Set frmReport Properties and show this form
            frmReports frmR = new frmReports();
            frmR.RPList = rp;

            frmR.reportType = ReportType.PeopleAccountDetails;
            frmR.rdsList    = rdsList;

            string ReportPath = Path.Combine(Application.StartupPath, @"reports\rPAS.rdlc");
            frmR.ReportPath       = ReportPath;
            frmR.CurrentPesonalID = cSC.ID.ToString();
            frmR.ShowDialog(this);
            #endregion
            ///////////////////////// End Set value to Parameter of Report /////////////////////////
            //btnBack.Visible = true;
            //btnBack.BringToFront();
            #endregion
        }
Beispiel #2
0
        private void btnMonthlyEarnedReport_Click(object sender, EventArgs e)
        {
            #region Set Report Needs and show report
            ///////////////////////// Start Set value to Parameter of Report /////////////////////////

            #region Report datasource
            List <ReportDataSource> rdsList = new List <ReportDataSource>();
            string d = GS.dateManager.GetCurrentPersianDate();
            d = d.Substring(0, 7);
            string    q = string.Format("SELECT * FROM {0}`accounting` WHERE `payDate` LIKE '{1}%' AND `payType`='pay' ORDER BY `id` ASC", DBName, d);
            DataTable dtDSMonthlyReport = GS.db.Query(q);
            if (dtDSMonthlyReport.Rows.Count == 0)
            {
                MessageBox.Show("در ماه جاری هیچ مبلغی دریافت نشده است.");
                return;
            }
            rdsList.Add(new ReportDataSource("dsMonthlyReport", dtDSMonthlyReport));
            #endregion

            #region Set frmReport Properties and show this form
            frmReports frmR = new frmReports();
            //frmR.RPList = null;

            frmR.reportType = ReportType.MonthlyEarnedReport;
            frmR.rdsList    = rdsList;

            string ReportPath = Path.Combine(Application.StartupPath, @"reports\monthlyReport.rdlc");
            frmR.ReportPath = ReportPath;
            frmR.ShowDialog(this);
            #endregion
            ///////////////////////// End Set value to Parameter of Report /////////////////////////
            #endregion
        }
Beispiel #3
0
        private void btnRepBedehkaran_Click(object sender, EventArgs e)
        {
            //new frmAllPeopleRemainAccount().ShowDialog(this);

            #region Set Report Needs and show report
            ///////////////////////// Start Set value to Parameter of Report /////////////////////////
            #region Report Parameters
            List <ReportParameter> rp = new List <ReportParameter>();
            rp.Add(new ReportParameter("rpReportDate", GS.dateManager.GetCurrentPersianDate()));
            #endregion

            #region Report datasource
            List <ReportDataSource> rdsList = new List <ReportDataSource>();
            string q = string.Format("SELECT * FROM {0}`peoplewithremainaccount`", DBName);
            rdsList.Add(new ReportDataSource("DSPeopleWithRemainaccount", GS.db.Query(q)));
            #endregion

            #region Set frmReport Properties and show this form
            frmReports frmR = new frmReports();
            frmR.RPList = rp;

            frmR.reportType = ReportType.PeopleRemainAccount;
            frmR.rdsList    = rdsList;

            string ReportPath = Path.Combine(Application.StartupPath, @"reports\PeopleWithRemainAccount.rdlc");
            frmR.ReportPath = ReportPath;
            frmR.ShowDialog(this);
            #endregion
            ///////////////////////// End Set value to Parameter of Report /////////////////////////
            #endregion
        }
Beispiel #4
0
        private void ReportTest_Load(object sender, EventArgs e)
        {
            //// TODO: This line of code loads data into the 'peopleWithRemainAccount.peoplewithremainaccount' table. You can move, or remove it, as needed.
            //this.peoplewithremainaccountTableAdapter.Fill(this.peopleWithRemainAccount.peoplewithremainaccount);
            //string imagePath = new Uri(Application.StartupPath + @"\images\logo.png").AbsoluteUri;

            //ReportParameter rpLogo = new ReportParameter("rpLogoPath", imagePath);
            //ReportParameter rpReportDate = new ReportParameter("rpReportDate", GS.dateManager.GetCurrentDate());

            //reportViewer1.LocalReport.EnableExternalImages = true;
            //reportViewer1.LocalReport.SetParameters(rpLogo);
            //reportViewer1.LocalReport.SetParameters(rpReportDate);


            //this.reportViewer1.RefreshReport();


            #region Set Report Needs and show report
            ///////////////////////// Start Set value to Parameter of Report /////////////////////////
            #region Report Parameters
            List <ReportParameter> rp = new List <ReportParameter>();
            rp.Add(new ReportParameter("rpReportDate", GS.dateManager.GetCurrentPersianDate()));
            #endregion

            #region Report datasource
            List <ReportDataSource> rdsList = new List <ReportDataSource>();
            string q = "SELECT * FROM `peoplewithremainaccount`";
            rdsList.Add(new ReportDataSource("DSPeopleWithRemainaccount", GS.db.Query(q)));
            #endregion

            #region Set frmReport Properties and show this form
            frmReports frmR = new frmReports();
            frmR.RPList = rp;

            frmR.reportType = ReportType.PeopleRemainAccount;
            frmR.rdsList    = rdsList;

            string ReportPath = Path.Combine(Application.StartupPath, @"reports\PeopleWithRemainAccount.rdlc");
            frmR.ReportPath = ReportPath;
            frmR.ShowDialog(this);
            #endregion
            ///////////////////////// End Set value to Parameter of Report /////////////////////////
            #endregion


            this.Close();
        }
Beispiel #5
0
        private void btnRepSelNum_Click(object sender, EventArgs e)
        {
            #region Set Report Needs and show report
            ///////////////////////// Start Set value to Parameter of Report /////////////////////////

            #region Report datasource
            List <ReportDataSource> rdsList = new List <ReportDataSource>();
            string d = GS.dateManager.GetCurrentPersianDate();
            d = d.Substring(0, 7);
            string    q = string.Format("SELECT * FROM {0}`invoicedetails` WHERE `type` = '{1}'  ORDER BY `id` ASC", DBName, Invoice.InvoiceType.sell);
            DataTable dtDSMonthlyReport = GS.db.Query(q);
            if (dtDSMonthlyReport.Rows.Count == 0)
            {
                MessageBox.Show("در ماه جاری هیچ تراکنشی ثبت نشده است.");
                return;
            }
            rdsList.Add(new ReportDataSource("dsInvoiceDetails", dtDSMonthlyReport));
            #endregion

            #region ReportParameter
            List <ReportParameter> rpList = new List <ReportParameter>();
            //rpList.Add(new ReportParameter("rpReportDate",GS.dateManager.GetCurrentPersianDate() ));
            #endregion

            #region Set frmReport Properties and show this form
            frmReports frmR = new frmReports();
            //frmR.RPList = null;

            frmR.reportType = ReportType.ItemSell;
            frmR.rdsList    = rdsList;
            foreach (ReportParameter rp in rpList)
            {
                frmR.RPList.Add(rp);
            }
            string ReportPath = Path.Combine(Application.StartupPath, @"reports\ItemSell.rdlc");
            frmR.ReportPath = ReportPath;
            frmR.ShowDialog(this);
            #endregion
            ///////////////////////// End Set value to Parameter of Report /////////////////////////
            #endregion
        }