⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reportsum.cs

📁 财务凭证管理系统,主要是从事公司或部门的财务方面的管理。此系统给会计人员带来很大的帮助!
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using property.control.Subject;
using property.model.GetConnection;
namespace property.view.HinderInfo
{
    public partial class reportSum : Form
    {
        public reportSum()
        {
            InitializeComponent();
        }
        public reportSum(int P_int_id)
        {
            InitializeComponent();
            P_int_select = P_int_id;
        }
        public reportSum(int P_int_id,string P_string_WId)
        {
            InitializeComponent();
            P_int_select = P_int_id;
            P_str_select = P_string_WId;
        }
        public int P_int_select;
        public string P_str_select;
        private void reportSum_Load(object sender, EventArgs e)
        {
            GetSubject gs = new GetSubject();
            //科目编号
            if (P_int_select != 0 && P_str_select == "SubjectID")
            {
                string reportPath = Application.StartupPath.Substring(0, Application.StartupPath.Substring(0,
                 Application.StartupPath.LastIndexOf("\\")).LastIndexOf("\\"));
                reportPath += @"\view\hinderInfo\repSumSubject.rpt";
                ReportDocument rd = new ReportDocument();
                rd.Load(reportPath);
                rd.SetDataSource(gs.getds(P_int_select, "subjectid").Tables[0].DefaultView);
                this.crystalReportViewer1.ReportSource = rd;
                return;
            }// end block
            //凭证编号
            if (P_int_select != 0 && P_str_select == "warrId")
            {

                string reportPath = Application.StartupPath.Substring(0, Application.StartupPath.Substring(0,
              Application.StartupPath.LastIndexOf("\\")).LastIndexOf("\\"));
                reportPath += @"\view\hinderInfo\repSumSubject.rpt";
                ReportDocument rd = new ReportDocument();
                rd.Load(reportPath);
                rd.SetDataSource(gs.getds(P_int_select, "WarId").Tables[0].DefaultView);
                this.crystalReportViewer1.ReportSource = rd;
                return;
            }
           //全部信息
            if (P_str_select != null)
            {
                string reportPath = Application.StartupPath.Substring(0, Application.StartupPath.Substring(0,
       Application.StartupPath.LastIndexOf("\\")).LastIndexOf("\\"));
                reportPath += @"\view\hinderInfo\repSumSubject.rpt";
                ReportDocument rd = new ReportDocument();
                rd.Load(reportPath);
                rd.SetDataSource(gs.getds(1, "one").Tables[0].DefaultView);
                this.crystalReportViewer1.ReportSource = rd;
                return;
            }





        }// end block 
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -